From b6595ed6d5d86f06002a53e752bfacffddac7440 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Wed, 29 Dec 2010 16:46:31 +0530 Subject: [PATCH] [FIX] hr_payroll_account: if journal_id or bank_journal_id are not specified in pay slip, call super method which are declared in hr_payroll module. it fixed due to solve yml issue bzr revid: hmo@tinyerp.com-20101229111631-zam0fzc3iu11vsr5 --- addons/hr_payroll_account/hr_payroll_account.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/addons/hr_payroll_account/hr_payroll_account.py b/addons/hr_payroll_account/hr_payroll_account.py index adf1fada169..35f638a3326 100644 --- a/addons/hr_payroll_account/hr_payroll_account.py +++ b/addons/hr_payroll_account/hr_payroll_account.py @@ -256,6 +256,10 @@ class hr_payslip(osv.osv): period_pool = self.pool.get('account.period') for slip in self.browse(cr, uid, ids, context=context): + if not slip.bank_journal_id or not slip.journal_id: + # Call super method to process sheet if journal_id or bank_journal_id are not specified. + super(hr_payslip, self).process_sheet(cr, uid, [slip.id], context=context) + continue line_ids = [] partner = False partner_id = False @@ -411,6 +415,10 @@ class hr_payslip(osv.osv): payslip_pool = self.pool.get('hr.payslip.line') for slip in self.browse(cr, uid, ids, context=context): + if not slip.journal_id: + # Call super method to verify sheet if journal_id is not specified. + super(hr_payslip, self).verify_sheet(cr, uid, [slip.id], context=context) + continue total_deduct = 0.0 line_ids = []