[FIX] hr_holidays: Wrong allocation request created when allocating holidays per category of employee

lp bug: https://launchpad.net/bugs/767238 fixed

bzr revid: pso@tinyerp.com-20110426053714-i0jpn1fh620mk1j4
This commit is contained in:
pso (OpenERP)
2011-04-26 11:07:14 +05:30
parent 7549fe14d7
commit bcbccd8eb8
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -167,6 +167,8 @@ class hr_holidays(osv.osv):
result['value'] = {
'employee_id': ids_employee[0]
}
else:
result['value'] = {'employee_id': False}
return result
# TODO: can be improved using resource calendar method
+4
View File
@@ -36,6 +36,7 @@
</group>
<newline />
<group expand="0" string="Group By...">
<filter name="group_category" string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category_id'}"/>
<filter name="group_employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
<filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'manager_id'}"/>
<filter string="Department" icon="terp-personal+" domain="[]" context="{'group_by':'department_id','set_visible':True}"/>
@@ -153,7 +154,9 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="red:state in ('refuse');blue:state in ('draft');black:state in ('confirm','validate','validate1')" string="Leaves" >
<field name="holiday_type"/>
<field name="employee_id"/>
<field name="category_id"/>
<field name="department_id" invisible="1"/>
<field name="holiday_status_id"/>
<field name="name"/>
@@ -232,6 +235,7 @@
<field name="arch" type="xml">
<tree colors="red:state in ('refuse');blue:state in (' draft');black:state in ('confirm','validate','validate1')">
<field name="employee_id"/>
<field name="category_id"/>
<field name="department_id" invisible="not context.get('set_visible',False)"/>
<field name="holiday_status_id"/>
<field name="name"/>