[FIX] hr_holidays: multiple fixes for search filters
- Wrong 'year' filter that implemented in fact an 'active types' filter - Add a real 'year' filter - 'my leaves' uses directly the 'user_id' related field - 'My Department Leaves' filter that mixed ids from different models Closes #7685
This commit is contained in:
parent
f2108e9edd
commit
755b09c8dc
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8' ?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
@ -26,11 +27,18 @@
|
||||||
<filter domain="[('state','in',('confirm','validate1'))]" string="To Approve" name="approve"/>
|
<filter domain="[('state','in',('confirm','validate1'))]" string="To Approve" name="approve"/>
|
||||||
<filter domain="[('state','=','validate')]" string="Validated" name="validated"/>
|
<filter domain="[('state','=','validate')]" string="Validated" name="validated"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<filter name="year" string="Year" domain="[('holiday_status_id.active','=',True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>
|
<filter name="active_types" string="Active Types" domain="[('holiday_status_id.active', '=', True)]" help="Filters only on allocations and requests that belong to an holiday type that is 'active' (active field is True)"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<filter string="My Requests" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leave Requests"/>
|
<filter name="year" string="Year"
|
||||||
|
domain="['|','&',('date_to', '<=', time.strftime('%%Y-12-31')),
|
||||||
|
('date_to', '>=', time.strftime('%%Y-01-01')),
|
||||||
|
'&',('date_from', '<=', time.strftime('%%Y-12-31')),
|
||||||
|
('date_from', '>=', time.strftime('%%Y-01-01'))]"
|
||||||
|
help="Current Year Leaves"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<filter string="My Department Leaves" help="My Department Leaves" domain="[('department_id.manager_id','=',uid)]"/>
|
<filter string="My Requests" name="my_leaves" domain="[('user_id', '=', uid)]" help="My Leave Requests"/>
|
||||||
|
<separator/>
|
||||||
|
<filter string="My Department Leaves" name="my_department_leaves" domain="[('department_id.manager_id.user_id', '=', uid)]"/>
|
||||||
<field name="employee_id"/>
|
<field name="employee_id"/>
|
||||||
<field name="department_id"/>
|
<field name="department_id"/>
|
||||||
<field name="holiday_status_id"/>
|
<field name="holiday_status_id"/>
|
||||||
|
|
|
@ -42,6 +42,11 @@ msgstr ""
|
||||||
msgid "Active"
|
msgid "Active"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: hr_holidays
|
||||||
|
#: view:hr.holidays:hr_holidays.view_hr_holidays_filter
|
||||||
|
msgid "Active Types"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: hr_holidays
|
#. module: hr_holidays
|
||||||
#: view:hr.holidays:hr_holidays.allocation_company_new
|
#: view:hr.holidays:hr_holidays.allocation_company_new
|
||||||
#: view:hr.holidays:hr_holidays.edit_holiday_new
|
#: view:hr.holidays:hr_holidays.edit_holiday_new
|
||||||
|
@ -249,6 +254,11 @@ msgstr ""
|
||||||
msgid "Current Leave Type"
|
msgid "Current Leave Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: hr_holidays
|
||||||
|
#: view:hr.holidays:hr_holidays.view_hr_holidays_filter
|
||||||
|
msgid "Current Year Leaves"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: hr_holidays
|
#. module: hr_holidays
|
||||||
#: help:hr.holidays,message_last_post:0
|
#: help:hr.holidays,message_last_post:0
|
||||||
msgid "Date of the last message posted on the record."
|
msgid "Date of the last message posted on the record."
|
||||||
|
|
Loading…
Reference in New Issue