From 030dce36ac3a2bbb0ea68c3e22cf32b7981ec558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 18 Aug 2023 20:50:15 +0200 Subject: [PATCH] Remove biginteger widget from tryton and sao Since 73fe133d7a2c trytond does not have anymore a biginteger type. --- sao/src/model.js | 1 - sao/src/sao.less | 2 +- sao/src/view/form.js | 1 - sao/src/view/tree.js | 3 --- tryton/tryton/gui/window/view_form/model/field.py | 1 - tryton/tryton/gui/window/view_form/view/form.py | 1 - tryton/tryton/gui/window/view_form/view/list.py | 2 -- tryton/tryton/gui/window/win_import.py | 2 +- 8 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sao/src/model.js b/sao/src/model.js index 2000a588ab..cf8f0f338d 100644 --- a/sao/src/model.js +++ b/sao/src/model.js @@ -1510,7 +1510,6 @@ case 'numeric': return Sao.field.Numeric; case 'integer': - case 'biginteger': return Sao.field.Integer; case 'boolean': return Sao.field.Boolean; diff --git a/sao/src/sao.less b/sao/src/sao.less index e7e4bdea99..ef66fdc91c 100644 --- a/sao/src/sao.less +++ b/sao/src/sao.less @@ -477,7 +477,7 @@ img.icon { text-align: left; text-align: start; } - &.timedelta, &.float, &.numeric, &.integer, &.biginteger { + &.timedelta, &.float, &.numeric, &.integer { text-align: right; text-align: end; } diff --git a/sao/src/view/form.js b/sao/src/view/form.js index 230ec472d8..25f0371c38 100644 --- a/sao/src/view/form.js +++ b/sao/src/view/form.js @@ -5368,7 +5368,6 @@ function eval_pyson(value){ }); Sao.View.FormXMLViewParser.WIDGETS = { - 'biginteger': Sao.View.Form.Integer, 'binary': Sao.View.Form.Binary, 'boolean': Sao.View.Form.Boolean, 'callto': Sao.View.Form.CallTo, diff --git a/sao/src/view/tree.js b/sao/src/view/tree.js index 4d145bfc51..1392236d6c 100644 --- a/sao/src/view/tree.js +++ b/sao/src/view/tree.js @@ -906,7 +906,6 @@ } else { width = { 'integer': 8, - 'biginteger': 8, 'selection': 9, 'reference': 20, 'one2many': 5, @@ -3051,7 +3050,6 @@ }); Sao.View.TreeXMLViewParser.WIDGETS = { - 'biginteger': Sao.View.Tree.IntegerColumn, 'binary': Sao.View.Tree.BinaryColumn, 'boolean': Sao.View.Tree.BooleanColumn, 'callto': Sao.View.Tree.URLColumn, @@ -3232,7 +3230,6 @@ }); Sao.View.EditableTree.WIDGETS = { - 'biginteger': Sao.View.EditableTree.Integer, 'binary': Sao.View.EditableTree.Binary, 'boolean': Sao.View.EditableTree.Boolean, 'callto': Sao.View.EditableTree.Char, diff --git a/tryton/tryton/gui/window/view_form/model/field.py b/tryton/tryton/gui/window/view_form/model/field.py index ab591cc571..5ac2cedce5 100644 --- a/tryton/tryton/gui/window/view_form/model/field.py +++ b/tryton/tryton/gui/window/view_form/model/field.py @@ -1195,7 +1195,6 @@ class DictField(Field): TYPES = { 'char': CharField, 'integer': IntegerField, - 'biginteger': IntegerField, 'float': FloatField, 'numeric': NumericField, 'many2one': M2OField, diff --git a/tryton/tryton/gui/window/view_form/view/form.py b/tryton/tryton/gui/window/view_form/view/form.py index db4a856c94..2e27ea0f27 100644 --- a/tryton/tryton/gui/window/view_form/view/form.py +++ b/tryton/tryton/gui/window/view_form/view/form.py @@ -162,7 +162,6 @@ class HContainer(_Container): class FormXMLViewParser(XMLViewParser): WIDGETS = { - 'biginteger': Integer, 'binary': Binary, 'boolean': CheckBox, 'callto': CallTo, diff --git a/tryton/tryton/gui/window/view_form/view/list.py b/tryton/tryton/gui/window/view_form/view/list.py index 4f5dd1ae83..f4ca086ba5 100644 --- a/tryton/tryton/gui/window/view_form/view/list.py +++ b/tryton/tryton/gui/window/view_form/view/list.py @@ -255,7 +255,6 @@ class AdaptModelGroup(GenericTreeModel): class TreeXMLViewParser(XMLViewParser): WIDGETS = { - 'biginteger': Int, 'binary': Binary, 'boolean': Boolean, 'callto': URL, @@ -397,7 +396,6 @@ class TreeXMLViewParser(XMLViewParser): def _set_column_width(self, column, attributes): default_width = { 'integer': 80, - 'biginteger': 80, 'selection': 90, 'reference': 200, 'one2many': 50, diff --git a/tryton/tryton/gui/window/win_import.py b/tryton/tryton/gui/window/win_import.py index aa449cbf25..2367ff28b4 100644 --- a/tryton/tryton/gui/window/win_import.py +++ b/tryton/tryton/gui/window/win_import.py @@ -205,7 +205,7 @@ class WinImport(WinCSV): for field, val in zip(fields, line): if locale_format and val: type_ = self.fields_data[field]['type'] - if type_ in ['integer', 'biginteger']: + if type_ == 'integer': val = locale.atoi(val) elif type_ == 'float': val = locale.atof(val)