Odoo Help

1

How can a button use its method?

By
CK
on 3/29/13, 4:30 AM 2,190 views

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......

6

Andreas Brueckl

--Andreas Brueckl--
5131
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 3/29/13, 6:00 AM

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:

Thank u so so much~~

CK
on 3/29/13, 6:18 AM
0
Soprath4S
On 6/12/16, 1:51 PM

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?

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

Question tools

0 follower(s)

Stats

Asked: 3/29/13, 4:30 AM
Seen: 2190 times
Last updated: 6/12/16, 1:51 PM