@@ -1108,7 +1108,7 @@
Overpassed Tasks
project.task
tree,form,calendar,graph,kanban
- [('is_closed', '=', False), ('date_deadline','<',time.strftime('%Y-%m-%d'))]
+ [('is_closed', '=', False), ('date_deadline','<',time.strftime('%Y-%m-%d')), ('display_project_id', '!=', False)]
@@ -1136,6 +1136,7 @@
project.task
tree,form,calendar,graph
{'search_default_user_id': [active_id], 'default_user_id': active_id}
+ [('display_project_id', '!=', False)]
form
diff --git a/addons/sale_project/models/sale_order.py b/addons/sale_project/models/sale_order.py
index 4433aecd133..bb320626848 100644
--- a/addons/sale_project/models/sale_order.py
+++ b/addons/sale_project/models/sale_order.py
@@ -23,7 +23,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), ('sale_order_id', '=', order.id)])
+ order.tasks_ids = self.env['project.task'].search(['&', ('display_project_id', '!=', 'False'), '|', ('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')
diff --git a/addons/sale_timesheet/tests/common.py b/addons/sale_timesheet/tests/common.py
index 35bf03c032e..86032bb572c 100644
--- a/addons/sale_timesheet/tests/common.py
+++ b/addons/sale_timesheet/tests/common.py
@@ -111,7 +111,6 @@ class TestCommonSaleTimesheet(TestSaleCommon):
'allow_timesheets': True,
'allow_billable': False,
'partner_id': False,
- 'subtask_project_id': cls.project_subtask.id,
})
# Create service products
diff --git a/addons/sale_timesheet/tests/test_project_billing.py b/addons/sale_timesheet/tests/test_project_billing.py
index fcb386a17a7..acc4ec6e8e3 100644
--- a/addons/sale_timesheet/tests/test_project_billing.py
+++ b/addons/sale_timesheet/tests/test_project_billing.py
@@ -3,7 +3,6 @@
from odoo.addons.sale_timesheet.tests.common import TestCommonSaleTimesheet
from odoo.tests import tagged
-
@tagged('post_install', '-at_install')
class TestProjectBilling(TestCommonSaleTimesheet):
""" This test suite provide checks for miscellaneous small things. """
@@ -85,7 +84,6 @@ class TestProjectBilling(TestCommonSaleTimesheet):
cls.project_employee_rate.write({
'sale_order_id': cls.sale_order_1.id,
'partner_id': cls.sale_order_1.partner_id.id,
- 'subtask_project_id': cls.project_subtask.id,
})
cls.project_employee_rate_manager = cls.env['project.sale.line.employee.map'].create({
'project_id': cls.project_employee_rate.id,
@@ -265,7 +263,7 @@ class TestProjectBilling(TestCommonSaleTimesheet):
self.assertEqual(self.project_employee_rate_manager.project_id, timesheet1.project_id, "The timesheet should be linked to the project of the map entry")
# create a subtask
- subtask = Task.with_context(default_project_id=self.project_employee_rate.subtask_project_id.id).create({
+ subtask = Task.with_context(default_project_id=self.project_subtask.id).create({
'name': 'first subtask task',
'parent_id': task.id,
})
@@ -342,9 +340,6 @@ class TestProjectBilling(TestCommonSaleTimesheet):
Task = self.env['project.task'].with_context(tracking_disable=True)
Timesheet = self.env['account.analytic.line']
- # set subtask project on task rate project
- self.project_task_rate.write({'subtask_project_id': self.project_subtask.id})
-
# create a task
task = Task.with_context(default_project_id=self.project_task_rate.id).create({
'name': 'first task',
@@ -366,7 +361,7 @@ class TestProjectBilling(TestCommonSaleTimesheet):
self.assertEqual(task.sale_line_id, timesheet1.so_line, "The timesheet should be linked to the SOL associated to the task since the pricing type of the project is task rate.")
# create a subtask
- subtask = Task.with_context(default_project_id=self.project_task_rate.subtask_project_id.id).create({
+ subtask = Task.with_context(default_project_id=self.project_subtask.id).create({
'name': 'first subtask task',
'parent_id': task.id,
})
diff --git a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js
index 5c2feab32f1..544128c0dee 100644
--- a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js
+++ b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js
@@ -907,7 +907,7 @@ tour.stepUtils.mobileModifier(tour.stepUtils.autoExpandMoreButtons('.o_control_p
auto: true,
}, {
mobile: true,
- trigger: ".o_kanban_record .o_kanban_record_title :contains('the_flow.service')",
+ trigger: ".o_kanban_record:has(.o_kanban_record_title :contains('the_flow.service'))",
extra_trigger: ".modal:not(.o_inactive_modal) .modal-title:contains('Task')",
content: _t("Select the the_flow.vendor"),
position: "bottom",