- type
The type of the button indicating how it behaves. It can have two different values:
- object
Call a method on the view’s model. The button’s
name
is the method that is called with the current record ID and the currentcontext
.
- action
Load and execute an
ir.actions
action record. The button’sname
is the XMLID of the action to load. Thecontext
is extended with the view’s model (asactive_model
) and with the current record (asactive_id
).
Example
<button type="object" name="action_create_new" string="Create document"/> <button type="action" name="addon.action_create_view" string="Create and Edit"/>
- Requirement
Mandatory if the
special
attribute is not set- Type