Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I've created a salary rule (IRG) depending on another rule (SALIMPARND) as follow:
if SALIMPARND <= 15000:
resutlt = 0
elif 15000 < SALIMPARND and SALIMPARND <= 22500:
result = (SALIMPARND - 15000) * 0.2
elif 22500 < SALIMPARND and SALIMPARND <= 28750:
result = (SALIMPARND - 22500) * 0.12 + 1500
elif 28750 < SALIMPARND and SALIMPARND <= 30000:
result = (SALIMPARND - 29000) * 0.2 + 2300
elif 30000 < SALIMPARND and SALIMPARND <= 120000:
result = (SALIMPARND - 30000) * 0.3 + 2500
result = (SALIMPARND - 120000) * 0.35 + 29500
All working fine, and the payslips are calculated accurately, except for the first condition (when SALIMPARND <= 15000) the given result for the rule IRG is equal to 1 instead of 0.
After some search i've found this good description of the BUG (reported on 2012-09-01 thanks to Robajz.info) (https://bugs.launchpad.net/openobject-addons/+bug/1044611), but infortunately the fix didn't work for me.
Why this old issue is not fixed till today?
Is the error related to the method compute_rule or to safe_eval ?
Any idea on how to fix this issue ?
NB: using OpenERP V7.0, but i think that this issue is reproducible under other Odoo versions.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 11/25/14, 11:09 AM|
|Seen: 1952 times|
|Last updated: 3/16/15, 8:10 AM|