lims_interface: Position new record based on order
https://bugs.tryton.org/issue8880
This commit is contained in:
parent
9e6166c638
commit
eb343dfa00
|
@ -459,11 +459,14 @@ class Data(ModelSQL, ModelView):
|
|||
for oexpr, otype in order:
|
||||
fname, _, extra_expr = oexpr.partition('.')
|
||||
field = cls._fields[fname]
|
||||
otype = otype.upper()
|
||||
try:
|
||||
otype, null_ordering = otype.split(' ', 1)
|
||||
except ValueError:
|
||||
null_ordering = None
|
||||
if not otype:
|
||||
otype, null_ordering = 'ASC', None
|
||||
else:
|
||||
otype = otype.upper()
|
||||
try:
|
||||
otype, null_ordering = otype.split(' ', 1)
|
||||
except ValueError:
|
||||
null_ordering = None
|
||||
Order = order_types[otype]
|
||||
NullOrdering = null_ordering_types[null_ordering]
|
||||
forder = field.convert_order(oexpr, tables, cls)
|
||||
|
|
Loading…
Reference in New Issue