- 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
推薦閱讀
- Word排版技術大全(第2版)
- 遠程辦公效率手冊
- Power BI零售數(shù)據(jù)分析實戰(zhàn)
- Excel 2013應用技巧實例大全
- PPT制作應用大全2019
- 新編Word/Excel/PPT 2016從入門到精通
- Minecraft創(chuàng)客制作:用樂高、3D打印、Arduino等創(chuàng)建Minecraft真實世界
- Java EE 8 Cookbook
- 30天精學Excel:從菜鳥到數(shù)據(jù)分析高手
- 新編PowerPoint 2016從入門到精通
- Learn Microsoft Office 2019
- Word/Excel 2010高效辦公:文秘與行政辦公
- Excel 2010表格處理直通車
- 實訓教程:常用工具軟件
- 巧用ChatGPT輕松搞定Excel