minor fix recompute

This commit is contained in:
Wilson Gomez 2023-05-10 14:45:29 -05:00
parent 9b7921a774
commit 081e9fe1c4
1 changed files with 2 additions and 1 deletions

View File

@ -996,11 +996,12 @@ class PayrollRecompute(Wizard):
def transition_do_recompute(self):
Payroll = Pool().get('staff.payroll')
wages_dict = Payroll.create_cache_wage_types()
ids = Transaction().context['active_ids']
for payroll in Payroll.browse(ids):
if payroll.state != 'draft' or not payroll.lines:
continue
payroll.recompute_lines()
payroll.recompute_lines(wages_dict)
return 'end'