[FIX] project: fix the traceback when group by project in the planning
Steps: - Open Field service - Select planning then by user - Group by project - The trace back is coming Issue: - when we trying to group by projects the trace back is raised. Cause: - In '_search_on_comodel' method filtered_domain does't set perfectly, The filtered_domain it is not set for the additional_domain , when we given on additional_domain, on that time filter_domain does not consider the additional_domain, because of that traceback will be coming. Fix: - By adding an 'if' condition for cases when you provide an additional domain, it will work fine. task-3522178 closes odoo/odoo#140661 Related: odoo/enterprise#48652 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
@@ -1161,11 +1161,9 @@ class Task(models.Model):
|
||||
f"{field}.id": "id",
|
||||
f"{field}.name": "name",
|
||||
})
|
||||
if not filtered_domain:
|
||||
return False
|
||||
if additional_domain:
|
||||
filtered_domain = expression.AND([filtered_domain, additional_domain])
|
||||
return self.env[comodel].search(_change_operator(filtered_domain), order=order)
|
||||
filtered_domain = expression.AND([_change_operator(filtered_domain), additional_domain])
|
||||
return self.env[comodel].search(filtered_domain, order=order) if filtered_domain else False
|
||||
|
||||
# ---------------------------------------------------
|
||||
# Subtasks
|
||||
|
||||
Reference in New Issue
Block a user