Buttons

Buttons support these attributes:

  • string is the button text label, or the HTML alt text when an icon is used.
  • type is the type of the action to perform. Possible values are:
    • object is used for calling a Python method
    • action is used to run a window action
  • name identifies the specific action to perform, according to the chosen type: either a model method name or the database ID of window action to run. The %(xmlid)d formula can be used to translate the XML ID into the required Database ID when the view is being loaded.
  • args is used when the type is object, to pass additional parameters to the method, which must be purely static JSON parameters appended to the record ID to form the arguments of the method call.
  • context adds values ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.