From 4ef126925944901407871eb0b48f365e2a7d7639 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 20 Apr 2011 17:08:47 +0530 Subject: [PATCH] [FIX] payroll_account: improve code bzr revid: mra@mra-laptop-20110420113847-fu562g080n3svr8b --- addons/hr_payroll_account/hr_payroll_account.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/addons/hr_payroll_account/hr_payroll_account.py b/addons/hr_payroll_account/hr_payroll_account.py index 3f6010b..affe06c 100644 --- a/addons/hr_payroll_account/hr_payroll_account.py +++ b/addons/hr_payroll_account/hr_payroll_account.py @@ -282,10 +282,8 @@ class hr_payslip(osv.osv): if line.move_id.state == 'posted': move_pool.button_cancel(cr, uid [line.move_id.id], context) move_pool.unlink(cr, uid, [line.move_id.id], context=context) - slip_move.unlink(cr, uid, move_ids, context=context) - self.write(cr, uid, ids, {'state':'cancel'}, context=context) - return True + return self.write(cr, uid, ids, {'state':'cancel'}, context=context) def process_sheet(self, cr, uid, ids, context=None): move_pool = self.pool.get('account.move') @@ -446,12 +444,10 @@ class hr_payslip(osv.osv): return True def account_check_sheet(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'accont_check'}, context=context) - return True + return self.write(cr, uid, ids, {'state':'accont_check'}, context=context) def hr_check_sheet(self, cr, uid, ids, context=None): - self.write(cr, uid, ids, {'state':'hr_check'}, context=context) - return True + return self.write(cr, uid, ids, {'state':'hr_check'}, context=context) def verify_sheet(self, cr, uid, ids, context=None): move_pool = self.pool.get('account.move') -- 1.7.10.4