Adding options to the Action context menu
Window actions can also be used from the Action menu button, available at the top of form views, and also in list views when records are selected:
This menu is contextual because the action will apply to the record or records currently selected.
To have an action available in the Action menu, two more fields have to be set on the window action:
binding_model_id
is a reference to the model to use the action for; for example,<field name="binding_model_id" ref="model_library_checkout" />
.binding_view_types
can be used to limit the option's visibility to specific view types, such asform
orlist
; for example,<field name="binding_view_types">form,list</field>
.
An example of this has already been implemented in the library_checkout
module, in the wizard/checkout_mass_message_wizard_view.xml
file. This...