From 6cbbeb16a8763dcbdf23d97c57bc29c0bbeadc49 Mon Sep 17 00:00:00 2001 From: mtr Date: Fri, 20 May 2011 17:25:14 +0530 Subject: [PATCH] [IMP] hr_payroll: improved tooltip for 'state' field and renamed method name. bzr revid: mtr@mtr-20110520115514-t5kw865rhuv53q5x --- addons/hr_payroll/hr_payroll.py | 12 +++++------- addons/hr_payroll/hr_payroll_workflow.xml | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 9ac05332801..940acf2403f 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -266,12 +266,10 @@ class hr_payslip(osv.osv): # ('done', 'Paid Salary'), # ('cancel', 'Reject'), ], 'State', select=True, readonly=True, - help=' * When the payslip is created the state is \'Waiting for verification\'.\ - \n* It is varified by the user and payslip is sent for HR varification, the state is \'Waiting for HR Verification\'. \ - \n* If HR varify the payslip, it is sent for account verification, the state is \'Waiting for Account Verification\'. \ - \n* It is confirmed by the accountant and the state set to \'Confirm Sheet\'.\ - \n* If the salary is paid then state is set to \'Paid Salary\'.\ - \n* The \'Reject\' state is used when user cancel payslip.'), + help='* When the payslip is created the state is \'Draft\'.\ + \n* If a condition is not satisfied, the state is \'Verify\'. \ + \n* If a condition is satisfied then state is set to \'Done\'.\ + \n* When user cancel payslip the state is \'Reject\'.'), # 'line_ids': fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}), 'line_ids': one2many_mod2('hr.payslip.line', 'slip_id', 'Payslip Lines', readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}), @@ -354,7 +352,7 @@ class hr_payslip(osv.osv): def verify_sheet(self, cr, uid, ids, context=None): return self.write(cr, uid, ids, {'state': 'confirm'}, context=context) - def check(self, cr, uid, ids, context=None): + def check_done(self, cr, uid, ids, context=None): return True #TODO move this function into hr_contract module, on hr.employee object diff --git a/addons/hr_payroll/hr_payroll_workflow.xml b/addons/hr_payroll/hr_payroll_workflow.xml index 991e6921dfd..d2e71aec897 100644 --- a/addons/hr_payroll/hr_payroll_workflow.xml +++ b/addons/hr_payroll/hr_payroll_workflow.xml @@ -109,7 +109,7 @@ - check() + check_done()