Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
3 Besvarelser
9147 Visninger

Such as:

<button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply"/>

I can't find a method named 'order_confirm' in its .py.

I'm curious how this button use its method......

Avatar
Kassér
Bedste svar

Buttons can have 3 different types specified by the attribute type:

  • workflow: The current workflow is triggered with the signal which is specified by the name attribute. This is the default behaviour.
  • object: The name attribute specifies the method of the object which will be executed.
  • action: The name attribute specifies the ID of the action (act_window, server, ..) which will be executed.

Since the type is not defined in your example, the button is of type workflow and triggers the sale.order workflow. The signal order_confirm is defined in file sale/sale_workflow.xml:

Avatar
Kassér
Forfatter

Thank u so so much~~

Bedste svar

Hi Andreas, Then means than it's not possible to do progress a workflow when the next step achieve by a button isn't workflow type? Typically with the differents states of the "stock.picking" model. When my picking is "available" and I want to set state at "done" the button is "VALIDATE" (methode : do_new_transfer). So with the API and the exec_workflow isn't possible to achieve that?

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
mar. 15
5816
1
nov. 24
1419
1
mar. 21
4728
2
jul. 17
5501
1
mar. 16
3170