Odoo Help

0

How to extend the transition value of existing workflow?

By
Anil R. Kesariya
on 7/4/15, 2:04 AM 1,250 views

Hello everyone,

I want to update the attribute value of existing transition record of standard module by inhierit or overriding functionality not from database level.

I faced a problem when i tried to update the attribute value of flow_stop field of activity.

What I want is :

I have added new transition which i want to call after last state/done of workflow which stops the flow of workflow.

So,

1) I have inherited xml record of that activity and set flow_stop to false does not impact anything.

2) I have update it from database than it works fine as i want but after updation of custom module in running database again it revert back to flow_stop to true what is the reason for it?

I have tried this one which doesn't work

 <record id="sale.act_done" model="workflow.activity">
    <field name="wkf_id" ref="sale.wkf_sale"/>
<field name="name">done</field>
<field name="flow_stop">False</field> <!-- False and 0 both tried -->
<field name="kind">function</field>
<field name="action">action_done()</field>
<field name="join_mode">AND</field>
</record>

How can I overcome this issue?

Any solution or guidance is highly appreciated

Thanks & Regards,

Anil

4

Dear Anil, please try by

<field name="flow_stop" eval="False"/>

If this still does not work, try <function> tag and use it on noupdate=1.

Thanks.

eval="False" works Thanks a lot :)

Anil R. Kesariya
on 7/6/15, 1:05 AM
0

Hi Anil,

To achieve your goal you need to manage overriding functionality of the workflow activity. I have given below to update for purchase workflow. In that override done activity of purchase flow.


<record id="purchase.act_done" model="workflow.activity">
<field name="wkf_id" ref="purchase.purchase_order"/>
<field name="flow_stop">False</field>
</record>


After update your module you can see that flow_stop is False inside "done" activity of the purchase workflow.

I hope it will useful to you.


I tired it already but couldn't works its doesn't update the value in database. Tried both False and 0 doesn't impact. any other solution?

Anil R. Kesariya
on 7/4/15, 3:14 AM

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

1 follower(s)

Stats

Asked: 7/4/15, 2:04 AM
Seen: 1250 times
Last updated: 9/18/17, 2:25 AM