From 0c5d6498d5193ff51dec921618c0578f901a0501 Mon Sep 17 00:00:00 2001 From: jem-odoo Date: Tue, 13 Aug 2019 15:01:05 +0000 Subject: [PATCH] [FIX] sale_timesheet: created task company depends on its project When confirming a SO creates a task, the task is in a project. The company from the task should be the one from the project, as we will (in the next commit) restrict the company of a task: it will only allow a project to have task in the same company as its. Task-1999686 --- addons/sale_timesheet/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_timesheet/models/sale_order.py b/addons/sale_timesheet/models/sale_order.py index 2d7e6ab9bcf..9ca508870da 100644 --- a/addons/sale_timesheet/models/sale_order.py +++ b/addons/sale_timesheet/models/sale_order.py @@ -270,7 +270,7 @@ class SaleOrderLine(models.Model): 'description': description, 'project_id': project.id, 'sale_line_id': self.id, - 'company_id': self.company_id.id, + 'company_id': project.company_id.id, 'user_id': False, # force non assigned task, as created as sudo() }