[FIX] sale_management: SO company change should not reset all lines
unless there is another template to apply by default closes odoo/odoo#86899 Task-id: 2798588 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -36,7 +36,9 @@ class SaleOrder(models.Model):
|
||||
# Especially when installing sale_management in a db
|
||||
# already containing SO records
|
||||
continue
|
||||
order.sale_order_template_id = order.company_id.sale_order_template_id.id
|
||||
company_template = order.company_id.sale_order_template_id
|
||||
if company_template and order.sale_order_template_id != company_template:
|
||||
order.sale_order_template_id = order.company_id.sale_order_template_id.id
|
||||
|
||||
@api.depends('partner_id', 'sale_order_template_id')
|
||||
def _compute_note(self):
|
||||
|
||||
Reference in New Issue
Block a user