[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 <rco@odoo.com>
This commit is contained in:
Rémy Voet (ryv)
2023-11-02 16:57:55 +00:00
parent 9a798bc51a
commit 5c651a10da
+1 -9
View File
@@ -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"