Use BIGINT for table query with composed unique ID

When the maximal id of the table is too big, int4 is not enough like #15010
shows.
This commit is contained in:
Cédric Krier
2026-08-14 11:55:48 +02:00
parent b096ea372d
commit c1be38f14d
2 changed files with 15 additions and 0 deletions
+10
View File
@@ -372,6 +372,11 @@ class CustomerCategoryMixin:
__slots__ = ()
category = fields.Many2One('party.category', "Category")
@classmethod
def __setup__(cls):
super().__setup__()
cls.id._sql_type = 'BIGINT'
@classmethod
def _joins(cls):
pool = Pool()
@@ -605,6 +610,11 @@ class ProductCategoryMixin(object):
},
depends={'company'})
@classmethod
def __setup__(cls):
super().__setup__()
cls.id._sql_type = 'BIGINT'
@classmethod
def _joins(cls):
pool = Pool()
+5
View File
@@ -430,6 +430,11 @@ class CategoryMixin:
category = fields.Many2One('product.category', "Category")
@classmethod
def __setup__(cls):
super().__setup__()
cls.id._sql_type = 'BIGINT'
@classmethod
def _joins(cls):
pool = Pool()