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:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user