From f912ec5b4559c81943ce0af537e629990bb4ee14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 21 Feb 2023 00:25:05 +0100 Subject: [PATCH] Remove BigInteger field Closes #6792 --- modules/web_shop_shopify/common.py | 5 +++-- trytond/CHANGELOG | 1 + trytond/doc/ref/fields.rst | 7 ------- trytond/trytond/model/fields/__init__.py | 4 ++-- trytond/trytond/model/fields/integer.py | 8 -------- 5 files changed, 6 insertions(+), 19 deletions(-) diff --git a/modules/web_shop_shopify/common.py b/modules/web_shop_shopify/common.py index f12575ee4c..7cd17de2bf 100644 --- a/modules/web_shop_shopify/common.py +++ b/modules/web_shop_shopify/common.py @@ -8,9 +8,10 @@ from trytond.pool import Pool class IdentifierMixin: __slots__ = () - shopify_identifier_signed = fields.BigInteger( + shopify_identifier_signed = fields.Integer( lazy_gettext('web_shop_shopify.msg_shopify_identifier')) - shopify_identifier = fields.Function(fields.BigInteger( + shopify_identifier_signed._sql_type = 'BIGINT' + shopify_identifier = fields.Function(fields.Integer( lazy_gettext('web_shop_shopify.msg_shopify_identifier')), 'get_shopify_identifier', setter='set_shopify_identifier', searcher='search_shopify_identifier') diff --git a/trytond/CHANGELOG b/trytond/CHANGELOG index 062333d614..0560f20cc1 100644 --- a/trytond/CHANGELOG +++ b/trytond/CHANGELOG @@ -1,3 +1,4 @@ +* Remove BigInteger field * Remove support for Python 3.7 * Add support for Python 3.11 * Add scroll time for calendar view diff --git a/trytond/doc/ref/fields.rst b/trytond/doc/ref/fields.rst index 692813ecfb..3678353baf 100644 --- a/trytond/doc/ref/fields.rst +++ b/trytond/doc/ref/fields.rst @@ -260,13 +260,6 @@ Integer An :py:class:`integer ` field. -BigInteger ----------- - -.. class:: BigInteger(string[, \**options]) - - A long :py:class:`integer ` field. - Char ---- diff --git a/trytond/trytond/model/fields/__init__.py b/trytond/trytond/model/fields/__init__.py index 32e788d385..bb8853aac2 100644 --- a/trytond/trytond/model/fields/__init__.py +++ b/trytond/trytond/model/fields/__init__.py @@ -11,7 +11,7 @@ from .field import ( get_eval_fields, on_change_result, states_validate) from .float import Float from .function import Function, MultiValue -from .integer import BigInteger, Integer +from .integer import Integer from .many2many import Many2Many from .many2one import Many2One from .multiselection import MultiSelection @@ -25,7 +25,7 @@ from .text import FullText, Text __all__ = [ depends, SQL_OPERATORS, on_change_result, get_eval_fields, states_validate, domain_validate, context_validate, Field, - Boolean, Integer, BigInteger, Char, Text, FullText, Float, Numeric, Date, + Boolean, Integer, Char, Text, FullText, Float, Numeric, Date, Timestamp, DateTime, Time, TimeDelta, Binary, Selection, Reference, Many2One, One2Many, Many2Many, Function, MultiValue, One2One, Dict, MultiSelection] diff --git a/trytond/trytond/model/fields/integer.py b/trytond/trytond/model/fields/integer.py index 1739d932da..cb3438c502 100644 --- a/trytond/trytond/model/fields/integer.py +++ b/trytond/trytond/model/fields/integer.py @@ -10,11 +10,3 @@ class Integer(Field): _type = 'integer' _sql_type = 'INTEGER' _py_type = int - - -class BigInteger(Integer): - ''' - Define an integer field (``long``). - ''' - _type = 'biginteger' - _sql_type = 'BIGINT'