diff --git a/payroll.py b/payroll.py index 6c87bf4..0198c83 100644 --- a/payroll.py +++ b/payroll.py @@ -424,7 +424,7 @@ class Payroll(Workflow, ModelSQL, ModelView): unit_value = fix_amount discount = None - if discounts.get(wage.id): + if discounts and discounts.get(wage.id): discount = discounts.get(wage.id) qty = self.get_line_quantity_special(wage) if qty == 0: