[FIX] crm: opportunity restored tracking title
Currently, the "Opportunity restored" note appears while changing the tracking field's value, which is incorrect. The "Opportunity restored" title should only appear when the modification is done by clicking on the "Restore" button. Thus, make a condition proper to display this title "Opportunity restored". task-2089784 closes odoo/odoo#39447 X-original-commit: 14453bf9dc6677056329b4599c798d6bf5273980 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -1176,7 +1176,7 @@ class Lead(models.Model):
|
||||
return self.env.ref('crm.mt_lead_lost')
|
||||
elif 'stage_id' in init_values:
|
||||
return self.env.ref('crm.mt_lead_stage')
|
||||
elif self.active:
|
||||
elif 'active' in init_values and self.active:
|
||||
return self.env.ref('crm.mt_lead_restored')
|
||||
return super(Lead, self)._track_subtype(init_values)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user