[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
This commit is contained in:
jem-odoo
2019-08-20 06:51:55 +00:00
parent ddeb7b7cb0
commit 0c5d6498d5
+1 -1
View File
@@ -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()
}