diff options
| author | Anh Thao Pham (pta) <pta@odoo.com> | 2020-09-29 14:49:32 +0000 |
|---|---|---|
| committer | Anh Thao Pham (pta) <pta@odoo.com> | 2020-10-01 12:07:17 +0000 |
| commit | d16debfaaec393217a119c4ce6f5ff8b00c18964 (patch) | |
| tree | 1c0c85426bdaffe1f7d2eb357da79cdf931ebfc6 /addons/sale_project/models | |
| parent | 7925e30482ad0df4b2a004c223c3eb87f3ce725f (diff) | |
[FIX] sale_project: add Tasks associated to SO in Tasks smart button
- Install sale_project
- Go to Project > All Tasks and open an Task
- Toggle Studio:
* Activate "Show invisible elements" in View menu tab
* Select "Sales Order" field and uncheck invisible option
- Go to Sales and create a Quotation (i.e. SO0001)
- Go to Project > All Tasks and create a Task with SO0001 as SO
- Go back to Quotation SO0001
The created Task is not counted in the Tasks smart button.
Tasks smart button on SO only shows Tasks associated to a SO line
and does not show Tasks associated to SO.
opw-2335040
closes odoo/odoo#58925
X-original-commit: 1ffa2b5677d028c51a06f884d635cd8429730aae
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Diffstat (limited to 'addons/sale_project/models')
| -rw-r--r-- | addons/sale_project/models/sale_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_project/models/sale_order.py b/addons/sale_project/models/sale_order.py index d173ddd6838..857a8747348 100644 --- a/addons/sale_project/models/sale_order.py +++ b/addons/sale_project/models/sale_order.py @@ -21,7 +21,7 @@ class SaleOrder(models.Model): @api.depends('order_line.product_id.project_id') def _compute_tasks_ids(self): for order in self: - order.tasks_ids = self.env['project.task'].search([('sale_line_id', 'in', order.order_line.ids)]) + order.tasks_ids = self.env['project.task'].search(['|', ('sale_line_id', 'in', order.order_line.ids), ('sale_order_id', '=', order.id)]) order.tasks_count = len(order.tasks_ids) @api.depends('order_line.product_id.service_tracking') |
