33
33
<field name="act_from" ref="act_loan_done" />
34
34
<field name="act_to" ref="purchase.act_done" />
37
<!-- Redefine the signal to go from Receipt Exception to Closed states -->
38
<record id="purchase.trans_except_picking_picking_done" model="workflow.transition">
39
<field name="act_from" ref="purchase.act_except_picking" />
40
<field name="act_to" ref="purchase.act_picking_done" />
41
<field name="signal" eval="False" />
44
<!-- Redefine the condition to take into account the DPO process (invoice create at confirmation, but
45
the workflow isn't blocked by the invoicing process) -->
46
<record id="act_dpo_invoice" model="workflow.activity">
47
<field name="wkf_id" ref="purchase.purchase_order"/>
48
<field name="name">dpo_invoice</field>
49
<field name="kind">function</field>
50
<field name="action">action_invoice_create()</field>
53
<record id="trans_router_dpo_invoice" model="workflow.transition">
54
<field name="act_from" ref="purchase.act_router"/>
55
<field name="act_to" ref="act_dpo_invoice"/>
56
<field name="condition">invoice_method=='order' and order_type=='direct'</field>
58
<record id="trans_dpo_invoice_invoice_done" model="workflow.transition">
59
<field name="act_from" ref="act_dpo_invoice"/>
60
<field name="act_to" ref="purchase.act_invoice_done"/>
62
<record id="purchase.trans_router_invoice" model="workflow.transition">
63
<field name="condition">invoice_method=='order' and order_type!='direct'</field>
66
<!-- Modify the action of the approved activity because DPO shouldn't be received
67
if any user hasn't validated the reception at the customer side -->
68
<record id="purchase.act_picking_done" model="workflow.activity">
69
<field name="wkf_id" ref="purchase.purchase_order"/>
70
<field name="name">picking_done</field>
71
<field name="action">wkf_picking_done()</field>
72
<field name="kind">function</field>
73
<field name="signal_send">subflow.delivery_done</field>
76
<!-- Add an activity to wait the confirmation of the reception of the DPO at customer side -->
77
<record id="act_dpo_wait" model="workflow.activity">
78
<field name="wkf_id" ref="purchase.purchase_order"/>
79
<field name="name">dpo_wait</field>
80
<field name="kind">dummy</field>
83
<record id="trans_router_dpo_wait" model="workflow.transition">
84
<field name="act_from" ref="purchase.act_router"/>
85
<field name="act_to" ref="act_dpo_wait"/>
86
<field name="condition">order_type=='direct'</field>
88
<record id="trans_dpo_wait_loan_done" model="workflow.transition">
89
<field name="act_from" ref="act_dpo_wait" />
90
<field name="act_to" ref="act_loan_done" />
91
<field name="signal">dpo_received</field>
94
<!-- Redefine Cancel and Done activites for Accounting Commitments -->
95
<record id="purchase.act_cancel" model="workflow.activity">
96
<field name="wkf_id" ref="purchase.purchase_order"/>
97
<field name="name">cancel</field>
98
<field name="kind">function</field>
99
<field name="flow_stop" eval="False" />
100
<field name="action">wkf_action_cancel_po()</field>
101
<field name="signal_send">subflow.cancel</field>
104
<record id="purchase.act_done" model="workflow.activity">
105
<field name="wkf_id" ref="purchase.purchase_order"/>
106
<field name="name">done</field>
107
<field name="action">action_done()</field>
108
<field name="kind">function</field>
109
<field name="flow_stop">True</field>
110
<field name="join_mode">AND</field>
113
<!-- CONFIRMED_WAIT state -->
115
<record id="act_confirmed_wait" model="workflow.activity">
116
<field name="wkf_id" ref="purchase.purchase_order"/>
117
<field name="name">confirmed_wait</field>
118
<field name="kind">function</field>
119
<field name="action">wkf_confirm_wait_order()</field>
122
<record id="trans_confirmed_confirmed_wait" model="workflow.transition">
123
<field name="act_from" ref="purchase.act_confirmed" />
124
<field name="act_to" ref="act_confirmed_wait" />
125
<field name="signal">purchase_confirmed_wait</field>
126
<field name="condition">check_if_product()</field>
129
<!-- TRIGGER_SO_PO state -->
131
<record id="act_trigger_so_po" model="workflow.activity">
132
<field name="wkf_id" ref="purchase.purchase_order"/>
133
<field name="name">trigger_so_po</field>
134
<field name="kind">function</field>
135
<field name="action">wkf_confirm_trigger()</field>
138
<record id="act_cancel_stop" model="workflow.activity">
139
<field name="wkf_id" ref="purchase.purchase_order" />
140
<field name="name">cancel_stop</field>
141
<field name="kind">function</field>
142
<field name="flow_stop">True</field>
143
<field name="action">wkf_confirm_cancel()</field>
146
<record id="trans_cancel_stop" model="workflow.transition">
147
<field name="act_from" ref="purchase.act_cancel" />
148
<field name="act_to" ref="act_cancel_stop" />
151
<record id="trans_confirmed_wait_trigger_so_po" model="workflow.transition">
152
<field name="act_from" ref="act_confirmed_wait" />
153
<field name="act_to" ref="act_trigger_so_po" />
154
<field name="condition">all_po_confirmed()</field>
157
<record id="trans_trigger_so_po_router" model="workflow.transition">
158
<field name="act_from" ref="act_trigger_so_po" />
159
<field name="act_to" ref="purchase.act_router" />
b'\\ No newline at end of file'