details: https://code.tryton.org/tryton/commit/1d55c31fcc33
branch: default
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
diffstat:
modules/account_invoice/invoice.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 2c03e7d9a4e4 -r 1d55c31fcc33 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={
@@ -1595,7 +1596,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