View elements
We have seen how to organize the content in a form, using elements such as header
, group
, and notebook
. Now, we can take a closer look at the field and button elements, and what we can do with them.
Buttons
Buttons support these attributes:
icon
to display. Unlike smart buttons, icons available for regular buttons are those found inaddons/web/static/src/img/icons
.string
is the button text description.type
can beworkflow
,object
oraction
, to either trigger a workflow signal, call a Python method, or run a window action.name
is the workflow trigger, model method, or window action to run, depending on the buttontype
.args
can be used to pass additional parameters to the method, if the type isobject
.context
sets values on the session context, which can have an effect after the windows action is run, or when a Python method is called. In the latter case, it can sometimes be used as an alternative toargs
.confirm
adds a dialog with this message text asking for a confirmation...