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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 10 15
|
6420 | ||
|
0
thg 6 15
|
5663 | ||
|
1
thg 8 25
|
136 | ||
|
2
thg 7 25
|
404 | ||
|
1
thg 7 25
|
377 |