From 13eab9aa8413d094fbb87ad1bfd8119cae2634ef Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Tue, 14 Jun 2022 11:30:43 +0000 Subject: [PATCH] [FIX] sale_crm: fix default value for team_id When create a sale order from a opportunity the default value for the team_id was wrong and thus the team_id was not properly set Solution -------- Return the id of the team not a tuple that contains the id of the team closes odoo/odoo#93631 X-original-commit: 9c172745dcb9aa755079e2b63a7e9e69442b867f Signed-off-by: Thibault Delavallee (tde) --- addons/sale_crm/models/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_crm/models/crm_lead.py b/addons/sale_crm/models/crm_lead.py index 91f1b00a7b1..7fce0472503 100644 --- a/addons/sale_crm/models/crm_lead.py +++ b/addons/sale_crm/models/crm_lead.py @@ -83,7 +83,7 @@ class CrmLead(models.Model): 'default_tag_ids': [(6, 0, self.tag_ids.ids)] } if self.team_id: - quotation_context['default_team_id'] = self.team_id.id, + quotation_context['default_team_id'] = self.team_id.id if self.user_id: quotation_context['default_user_id'] = self.user_id.id return quotation_context