Order first by length field filled by sequence
issue11638 review437311003
This commit is contained in:
1 parent
1c56cba077
commit
cf2821e058
1 file changed
+7
@@ -6,6 +6,8 @@ from decimal import Decimal
|
||||
from functools import partial
|
||||
from itertools import chain, groupby
|
||||
|
||||
from sql.functions import CharLength
|
||||
|
||||
from trytond.i18n import gettext
|
||||
from trytond.ir.attachment import AttachmentCopyMixin
|
||||
from trytond.ir.note import NoteCopyMixin
|
||||
@@ -355,6 +357,11 @@ class Sale(
|
||||
[sql_table.state], ['cancelled'],
|
||||
where=sql_table.state == 'cancel'))
|
||||
|
||||
@classmethod
|
||||
def order_number(cls, tables):
|
||||
table, _ = tables[None]
|
||||
return [CharLength(table.number), table.number]
|
||||
|
||||
@classmethod
|
||||
def default_payment_term(cls, **pattern):
|
||||
pool = Pool()
|
||||
|
||||
Reference in new issue
Block a user