diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index de8adec7d87..975d51a5306 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -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: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: