1
<?xml version="1.0" encoding="utf-8" ?>
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>
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>
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>
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>
30
<record id="trans_draft_cancel" model="workflow.transition">
31
<field name="act_from" ref="act_sale_order_validated"/>
32
<field name="act_to" ref="sale.act_cancel"/>
33
<field name="signal">cancel</field>
36
<record id="trans_sale_router_loan" model="workflow.transition">
37
<field name="act_from" ref="sale.act_router" />
38
<field name="act_to" ref="act_sale_loan" />
39
<field name="condition">order_type=='loan' and not loan_id and not is_a_counterpart</field>
41
<record id="trans_sale_router_loan_done" model="workflow.transition">
42
<field name="act_from" ref="sale.act_router" />
43
<field name="act_to" ref="act_sale_loan_done" />
44
<field name="condition">order_type!='loan' or loan_id or is_a_counterpart</field>
46
<record id="trans_sale_loan_done" model="workflow.transition">
47
<field name="act_from" ref="act_sale_loan"/>
48
<field name="act_to" ref="act_sale_loan_done"/>
49
<field name="signal">subflow.done</field>
51
<record id="trans_sale_loand_done_end" model="workflow.transition">
52
<field name="act_from" ref="act_sale_loan_done" />
53
<field name="act_to" ref="sale.act_done" />
55
<record id="sale.trans_router_wait_invoice_shipping" model="workflow.transition">
56
<field name="act_from" ref="sale.act_wait_invoice"/>
57
<field name="act_to" ref="sale.act_invoice_end"/>
58
<field name="condition">(order_policy=='picking') or order_type!='regular' or (order_type=='regular' and partner_id.partner_type=='internal')</field>
61
<!--<record id="sale.act_ship_corrected" model="workflow.activity">
62
<field name="wkf_id" ref="sale.wkf_sale" />
63
<field name="name">ship_corrected</field>
64
<field name="kind">function</field>
65
<field name="action">sale_except_correction()</field>
68
<record id="sale.trans_ship_except_ship_end" model="workflow.transition">
69
<field name="act_from" ref="sale.act_ship_except" />
70
<field name="act_to" ref="sale.act_ship_corrected" />-->
71
<!--<field name="signal">ship_corrected</field>-->
72
<!-- <field name="signal" eval="False" />
75
<record id="sale.trans_ship_corrected_ship_end" model="workflow.transition">
76
<field name="act_from" ref="sale.act_ship_corrected" />
77
<field name="act_to" ref="sale.act_ship" />
82
<record id="act_sale_order_split" model="workflow.activity">
83
<field name="wkf_id" ref="sale.wkf_sale" />
84
<field name="name">order_split</field>
85
<field name="kind">function</field>
86
<field name="action">wkf_split()</field>
89
<record id="trans_validated_split" model="workflow.transition">
90
<field name="act_from" ref="act_sale_order_validated" />
91
<field name="act_to" ref="act_sale_order_split" />
92
<field name="signal">order_confirm</field>
93
<field name="condition">split_type_sale_order == 'original_sale_order' and not from_yml_test</field>
96
<!-- new DONE STEP -->
98
<record id="act_sale_order_split_done" model="workflow.activity">
99
<field name="wkf_id" ref="sale.wkf_sale" />
100
<field name="flow_stop">True</field>
101
<field name="name">split_done</field>
102
<field name="kind">function</field>
103
<field name="action">wkf_split_done()</field>
106
<record id="trans_split_split_done" model="workflow.transition">
107
<field name="act_from" ref="act_sale_order_split" />
108
<field name="act_to" ref="act_sale_order_split_done" />
109
<field name="condition">True</field>
112
<!-- SHIP_PROCUREMENT STEP -->
114
<record id="act_sale_order_ship_procurement" model="workflow.activity">
115
<field name="wkf_id" ref="sale.wkf_sale" />
116
<field name="name">ship_procurement</field>
117
<field name="kind">function</field>
118
<field name="action">action_ship_proc_create()</field>
121
<record id="trans_validated_ship_procurement" model="workflow.transition">
122
<field name="act_from" ref="act_sale_order_validated" />
123
<field name="act_to" ref="act_sale_order_ship_procurement" />
124
<field name="signal">order_confirm</field>
125
<field name="condition">split_type_sale_order != 'original_sale_order' or from_yml_test</field>
128
<record id="trans_ship_procurement_router" model="workflow.transition">
129
<field name="act_from" ref="act_sale_order_ship_procurement"/>
130
<field name="act_to" ref="sale.act_router"/>
131
<field name="condition">test_lines()</field>
134
<!-- MODIFY Transition so ship_procurement is always reached. yml backward compatibility, so procurement orders are created -->
136
<record id="sale.trans_draft_router" model="workflow.transition">
137
<field name="act_from" ref="sale.act_draft"/>
138
<field name="act_to" ref="act_sale_order_ship_procurement"/>
139
<field name="signal">order_confirm</field>