[IMP] hr_payroll: renamed the field 'quantity' to 'amount'
bzr revid: mtr@mtr-20110524060202-z58x324zvkugddd1
This commit is contained in:
parent
9f1a74ca3e
commit
ad6b2593c2
|
@ -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()
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<field name="category_id" ref="hr_payroll.ALW"/>
|
||||
<field name="name">Get 1% of sales</field>
|
||||
<field name="sequence" eval="17"/>
|
||||
<field name="amount_python_compute">result = (inputs.SALEURO.quantity + inputs.SALASIA.quantity) * contract.wage * 0.01</field>
|
||||
<field name="amount_python_compute">result = (inputs.SALEURO.amount + inputs.SALASIA.amount) * contract.wage * 0.01</field>
|
||||
</record>
|
||||
|
||||
<!-- Rule Inputs -->
|
||||
|
|
|
@ -297,7 +297,7 @@
|
|||
<tree string="Input Data" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="quantity"/>
|
||||
<field name="amount"/>
|
||||
<field name="contract_id" groups="base.group_extended"/>
|
||||
<field name="sequence" invisible="True"/>
|
||||
</tree>
|
||||
|
@ -307,7 +307,7 @@
|
|||
<field name="code" select="1"/>
|
||||
<field name="payslip_id"/>
|
||||
<field name="sequence" groups="base.group_extended"/>
|
||||
<field name="quantity"/>
|
||||
<field name="amount"/>
|
||||
<field name="contract_id" groups="base.group_extended"/>
|
||||
</group>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue