Fixex when discounts is None

This commit is contained in:
Oscar Alvarez 2020-07-17 16:16:16 -05:00
parent c6d13792da
commit 636120bbd0
1 changed files with 2 additions and 2 deletions

View File

@ -408,7 +408,7 @@ class Payroll(Workflow, ModelSQL, ModelView):
result.extend(_line)
return result
def _create_payroll_lines(self, wages, extras, discounts={}):
def _create_payroll_lines(self, wages, extras, discounts=None):
PayrollLine = Pool().get('staff.payroll.line')
values = []
salary_args = {}
@ -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: