From 22c2b27b3a70b11603b18da9eff7373f15ccce80 Mon Sep 17 00:00:00 2001 From: mtr Date: Mon, 16 May 2011 18:57:39 +0530 Subject: [PATCH 1/2] [IMP] hr_payroll: changed label of field quantity on Payslip input into 'Amount' bzr revid: mtr@mtr-20110516132739-bay9gf9tpolxagsx --- addons/hr_payroll/hr_payroll.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index b70b30676a8..cd7c08144bf 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -660,7 +660,7 @@ class hr_payslip_input(osv.osv): 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True), 'sequence': fields.integer('Sequence', required=True,), 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"), - 'quantity': fields.float('Quantity', help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs['S-ASUS']['qunatity']*contract.wage*0.01."), + 'quantity': fields.float('Amount', help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs['S-ASUS']['qunatity']*contract.wage*0.01."), 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"), } _order = 'payslip_id, sequence' From ad6b2593c2bcbf63dc22e50a2fafc18ee396112a Mon Sep 17 00:00:00 2001 From: mtr Date: Tue, 24 May 2011 11:32:02 +0530 Subject: [PATCH 2/2] [IMP] hr_payroll: renamed the field 'quantity' to 'amount' bzr revid: mtr@mtr-20110524060202-z58x324zvkugddd1 --- addons/hr_payroll/hr_payroll.py | 6 +++--- addons/hr_payroll/hr_payroll_demo.xml | 2 +- addons/hr_payroll/hr_payroll_view.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index b11f4202b73..4fd1d0a9a47 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -490,7 +490,7 @@ class hr_payslip(osv.osv): if to_date is None: to_date = datetime.now().strftime('%Y-%m-%d') result = 0.0 - self.cr.execute("SELECT sum(quantity) as sum\ + self.cr.execute("SELECT sum(amount) as sum\ FROM hr_payslip as hp, hr_payslip_input as pi \ WHERE hp.employee_id = %s AND hp.state in ('confirm','done') \ AND hp.date_from >= %s AND hp.date_to <= %s AND hp.id = pi.payslip_id AND pi.code = %s", @@ -727,13 +727,13 @@ class hr_payslip_input(osv.osv): 'payslip_id': fields.many2one('hr.payslip', 'Pay Slip', required=True), 'sequence': fields.integer('Sequence', required=True,), 'code': fields.char('Code', size=52, required=True, help="The code that can be used in the salary rules"), - 'quantity': fields.float('Quantity', help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SASUS.qunatity * contract.wage*0.01."), + 'amount': fields.float('Amount', help="It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SASUS.amount * contract.wage*0.01."), 'contract_id': fields.many2one('hr.contract', 'Contract', required=True, help="The contract for which applied this input"), } _order = 'payslip_id, sequence' _defaults = { 'sequence': 10, - 'quantity': 0.0, + 'amount': 0.0, } hr_payslip_input() diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index 3d5240c76fc..6408cb78094 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -67,7 +67,7 @@ Get 1% of sales - result = (inputs.SALEURO.quantity + inputs.SALASIA.quantity) * contract.wage * 0.01 + result = (inputs.SALEURO.amount + inputs.SALASIA.amount) * contract.wage * 0.01 diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index 4d422d708de..01bbcd1844b 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -297,7 +297,7 @@ - + @@ -307,7 +307,7 @@ - +