Skip to Content
Menu
This question has been flagged
2 Replies
2314 Views
i want to add a server action to workflow wkf_prod 
 <record model="workflow.activity" id="draft">
<field name="name">Draft</field>
<field name="wkf_id" ref="wkf_prod"/>
<field name="flow_start" eval="True"/>
<field name="kind">dummy</field>
<field name="action"></field>
<field name="action_id" ref="Leave Request"/>
</record>
but i have this error :
ParseError: "External ID not found in the system: test.wkf_prod" while parsing /home/chihaoui/odo0/extra/test/views/views.xml:18, near
<record model="workflow.activity" id="draft">
please help me
Avatar
Discard
Best Answer

This app is good job for workflow   https://www.odoo.com/apps/modules/10.0/wkf_powerful/


Avatar
Discard
Best Answer

You need to create workflow by xml and then assign that id to wkf_id otherwise it will not find wkf_id.



<record id="test_workflow" model="workflow">
<field name="name">test.workflow</field>
<field name="osv">test.workflow.model</field>
<field name="on_create">True</field>
</record>
<record id="activity_a" model="workflow.activity">
<field name="wkf_id" ref="test_workflow"/>
<field name="flow_start">True</field>
<field name="name">a</field>
<field name="kind">function</field>
<field name="action">print_a()</field>
</record>


hope this will help you.

Avatar
Discard