[MERGE] lp:767238
bzr revid: qdp-launchpad@openerp.com-20110427080332-qdwytwgd97ekj35v
This commit is contained in:
commit
f9a1e706a8
|
@ -162,7 +162,7 @@ class hr_holidays(osv.osv):
|
|||
return obj_res_leave.unlink(cr, uid, leave_ids)
|
||||
|
||||
def onchange_type(self, cr, uid, ids, holiday_type):
|
||||
result = {}
|
||||
result = {'value': {'employee_id': False}}
|
||||
if holiday_type == 'employee':
|
||||
ids_employee = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)])
|
||||
if ids_employee:
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<newline />
|
||||
<group expand="0" string="Group By...">
|
||||
<filter name="group_employee" string="Employee" icon="terp-personal" domain="[]" context="{'group_by':'employee_id'}"/>
|
||||
<filter name="group_category" string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category_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}"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -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"/>
|
||||
|
@ -231,7 +234,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')">
|
||||
<field name="holiday_type"/>
|
||||
<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"/>
|
||||
|
|
Loading…
Reference in New Issue