Skip to content
Snippets Groups Projects
Commit 93a9cf85 authored by Cédric Krier's avatar Cédric Krier :atom:
Browse files

Ensure values can be sorted

The values may contain None which is not orderable so we insert a third
argument before the value to prevent to compare None value against others.

issue9381
review303881005
parent aa1494dc
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
from trytond.rpc import RPC
from trytond.tools import reduce_ids, grouped_slice, cursor_dict
from trytond.transaction import Transaction
from trytond.tools import sortable_values
from trytond.wizard import Wizard, StateView, StateAction, Button
from trytond.pool import Pool
......@@ -522,7 +523,8 @@
line=payment.line.rec_name))
groups = []
payments = sorted(payments, key=self._group_payment_key)
payments = sorted(
payments, key=sortable_values(self._group_payment_key))
for key, grouped_payments in groupby(payments,
key=self._group_payment_key):
def group():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment