From 852940f1ba1219b106590efc580ec2b5fdfa1740 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 20 Apr 2017 12:17:31 +0200 Subject: [PATCH] [FIX] hr_maintenance: fix search view domain about equipment availability The fields `owner_user_id` used `maintenance` search view to filter on assigned equipment is overwritten in `hr_maintenance` to be computed based on employee or department manager linked user. However employee may not have linked user, considering equipment unassigned. Use directly the presence of employee or department to determine if an equipment is assigned or not. --- .../hr_maintenance/views/maintenance_views.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/hr_maintenance/views/maintenance_views.xml b/addons/hr_maintenance/views/maintenance_views.xml index 2c56a9f2538..72970f9cd77 100644 --- a/addons/hr_maintenance/views/maintenance_views.xml +++ b/addons/hr_maintenance/views/maintenance_views.xml @@ -54,6 +54,20 @@ + + maintenance.equipment.view.search.inherit.hr + maintenance.equipment + + + + ['|', ('employee_id', '!=', False), ('department_id', '!=', False)] + + + [('employee_id', '=', False), ('department_id', '=', False)] + + + + maintenance.equipment.view.form.inherit.hr maintenance.equipment @@ -99,4 +113,4 @@ - \ No newline at end of file +