Dhruti Shastri has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-576939-dhs into 
lp:openobject-addons/6.1.

Requested reviews:
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576939-dhs/+merge/118089
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576939-dhs/+merge/118089
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-576939-dhs.
=== modified file 'hr_payroll/hr_payroll.py'
--- hr_payroll/hr_payroll.py	2012-01-31 13:36:57 +0000
+++ hr_payroll/hr_payroll.py	2012-08-03 13:18:49 +0000
@@ -586,6 +586,8 @@
                 if obj_rule.satisfy_condition(cr, uid, rule.id, localdict, context=context) and rule.id not in blacklist:
                     #compute the amount of the rule
                     amount, qty, rate = obj_rule.compute_rule(cr, uid, rule.id, localdict, context=context)
+                    if type(amount) != float:
+                         raise osv.except_osv(_('Error'), _('Wrong python code defined for salary rule %s (%s) ')% (rule.name, rule.code))
                     #check if there is already a rule computed with that code
                     previous_amount = rule.code in localdict and localdict[rule.code] or 0.0
                     #set/overwrite the amount computed for this rule in the localdict

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to