[FIX] crm: do not erase activity_type_id field value when converting
activity_type_id is a related field on the first activity to do and should probably not be reset / forced to a value. It is probably some code coming from previous implementations of activities that were linked to crm only. Coming notably from87e457158eand42226de46e. Community PR odoo/odoo#48946 closes odoo/odoo#48960 X-original-commit: de2e682824a636062fbb2c47b1bf5d7c7cef18db Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -126,7 +126,7 @@ class Lead2OpportunityPartner(models.TransientModel):
|
||||
to_merge = self.duplicated_lead_ids
|
||||
result_opportunity = to_merge.merge_opportunity(auto_unlink=False)
|
||||
if not result_opportunity.active:
|
||||
result_opportunity.write({'active': True, 'activity_type_id': False, 'lost_reason': False})
|
||||
result_opportunity.write({'active': True, 'lost_reason': False})
|
||||
|
||||
if result_opportunity.type == "lead":
|
||||
self._convert_and_allocate(result_opportunity, [self.user_id.id], team_id=self.team_id.id)
|
||||
|
||||
Reference in New Issue
Block a user