~unifield-team/unifield-wm/us-826

243.1.1 by Quentin THEURET
UF-370 [ADD] Added reason types_moves module
1
<?xml version="1.0" encoding="utf-8" ?>
2
<openerp>
3
    <data>
4
    
5
        <record id="act_sale_loan" model="workflow.activity">
6
            <field name="wkf_id" ref="sale.wkf_sale"/>
7
            <field name="name">loan</field>
8
            <field name="kind">subflow</field>
9
            <field name="subflow_id" search="[('osv','=','purchase.order')]" type="int"/>
10
            <field name="action">action_purchase_order_create()</field>
11
        </record>
12
        <record id="act_sale_loan_done" model="workflow.activity">
13
            <field name="wkf_id" ref="sale.wkf_sale" />
14
            <field name="name">loan_done</field>
15
        </record>
431.7.14 by Quentin THEURET
UF-629 [IMP] Sourcing tool : Take only lines with validated orders
16
17
        <record id="act_sale_order_validated" model="workflow.activity">
18
            <field name="wkf_id" ref="sale.wkf_sale" />
19
            <field name="name">order_validated</field>
20
            <field name="kind">function</field>
21
            <field name="action">wkf_validated()</field>
22
        </record>
23
24
        <record id="trans_draft_validated" model="workflow.transition">
25
            <field name="act_from" ref="sale.act_draft" />
26
            <field name="act_to" ref="act_sale_order_validated" />
27
            <field name="signal">order_validated</field>
28
        </record>
243.1.1 by Quentin THEURET
UF-370 [ADD] Added reason types_moves module
29
        
30
        <record id="trans_sale_router_loan" model="workflow.transition">
31
            <field name="act_from" ref="sale.act_router" />
32
            <field name="act_to" ref="act_sale_loan" />
33
            <field name="condition">order_type=='loan' and not loan_id</field>
34
        </record>
35
        <record id="trans_sale_router_loan_done" model="workflow.transition">
36
            <field name="act_from" ref="sale.act_router" />
37
            <field name="act_to" ref="act_sale_loan_done" />
38
            <field name="condition">order_type!='loan' or loan_id</field>
39
        </record>
40
        <record id="trans_sale_loan_done" model="workflow.transition">
41
            <field name="act_from" ref="act_sale_loan"/>
42
            <field name="act_to" ref="act_sale_loan_done"/>
43
            <field name="signal">subflow.done</field>
44
        </record>
45
        <record id="trans_sale_loand_done_end" model="workflow.transition">
46
            <field name="act_from" ref="act_sale_loan_done" />
47
            <field name="act_to" ref="sale.act_done" />
48
        </record>
49
        <record id="sale.trans_router_wait_invoice_shipping" model="workflow.transition">
50
            <field name="act_from" ref="sale.act_wait_invoice"/>
51
            <field name="act_to" ref="sale.act_invoice_end"/>
52
            <field name="condition">(order_policy=='picking') or order_type!='regular' or (order_type=='regular' and partner_id.partner_type=='internal')</field>
53
        </record>
892.7.1 by chloups208
uf-1050 split Fo, action_ship_proc_create
54
        
55
        <!-- SPLIT STEP -->
56
        
57
        <record id="act_sale_order_split" model="workflow.activity">
58
            <field name="wkf_id" ref="sale.wkf_sale" />
59
            <field name="name">order_split</field>
60
            <field name="kind">function</field>
61
            <field name="action">wkf_split()</field>
62
        </record>
63
        
64
        <record id="trans_validated_split" model="workflow.transition">
65
            <field name="act_from" ref="act_sale_order_validated" />
66
            <field name="act_to" ref="act_sale_order_split" />
67
            <field name="signal">order_confirm</field>
892.7.43 by chloups208
uf-1050 yml tests backward compatibility
68
            <field name="condition">split_type_sale_order == 'original_sale_order' and not from_yml_test</field>
892.7.1 by chloups208
uf-1050 split Fo, action_ship_proc_create
69
        </record>
70
        
71
        <!-- new DONE STEP -->
72
        
73
        <record id="act_sale_order_split_done" model="workflow.activity">
74
            <field name="wkf_id" ref="sale.wkf_sale" />
75
            <field name="flow_stop">True</field>
76
            <field name="name">split_done</field>
77
            <field name="kind">function</field>
78
            <field name="action">wkf_split_done()</field>
79
        </record>
80
        
81
        <record id="trans_split_split_done" model="workflow.transition">
82
            <field name="act_from" ref="act_sale_order_split" />
83
            <field name="act_to" ref="act_sale_order_split_done" />
84
            <field name="condition">True</field>
85
        </record>
86
        
87
        <!-- SHIP_PROCUREMENT STEP -->
88
        
89
        <record id="act_sale_order_ship_procurement" model="workflow.activity">
90
            <field name="wkf_id" ref="sale.wkf_sale" />
91
            <field name="name">ship_procurement</field>
92
            <field name="kind">function</field>
93
            <field name="action">action_ship_proc_create()</field>
94
        </record>
95
        
96
        <record id="trans_validated_ship_procurement" model="workflow.transition">
97
            <field name="act_from" ref="act_sale_order_validated" />
98
            <field name="act_to" ref="act_sale_order_ship_procurement" />
99
            <field name="signal">order_confirm</field>
892.7.43 by chloups208
uf-1050 yml tests backward compatibility
100
            <field name="condition">split_type_sale_order != 'original_sale_order' or from_yml_test</field>
892.7.1 by chloups208
uf-1050 split Fo, action_ship_proc_create
101
        </record>
102
        
103
        <record id="trans_ship_procurement_router" model="workflow.transition">
104
            <field name="act_from" ref="act_sale_order_ship_procurement"/>
105
            <field name="act_to" ref="sale.act_router"/>
892.7.6 by chloups208
uf-1050 moved action_wait from sale_override, new state for purchase order, defined method for transition condition from ship_procurement to router
106
            <field name="condition">test_lines()</field>
892.7.1 by chloups208
uf-1050 split Fo, action_ship_proc_create
107
        </record>
892.7.44 by chloups208
uf-1050 transition from draft to router is modified from draft to ship_procurement. for backward comptabitility so the ship_procurement step is always reached and the procurement order is created
108
        
109
        <!-- MODIFY Transition so ship_procurement is always reached. yml backward compatibility, so procurement orders are created -->
110
        
111
        <record id="sale.trans_draft_router" model="workflow.transition">
892.7.45 by chloups208
uf-1050 referenche act_draft step with the module name
112
            <field name="act_from" ref="sale.act_draft"/>
892.7.44 by chloups208
uf-1050 transition from draft to router is modified from draft to ship_procurement. for backward comptabitility so the ship_procurement step is always reached and the procurement order is created
113
            <field name="act_to" ref="act_sale_order_ship_procurement"/>
114
            <field name="signal">order_confirm</field>
115
        </record>
451.5.3 by Quentin THEURET
UF-631 [IMP] Added a manually_done activity and transitions on sale order workflow
116
243.1.1 by Quentin THEURET
UF-370 [ADD] Added reason types_moves module
117
    </data>
451.5.3 by Quentin THEURET
UF-631 [IMP] Added a manually_done activity and transitions on sale order workflow
118
</openerp>