- 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
nameis the method that is called with the current record ID and the currentcontext.
- action
Load and execute an
ir.actionsaction record. The button’snameis the XMLID of the action to load. Thecontextis 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
specialattribute is not set- Type