Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
check for example, openerp\addons\sale\sale_view.xml. . Search for the <button> tag.
If the button's response is a method in the related class of the view then it should has the type type="object"
if the button's response is an action then there must be an action defined in the module that the button will refer to and type="action"
If the button is a workflow button then type="workflow", and there should be a workflow action the button refers to
There are three kinds of types for button: object, action & workflow. workflow is the default.
Now let's understand the meaning of these three types:
1.object is used if you want to call a method which is written in .py file.
2.action is used if you want to call any action which is written in .xml file. Let say if you want to open a wizard from button click then you can use type="action".
3.workflow (the default) is used if you want to call workflow.
<button name="%(action_view_sale_advance_payment_inv)d" string="Create Invoice" type="action">
when Create Invoice button is clicked, you will see a wizard.
<button name="278" string="Create Invoice" type="action">
Here 278 is an ID in postgresql database of action_view_sale_advance_payment_inv action.
Here some useful links as a beginner in this field:
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/13/15, 9:59 AM|
|Seen: 1293 times|
|Last updated: 8/5/15, 6:02 AM|