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?
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
This question has been flagged
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
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