openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #01728
[Merge] lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-ara into lp:~openerp-dev/openobject-addons/trunk-dev-addons3
ARA(OpenERP) has proposed merging lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-ara into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
Requested reviews:
OpenERP R&D Team (openerp-dev)
Related bugs:
#615522 Report Of Invoice : Payment Term + Due date not printed
https://bugs.launchpad.net/bugs/615522
#649029 [sale] incoterm field poorly implemented [direct sql / not translatable]
https://bugs.launchpad.net/bugs/649029
#672553 opening entries from chart of account doesn't use context
https://bugs.launchpad.net/bugs/672553
#674480 [6.0 RC2] incorrect creation of Accounting Journals is some localizations prevents multiple charts from being installed
https://bugs.launchpad.net/bugs/674480
#675494 [Trunk] - If you delete an invoice entry, invoice still exists
https://bugs.launchpad.net/bugs/675494
#681398 sale access right
https://bugs.launchpad.net/bugs/681398
#689536 [6.0] partner layout salesman/salesteam issue
https://bugs.launchpad.net/bugs/689536
#690326 [6.0RC1] View mode "tree,form,search" in several window actions
https://bugs.launchpad.net/bugs/690326
#690753 [6.0] and [5.x] account_analytic_line must not be deleted if the journal etc is deleted
https://bugs.launchpad.net/bugs/690753
#691072 [6.0RC1][TRUNK][account_voucher] Wrong definition of field 'company_id' in 'account_voucher_line' object
https://bugs.launchpad.net/bugs/691072
#692986 [6.0] hr_payroll_account hr_payroll_account_view.xml - required fields block opening form
https://bugs.launchpad.net/bugs/692986
#694833 Salary Structure deduction percentage limitation
https://bugs.launchpad.net/bugs/694833
For more details, see:
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-ara/+merge/44888
hello,
fix: Salary Structure deduction percentage limitation
https://bugs.launchpad.net/openobject-addons/+bug/694833
thanks,
ara
--
https://code.launchpad.net/~openerp-commiter/openobject-addons/trunk-dev-addons3-ara/+merge/44888
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-ara into lp:~openerp-dev/openobject-addons/trunk-dev-addons3.
=== modified file 'hr_payroll/hr_payroll.py'
--- hr_payroll/hr_payroll.py 2010-12-24 12:05:44 +0000
+++ hr_payroll/hr_payroll.py 2010-12-30 09:11:18 +0000
@@ -166,7 +166,6 @@
for line in lines:
cd = line.code.lower()
obj[cd] = line.amount or 0.0
-
for line in lines:
if line.category_id.code in ad:
continue
@@ -196,7 +195,7 @@
if sal_type in ('gross', 'net'):
if line.amount_type == 'per':
- percent = line.amount
+ percent = line.amount/100
if amt > 1:
value = percent * amt
elif amt > 0 and amt <= 1:
@@ -280,7 +279,7 @@
amount = 0.0
if line.amount_type == 'per':
try:
- amount = line.amount * eval(str(line.category_id.base), obj)
+ amount = (line.amount/100) * eval(str(line.category_id.base), obj)
except Exception, e:
raise osv.except_osv(_('Variable Error !'), _('Variable Error: %s ') % (e))
elif line.amount_type in ('fix', 'func'):
@@ -1295,13 +1294,6 @@
})
return {'value':res}
- def onchange_amount(self, cr, uid, ids, amount, typ):
- amt = amount
- if typ and typ == 'per':
- if int(amt) > 0:
- amt = amt / 100
- return {'value':{'amount':amt}}
-
_columns = {
'slip_id':fields.many2one('hr.payslip', 'Pay Slip', required=False),
'function_id':fields.many2one('hr.payroll.structure', 'Function', required=False),
@@ -1327,7 +1319,7 @@
('fix','Fixed Amount'),
('func','Function Value'),
],'Amount Type', select=True, required=True),
- 'amount': fields.float('Amount / Percentage', digits=(16, 4)),
+ 'amount': fields.float('Amount / Percentage(in %)', digits=(16, 4)),
'total': fields.float('Sub Total', readonly=True, digits_compute=dp.get_precision('Account')),
'company_contrib': fields.float('Company Contribution', readonly=True, digits=(16, 4)),
'sequence': fields.integer('Sequence'),
@@ -1410,7 +1402,7 @@
raise osv.except_osv(_('Variable Error !'), _('Variable Error: %s ') % (e))
amount = 0.0
if line.amount_type == 'per':
- amount = amt * line.amount
+ amount = amt * (line.amount/100)
elif line.amount_type == 'func':
amount = slip_line_pool.execute_function(cr, uid, line.id, amt, context)
elif line.amount_type == 'fix':
=== modified file 'hr_payroll/hr_payroll_view.xml'
--- hr_payroll/hr_payroll_view.xml 2010-12-20 09:46:04 +0000
+++ hr_payroll/hr_payroll_view.xml 2010-12-30 09:11:18 +0000
@@ -183,7 +183,7 @@
<field name="code"/>
<field name="type"/>
<field name="amount_type"/>
- <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
+ <field name="amount"/>
</tree>
<form string="Payslip Line">
<group col="6" colspan="4">
@@ -195,7 +195,7 @@
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<field name="amount_type"/>
- <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
+ <field name="amount" attrs="{'readonly':[('amount_type','=','func')]}"/>
<field name="sequence" groups="base.group_extended"/>
</group>
<group col="2" colspan="2">
@@ -337,7 +337,7 @@
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<field name="amount_type"/>
- <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
+ <field name="amount" attrs="{'readonly':[('amount_type','=','func')]}"/>
<field name="sequence" groups="base.group_extended"/>
</group>
<group col="2" colspan="2">
@@ -425,7 +425,7 @@
<field name="code"/>
<field name="type"/>
<field name="amount_type"/>
- <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
+ <field name="amount"/>
</tree>
</field>
</record>
@@ -447,7 +447,7 @@
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<field name="amount_type"/>
- <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
+ <field name="amount" attrs="{'readonly':[('amount_type','=','func')]}"/>
<field name="sequence" groups="base.group_extended"/>
</group>
<group col="2" colspan="2">
@@ -517,7 +517,7 @@
<field name="code"/>
<field name="type"/>
<field name="amount_type"/>
- <field name="amount" on_change="onchange_amount(amount, amount_type)"/>
+ <field name="amount"/>
<field name="total"/>
</tree>
<form string="Payslip Line">
@@ -530,7 +530,7 @@
<field name="category_id" on_change="onchange_category(category_id)"/>
<field name="type"/>
<field name="amount_type"/>
- <field name="amount" on_change="onchange_amount(amount, amount_type)" attrs="{'readonly':[('amount_type','=','func')]}"/>
+ <field name="amount" attrs="{'readonly':[('amount_type','=','func')]}"/>
<field name="sequence" groups="base.group_extended"/>
</group>
<group col="2" colspan="2">