[fix] salary slip eval, remove access to globals, #8313

This commit is contained in:
Rushabh Mehta 2017-04-05 12:59:10 +05:30 committed by Nabin Hait
parent 549a2827e5
commit 08a42e00ae

View File

@ -76,7 +76,7 @@ class SalarySlip(TransactionBase):
def eval_condition_and_formula(self, d, data): def eval_condition_and_formula(self, d, data):
try: try:
if d.condition: if d.condition:
if not eval(d.condition, None, data): if not eval(d.condition, {}, data):
return None return None
amount = d.amount amount = d.amount
if d.amount_based_on_formula: if d.amount_based_on_formula: