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

Order tariff codes by sequence with null first

Closes #13655
parent 0543aba60f4f
1 merge request!1944Order tariff codes by sequence with null first
Pipeline #93296 passed
......@@ -19,7 +19,11 @@
},
help='Use the tariff codes defined on the parent category.')
tariff_codes = fields.One2Many('product-customs.tariff.code',
'product', 'Tariff Codes', order=[('sequence', 'ASC'), ('id', 'ASC')],
'product', "Tariff Codes",
order=[
('sequence', 'ASC NULLS FIRST'),
('id', 'ASC'),
],
states={
'invisible': (Eval('tariff_codes_parent', False)
| ~Eval('customs', False)),
......@@ -98,7 +102,11 @@
tariff_codes_category = fields.Boolean("Use Category's Tariff Codes",
help='Use the tariff codes defined on the category.')
tariff_codes = fields.One2Many('product-customs.tariff.code',
'product', 'Tariff Codes', order=[('sequence', 'ASC'), ('id', 'ASC')],
'product', "Tariff Codes",
order=[
('sequence', 'ASC NULLS FIRST'),
('id', 'ASC'),
],
states={
'invisible': ((Eval('type') == 'service')
| Eval('tariff_codes_category', False)),
......
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