[IMP] hr_payroll: changes on payslip
bzr revid: osenda-20110324091103-1krcvxhz38lf5bup
This commit is contained in:
@@ -1177,6 +1177,17 @@ class hr_payslip(osv.osv):
|
||||
})
|
||||
return update
|
||||
|
||||
def onchange_contract_id(self, cr, uid, ids, contract_id=False, struct_id=False, context=None):
|
||||
if not contract_id:
|
||||
return {}
|
||||
res = {}
|
||||
contract = self.pool.get('hr.contract').browse(cr,uid, contract_id)
|
||||
res.update({
|
||||
'struct_id':contract.struct_id.id
|
||||
})
|
||||
|
||||
return {'value': res}
|
||||
|
||||
hr_payslip()
|
||||
|
||||
class hr_holidays(osv.osv):
|
||||
@@ -1363,4 +1374,4 @@ class hr_employee(osv.osv):
|
||||
|
||||
hr_employee()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -212,6 +212,9 @@
|
||||
<field name="name"/>
|
||||
<field name="number"/>
|
||||
<field name="date"/>
|
||||
<field name="contract_id" groups="base.group_extended" domain="[('employee_id','=',employee_id)]" on_change="onchange_employee_id(contract_id)"/>
|
||||
<field name="struct_id" groups="base.group_extended"/>
|
||||
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Salary Computation">
|
||||
@@ -275,13 +278,18 @@
|
||||
<field name="paid" readonly="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="register_id" groups="base.group_extended"/>
|
||||
<field name="struct_id" groups="base.group_extended"/>
|
||||
<field name="contract_id" groups="base.group_extended" domain="[('employee_id','=',employee_id)]"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<separator colspan="4" string="Description"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
|
||||
<page string="Applied Salary Rules">
|
||||
</page>
|
||||
<page string="Appears on payslip">
|
||||
</page>
|
||||
<page string="Details by salary head">
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="10" colspan="4">
|
||||
<field name="state"/>
|
||||
|
||||
Reference in New Issue
Block a user