[MERGE] l10n_in_hr_payroll: Override copy method for payslip and batch
bzr revid: mra@tinyerp.com-20120727081659-axbcwge85u8mzke4
This commit is contained in:
@@ -216,6 +216,11 @@ class hr_payslip_run(osv.osv):
|
||||
_columns = {
|
||||
'available_advice': fields.boolean('Made Payment Advice?', help="If this box is checked which means that Payment Advice exists for current batch", readonly=False),
|
||||
}
|
||||
def copy(self, cr, uid, id, default={}, context=None):
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({'available_advice': False})
|
||||
return super(hr_payslip_run, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def draft_payslip_run(self, cr, uid, ids, context=None):
|
||||
res = super(hr_payslip_run, self).draft_payslip_run(cr, uid, ids, context=context)
|
||||
@@ -303,6 +308,12 @@ class hr_payslip(osv.osv):
|
||||
'advice_id': fields.many2one('hr.payroll.advice', 'Bank Advice')
|
||||
}
|
||||
|
||||
def copy(self, cr, uid, id, default={}, context=None):
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({'advice_id' : False})
|
||||
return super(hr_payslip, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
hr_payslip()
|
||||
|
||||
class res_company(osv.osv):
|
||||
@@ -317,4 +328,4 @@ class res_company(osv.osv):
|
||||
|
||||
res_company()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user