changeset 0560b0a2bd50 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=0560b0a2bd50
description:
Document ModelView._buttons states keys
issue9954
review292951002
diffstat:
doc/ref/models/models.rst | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 45a85e5a9c7f -r 0560b0a2bd50 doc/ref/models/models.rst
--- a/doc/ref/models/models.rst Sat Dec 19 17:08:48 2020 +0100
+++ b/doc/ref/models/models.rst Tue Dec 22 00:27:17 2020 +0100
@@ -110,8 +110,12 @@
.. attribute:: ModelView._buttons
It contains a dictionary with button name as key and the states dictionary
- for the button. This states dictionary will be used to generate the views
- containing the button.
+ for the button.
+ The states possible keys are ``invisible``, ``readonly`` and ``icon`` which
+ have a :class:`~trytond.pyson.PYSON` statement as value and ``depends``
+ which has a list of field names on which the button states depend.
+ The keys will be set as default attributes on the buttons for the views
+ that show them.
Static methods: