Odoo Help

Welcome!

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

2

Activate a workflow transition from a wizard

By
George Tsagkogeorgas
on 12/30/13, 5:03 AM 1,652 views

I want to activate a workflow transition from a wizard's button. What is the appropriate type of button to use? What is the appropriate signal / condition in the transition?

1
Kazim Mirza
On 5/17/14, 12:30 AM

you have to just add a work flow in xml like this simple as we define workflow

<record id="act_applied" model="workflow.activity">
            <field name="wkf_id" ref="wkf_emp"/>
            <field name="flow_start">True</field>
            <field name="name">applied</field>
            <field name="kind">function</field>
            <field name="action">write({'state':'applied'})</field>
        </record>

 

 

now you want to use button in wizard to trugger a workflow 

step --1  make a wizard .py and .xml file 

step--2 in .xml file define button like this

               <button name="emp_interview" string="Interview" type="workflow" states="applied" />

and now it will trigger a workflow 

0

Hi! Have you made any progress on this subject? I am struggling with the same issue. I have a wizard working fine, but I would like to make a workflow transition after I submit my wizard information (based on the information user has just submitted) and I can't find any help on this....

-------

EDIT (Have to edit, since comments are not working)
I'm not sure I understood Kazim Mirza's answer. I've tried many variants of it (copying parts of the already existing workflow to wizard, for example) but none of them worked.
I've submitted a more detailed question here: https://www.odoo.com/forum/Help-1/question/Activate-a-workflow-transition-from-a-wizard-52519

Could you please check it out and point me in the right direction? Thanks!

------------
Second EDIT

Hi! Thanks to Jos De Graeve, I finally got it to work. The solution is quite simple, but the lack of documentation is sometime frustrating!
You can find it here: https://www.odoo.com/forum/Help-1/question/How-do-I-activate-a-workflow-transition-from-a-wizard-52519#answer-52573

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 12/30/13, 5:03 AM
Seen: 1652 times
Last updated: 3/16/15, 8:10 AM