Skip to main content

Posts

Showing posts from January, 2015

Odoo/OpenERP: Create multiple workflows in a single module

Today's post is about : How to create multiple workflows for multiple models in a single module. Few days back, I created a module custom_account with two models custom_expense and custom_payment. I created two different but almost similar workflows for both of them. When I installed the module, only latter one was working. What could be the reason? Problem was with Activity and Transition ids. I was using same ids in both the workflows. Check following: Old Code: custom_expense_workflow_view.xml         <!-- Activity -->                 <record id="act_draft" model="workflow.activity">             <field name="wkf_id" ref="custom_expense_workflow"/>             <field name="flow_start">True</field>             <field name="kind">dummy</field>             <field name="name">draft</field>         </record>                           &