Book Image

Odoo Development Essentials

Book Image

Odoo Development Essentials

Overview of this book

Table of Contents (17 chapters)
Odoo Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 in addons/web/static/src/img/icons.

  • string is the button text description.

  • type can be workflow, object or action, 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 button type.

  • args can be used to pass additional parameters to the method, if the type is object.

  • 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 to args.

  • confirm adds a dialog with this message text asking for a confirmation...