Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Create multiple work-flows in a single module in Odoo.

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 274
    Comment on it

    If you want to create multiple work-flows in single module in Odoo for that you have to follow below code-

    <!-- Activity -->

           
        <record id="act_draft" model="workflow.activity">
          <field name="wkf_id" ref="Demo_expense_workflow"/>
          <field name="flow_start">True</field>
          <field name="kind">dummy</field>
          <field name="name">draft</field>
        </record>      
       
        <record id="act_submit" model="workflow.activity">
          <field name="wkf_id" ref="Demo_expense_workflow"/>
          <field name="kind">function</field>
          <field name="action">expense_submit()</field>
          <field name="name">submit</field>
        </record>  
       
      

     

    <!-- Transistion -->

    <record id="trans_draft_submit" model="workflow.transition">
    <field name="act_from" ref="act_draft"/>
    <field name="act_to" ref="act_submit"/>
    <field name="signal">signal_submit</field> 
    </record> 

     

            <!-- Activity -->

    <record id="act_draft" model="workflow.activity">
    <field name="wkf_id" ref="demo_payment_workflow"/>
    <field name="flow_start">True</field>
    <field name="kind">dummy</field>
    <field name="name">draft</field>
    </record> 
    
    <record id="act_submit" model="workflow.activity">
    <field name="wkf_id" ref="demo_payment_workflow"/>
    <field name="kind">function</field>
    <field name="action">expense_submit()</field>
    <field name="name">submit</field>
    </record> 


           
            <!-- Transistion -->     

    <record id="trans_draft_submit" model="workflow.transition">
    <field name="act_from" ref="act_draft"/>
    <field name="act_to" ref="act_submit"/>
    <field name="signal">signal_submit</field> 
    </record> 

     

    Note- A workflow, one can attach conditions, signals, and triggers to transitions, so that the behavior of the workflow dependency upon other module.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: