← Back to team overview

openerp-india team mailing list archive

[Bug 1051550] [NEW] int and float missing from hr_payroll.tools.safe_eval context

 

Public bug reported:

I have attempted to implement local tax rules using a series of salary
rules, but to correctly calculate values for Australian taxes, I need
access to something that will strip cents from a calculated figure.

int() does this nicely, but it is not listed in
hr_payoll.tools.safe_eval as one of the allowed builtins. But bool, str,
tuple, dict and several others are.

Please add in all the safe but useful builtins, like int() and float()
if you insist on monkey patching eval().

This is in OpenERP 6.1

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1051550

Title:
  int and float missing from hr_payroll.tools.safe_eval context

Status in OpenERP Addons (modules):
  New

Bug description:
  I have attempted to implement local tax rules using a series of salary
  rules, but to correctly calculate values for Australian taxes, I need
  access to something that will strip cents from a calculated figure.

  int() does this nicely, but it is not listed in
  hr_payoll.tools.safe_eval as one of the allowed builtins. But bool,
  str, tuple, dict and several others are.

  Please add in all the safe but useful builtins, like int() and float()
  if you insist on monkey patching eval().

  This is in OpenERP 6.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1051550/+subscriptions


Follow ups

References