details: https://code.tryton.org/tryton/commit/57f79b1d287f
branch: 7.8
user: Cédric Krier <[email protected]>
date: Thu Jan 22 17:23:12 2026 +0100
description:
Use BIGINT for invoice number digit and limit size to 18 digits
Closes #14534
(grafted from 1d55c31fcc338f9119ac9187b3305874cdc55971)
diffstat:
modules/account_invoice/invoice.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r abf56e1a0ed5 -r 57f79b1d287f modules/account_invoice/invoice.py
--- a/modules/account_invoice/invoice.py Thu Jan 22 13:54:58 2026 +0100
+++ b/modules/account_invoice/invoice.py Thu Jan 22 17:23:12 2026 +0100
@@ -108,6 +108,7 @@
number = fields.Char("Number", readonly=True)
number_alnum = fields.Char("Number Alphanumeric", readonly=True)
number_digit = fields.Integer("Number Digit", readonly=True)
+ number_digit._sql_type = 'BIGINT'
reference = fields.Char(
"Reference",
states={
@@ -1594,7 +1595,7 @@
if self.number is not None else None)
try:
values['number_digit'] = int(
- re.sub(r'\D', '', self.number or ''))
+ re.sub(r'\D', '', self.number or '')[-18:])
except ValueError:
values['number_digit'] = None
return values