From 5c651a10dad97f12e800e1f1e7c4212c8c7ff160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Voet=20=28ryv=29?= Date: Thu, 2 Nov 2023 16:28:22 +0100 Subject: [PATCH] [FIX] core: remove the doc of Field.states Since #104741, `Field.states` is no longer supported, remove the documentation associated. We cannot remove the attribute from Field because it is used in the migration script. closes odoo/odoo#140694 Signed-off-by: Raphael Collet --- odoo/fields.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/odoo/fields.py b/odoo/fields.py index 65feb9c6240..361a5ec292a 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -163,14 +163,6 @@ class Field(MetaField('DummyField', (object,), {})): ``default=None`` to discard default values for the field :type default: value or callable - :param dict states: a dictionary mapping state values to lists of UI attribute-value - pairs; possible attributes are: ``readonly``, ``required``. - - .. warning:: Any state-based condition requires the ``state`` field value to be - available on the client-side UI. This is typically done by including it in - the relevant views, possibly made invisible if not relevant for the - end-user. - :param str groups: comma-separated list of group xml ids (string); this restricts the field access to the users of the given groups only @@ -321,7 +313,7 @@ class Field(MetaField('DummyField', (object,), {})): help = None # field tooltip readonly = False # whether the field is readonly required = False # whether the field is required - states = None # set readonly and required depending on state + states = None # set readonly and required depending on state (deprecated) groups = None # csv list of group xml ids change_default = False # whether the field may trigger a "user-onchange"