- Odoo 11 Development Essentials(Third Edition)
- Daniel Reis
- 117字
- 2021-08-27 19:32:43
Adding action buttons
Forms can have buttons to perform actions. These buttons are able to run window actions such as opening another form or running Python functions defined in the model.
They can be placed anywhere inside a form, but for document-style forms, the recommended place for them is the <header> section.
For our application, we will add a button to clear a done task. This button will run the do_clear_done object method:
<header> <button name="do_clear_done" type="object" string="Clear Done" /> </header>
The basic attributes of a button consist of the following:
- string with the text to display on the button
- type of action it performs
- name is the identifier for that action
- class is an optional attribute to apply CSS styles, like in regular HTML
推薦閱讀
- 辦公軟件高級應(yīng)用實(shí)用教程
- Excel公式、函數(shù)與圖表應(yīng)用大全
- Excel 2010辦公應(yīng)用實(shí)戰(zhàn)從入門到精通(超值版)
- Word/Excel 2010辦公應(yīng)用從入門到精通
- Excel 2016辦公應(yīng)用從入門到精通
- MATLAB R2020a完全自學(xué)一本通
- Word/Excel/PPT從入門到精通
- Excel數(shù)據(jù)處理與統(tǒng)計(jì)初步(第4版)
- 精P之道:高效溝通PPT
- PowerPivot for Advanced Reporting and Dashboards
- PPT 設(shè)計(jì)實(shí)戰(zhàn)從入門到精通(第2版)
- Excel VBA應(yīng)用案例速查手冊
- 巧用ChatGPT輕松搞定Excel
- Excel公式與函數(shù)大辭典
- Word/Excel/PPT 2016辦公三合一傻瓜書