Commit 1a852049 authored by Jérome Perrin's avatar Jérome Perrin Committed by Kazuhiko Shiozaki

payroll_l10n_fr: fix a non deterministic sort

I don't know a PYTHONHASHSEED to see the problem on python2, but on
python 3 erp5_payroll_l10n_fr:testSimplifiedPayslipReport fails all the
time with this.
parent 0e69ff01
...@@ -70,7 +70,7 @@ def groupSameReportSectionLine(line_to_group_list): ...@@ -70,7 +70,7 @@ def groupSameReportSectionLine(line_to_group_list):
tmp2_base_dict[new_key]['employee_total_price'] = tmp2_base_dict[new_key]['employee_total_price'] + value['employee_total_price'] tmp2_base_dict[new_key]['employee_total_price'] = tmp2_base_dict[new_key]['employee_total_price'] + value['employee_total_price']
new_value_list = [] new_value_list = []
# recalculate for rounding issue # recalculate for rounding issue
for value_dict in tmp2_base_dict.values(): for _, value_dict in sorted(tmp2_base_dict.items()):
value_dict['employer_total_price'] = value_dict['base'] * value_dict['employer_price'] value_dict['employer_total_price'] = value_dict['base'] * value_dict['employer_price']
value_dict['employee_total_price'] = value_dict['base'] * value_dict['employee_price'] value_dict['employee_total_price'] = value_dict['base'] * value_dict['employee_price']
new_value_list.append(value_dict) new_value_list.append(value_dict)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment