I’ve a problem when I want to make button in type="action", it’s really different with type="object". I just want to make button that can connect one module to another. It already exists in openerp for a few buttons of type="action". I just want to understand what is the function of "name" of this button?
I have an example, I found this xml script in backend sale folder:
<button name="%(action_view_sale_advance_payment_inv)d"
string="Create Invoice"
type="action"
states="manual"
class="oe_highlight"
groups="base.group_user"/>
when I installed sale module, then I see the xml script in frontend sale.order.form, it’s already change into:
<button name="278"
string="Create Invoice"
type="action"
states="manual"
class="oe_highlight"
groups="base.group_user"/>
What’s happening with the "name"? Can anyone give me a simple button of type="action"?
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:
objectis used if you want to call a method which is written in.pyfile.actionis used if you want to call any action which is written in.xmlfile. Let say if you want to open a wizard from button click then you can usetype="action".workflow(the default) is used if you want to call workflow.when Create Invoice button is clicked, you will see a wizard.
Here
278is an ID in postgresql database ofaction_view_sale_advance_payment_invaction.