[FIX] sale_project: correct the domain of task's sale order

Steps:
- Create a contact with 2 sub contacts Sub1 and Sub2.
- Create a service product with project creation on order.
- Create a quotation for Sub1 and the created product and confirm.
- Go to the created project and create a task.
- Edit the task and change the customer to Sub2.
- Empty the sale order item.

Issue:
The sale order doesn't appear in the drop list.

Cause:
Wrong domain on ``ProjectTask.sale_line_id``.

opw-3441194

closes odoo/odoo#139670

X-original-commit: 8b6bd8c92402a92efed71f97de61eaeffb0caea7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
Eteil Djoumatchoua(etdj)
2023-10-25 19:37:28 +00:00
committed by Eteil Djoumatchoua(etdj) etdj@odoo.com
parent 7389345696
commit 893781c9a8
+1 -1
View File
@@ -753,7 +753,7 @@ class ProjectTask(models.Model):
copy=True, tracking=True, index='btree_not_null', recursive=True,
compute='_compute_sale_line', store=True, readonly=False,
domain="""[
'|', ('order_partner_id', 'child_of', partner_id if partner_id else []),
'|', ('order_partner_id.commercial_partner_id.id', 'parent_of', partner_id if partner_id else []),
('order_partner_id', '=?', partner_id),
('is_service', '=', True), ('is_expense', '=', False), ('state', '=', 'sale'),
]""",