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

« back to all changes in this revision

Viewing changes to msf_processes/process/purchase_process.xml

  • Committer: Olivier DOSSMANN
  • Date: 2013-05-31 14:22:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1687.
  • Revision ID: od@tempo-consulting.fr-20130531142209-sbcwvzuema11guzz
UF-1991 [FIX] Problem with wizard on "msg" field. Change it to "name".

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" ?>
 
2
<openerp>
 
3
    <data>
 
4
 
 
5
        <!--
 
6
            Process
 
7
        -->
 
8
 
 
9
        <record id="purchase.process_process_purchaseprocess0" model="process.process">
 
10
            <field eval="1" name="active"/>
 
11
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
12
            <field eval="&quot;&quot;&quot;Purchase Order&quot;&quot;&quot;" name="name"/>
 
13
        </record>
 
14
 
 
15
        <!--
 
16
            Process Node
 
17
        -->
 
18
 
 
19
        <record id="purchase.process_node_packinginvoice0" model="process.node">
 
20
            <field name="model_id" ref="stock.model_stock_picking"/>
 
21
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
 
22
            <field eval="&quot;&quot;&quot;Outgoing Products&quot;&quot;&quot;" name="name"/>
 
23
            <field eval="&quot;&quot;&quot;Outgoing products to invoice&quot;&quot;&quot;" name="note"/>
 
24
            <field name="process_id" ref="account.process_process_invoiceprocess0"/>
 
25
            <field eval="&quot;&quot;&quot;object.state in ('assigned', 'confirmed')&quot;&quot;&quot;" name="model_states"/>
 
26
            <field eval="0" name="flow_start"/>
 
27
        </record>
 
28
 
 
29
        <record id="purchase.process_node_purchaseorder0" model="process.node">
 
30
            <field name="menu_id" ref="purchase.menu_purchase_form_action"/>
 
31
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
32
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
 
33
            <field eval="&quot;&quot;&quot;Purchase Order&quot;&quot;&quot;" name="name"/>
 
34
            <field eval="&quot;&quot;&quot;Confirmed purchase order to invoice&quot;&quot;&quot;" name="note"/>
 
35
            <field name="process_id" ref="process_process_supplierinvoiceprocess0"/>
 
36
            <field name="subflow_id" ref="purchase.process_process_purchaseprocess0"/>
 
37
            <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
 
38
            <field eval="1" name="flow_start"/>
 
39
        </record>
 
40
 
 
41
        <record id="purchase.process_node_draftpurchaseorder0" model="process.node">
 
42
            <field name="menu_id" ref="purchase.menu_purchase_form_action"/>
 
43
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
44
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
 
45
            <field eval="&quot;&quot;&quot;PO - draft&quot;&quot;&quot;" name="name"/>
 
46
            <field eval="&quot;&quot;&quot;Draft state of purchase order.&quot;&quot;&quot;" name="note"/>
 
47
            <field name="process_id" ref="purchase.process_process_purchaseprocess0"/>
 
48
            <field eval="&quot;&quot;&quot;object.state in ('draft', 'wait', 'confirmed', 'approved', 'except_picking', 'except_invoice', 'done')&quot;&quot;&quot;" name="model_states"/>
 
49
            <field eval="0" name="flow_start"/>
 
50
        </record>
 
51
 
 
52
        <record id="purchase.process_node_draftpurchaseorder1" model="process.node">
 
53
            <field name="menu_id" ref="purchase.menu_purchase_form_action"/>
 
54
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
55
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
 
56
            <field eval="&quot;&quot;&quot;PO - closed&quot;&quot;&quot;" name="name"/>
 
57
            <field eval="&quot;&quot;&quot;Closed state of purchase order.&quot;&quot;&quot;" name="note"/>
 
58
            <field name="process_id" ref="purchase.process_process_purchaseprocess0"/>
 
59
            <field eval="&quot;&quot;&quot;object.state == 'done'&quot;&quot;&quot;" name="model_states"/>
 
60
            <field eval="0" name="flow_start"/>
 
61
        </record>
 
62
 
 
63
        <record id="purchase.process_node_confirmpurchaseorder0" model="process.node">
 
64
            <field name="menu_id" ref="purchase.menu_purchase_form_action"/>
 
65
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
66
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
 
67
            <field eval="&quot;&quot;&quot;PO - validated&quot;&quot;&quot;" name="name"/>
 
68
            <field eval="&quot;&quot;&quot;Validated state of purchase order.&quot;&quot;&quot;" name="note"/>
 
69
            <field name="process_id" ref="purchase.process_process_purchaseprocess0"/>
 
70
            <field eval="&quot;&quot;&quot;object.state in ('confirmed', 'approved', 'except_picking', 'except_invoice', 'done')&quot;&quot;&quot;" name="model_states"/>
 
71
            <field eval="0" name="flow_start"/>
 
72
        </record>
 
73
 
 
74
        <record id="purchase.process_node_approvepurchaseorder0" model="process.node">
 
75
            <field name="menu_id" ref="purchase.menu_purchase_form_action"/>
 
76
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
77
            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
 
78
            <field eval="&quot;&quot;&quot;PO - confirmed&quot;&quot;&quot;" name="name"/>
 
79
            <field eval="&quot;&quot;&quot;Confirmed state of purchase order.&quot;&quot;&quot;" name="note"/>
 
80
            <field name="process_id" ref="purchase.process_process_purchaseprocess0"/>
 
81
            <field eval="&quot;&quot;&quot;object.state in ('approved', 'except_picking', 'except_invoice', 'done')&quot;&quot;&quot;" name="model_states"/>
 
82
            <field eval="0" name="flow_start"/>
 
83
        </record>
 
84
 
 
85
        <record id="purchase.process_node_invoicecontrol0" model="process.node">
 
86
            <field name="menu_id" ref="account.menu_action_invoice_tree2"/>
 
87
            <field name="model_id" ref="account.model_account_invoice"/>
 
88
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
 
89
            <field eval="&quot;&quot;&quot;Draft Invoice&quot;&quot;&quot;" name="name"/>
 
90
            <field eval="&quot;&quot;&quot;To be reviewed by the accountant.&quot;&quot;&quot;" name="note"/>
 
91
            <field name="process_id" ref="purchase.process_process_purchaseprocess0"/>
 
92
            <field name="subflow_id" ref="process_process_supplierinvoiceprocess0"/>
 
93
            <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
 
94
            <field eval="0" name="flow_start"/>
 
95
        </record>
 
96
 
 
97
 
 
98
                <record id="purchase.process_node_packinglist0" model="process.node">
 
99
            <field name="menu_id" ref="stock.menu_action_picking_tree4"/>
 
100
            <field name="model_id" ref="stock.model_stock_picking"/>
 
101
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
 
102
            <field eval="&quot;&quot;&quot;Incoming Products&quot;&quot;&quot;" name="name"/>
 
103
            <field eval="&quot;&quot;&quot;Incoming products subflow.&quot;&quot;&quot;" name="note"/>
 
104
            <field name="process_id" ref="purchase.process_process_purchaseprocess0"/>
 
105
            <field name="subflow_id" ref="stock.process_process_incoming0"/>
 
106
            <field eval="&quot;&quot;&quot;object.state in ('approved', 'except_picking', 'except_invoice', 'done')&quot;&quot;&quot;" name="model_states"/>
 
107
            <field eval="0" name="flow_start"/>
 
108
        </record>
 
109
        
 
110
        <record id="purchase.process_node_productrecept0" model="process.node">
 
111
            <field name="model_id" ref="stock.model_stock_picking"/>
 
112
            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
 
113
            <field eval="&quot;&quot;&quot;Incoming Products&quot;&quot;&quot;" name="name"/>
 
114
            <field eval="&quot;&quot;&quot;Incoming products to control&quot;&quot;&quot;" name="note"/>
 
115
            <field name="subflow_id" ref="purchase.process_process_purchaseprocess0"/>
 
116
            <field name="process_id" ref="process_process_supplierinvoiceprocess0"/>
 
117
            <field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'close')&quot;&quot;&quot;" name="model_states"/>
 
118
            <field eval="0" name="flow_start"/>
 
119
        </record>
 
120
        
 
121
        <delete model="process.node" id="purchase.process_node_invoiceafterpacking0"/>
 
122
 
 
123
        <!--
 
124
            Process Condition
 
125
        -->
 
126
<!-- 
 
127
        <record id="purchase.process_condition_conditionorigin" model="process.condition">
 
128
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
129
            <field name="node_id" ref="purchase.process_node_draftpurchaseorder1"/>
 
130
            <field eval="&quot;&quot;&quot;object.origin==''&quot;&quot;&quot;" name="model_states"/>
 
131
            <field eval="&quot;&quot;&quot;condition_origin&quot;&quot;&quot;" name="name"/>
 
132
        </record>
 
133
 -->
 
134
<!-- 
 
135
        <record id="purchase.process_condition_conditioninvoicemanual" model="process.condition">
 
136
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
137
            <field name="node_id" ref="purchase.process_node_invoicecontrol0"/>
 
138
            <field eval="&quot;&quot;&quot;object.invoice_method=='manual'&quot;&quot;&quot;" name="model_states"/>
 
139
            <field eval="&quot;&quot;&quot;condition_invoice_manual&quot;&quot;&quot;" name="name"/>
 
140
        </record>
 
141
 -->
 
142
 
 
143
                <record id="purchase.process_condition_po_draft_not_rfq" model="process.condition">
 
144
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
145
            <field name="node_id" ref="purchase.process_node_draftpurchaseorder0"/>
 
146
            <field eval="&quot;&quot;&quot;not object.rfq_ok&quot;&quot;&quot;" name="model_states"/>
 
147
            <field eval="&quot;&quot;&quot;condition_po_draft&quot;&quot;&quot;" name="name"/>
 
148
        </record>
 
149
        
 
150
        <record id="purchase.process_condition_po_validated_not_rfq" model="process.condition">
 
151
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
152
            <field name="node_id" ref="purchase.process_node_confirmpurchaseorder0"/>
 
153
            <field eval="&quot;&quot;&quot;not object.rfq_ok&quot;&quot;&quot;" name="model_states"/>
 
154
            <field eval="&quot;&quot;&quot;condition_po_validated&quot;&quot;&quot;" name="name"/>
 
155
        </record>
 
156
        
 
157
        <record id="purchase.process_condition_po_confirmed_not_rfq" model="process.condition">
 
158
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
159
            <field name="node_id" ref="purchase.process_node_approvepurchaseorder0"/>
 
160
            <field eval="&quot;&quot;&quot;not object.rfq_ok&quot;&quot;&quot;" name="model_states"/>
 
161
            <field eval="&quot;&quot;&quot;condition_po_confirmed&quot;&quot;&quot;" name="name"/>
 
162
        </record>
 
163
        
 
164
        <record id="purchase.process_condition_po_done_not_rfq" model="process.condition">
 
165
            <field name="model_id" ref="purchase.model_purchase_order"/>
 
166
            <field name="node_id" ref="purchase.process_node_draftpurchaseorder1"/>
 
167
            <field eval="&quot;&quot;&quot;not object.rfq_ok&quot;&quot;&quot;" name="model_states"/>
 
168
            <field eval="&quot;&quot;&quot;condition_po_done&quot;&quot;&quot;" name="name"/>
 
169
        </record>
 
170
        
 
171
        <!--
 
172
            Process Transition
 
173
        -->
 
174
        
 
175
        <record id="purchase.process_transition_confirmingpurchaseorder0" model="process.transition">
 
176
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
177
            <field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
 
178
            <field eval="&quot;&quot;&quot;The buyer has to approve the RFQ before being sent to the supplier. The RFQ becomes a confirmed Purchase Order.&quot;&quot;&quot;" name="note"/>
 
179
            <field model="process.node" name="target_node_id" ref="purchase.process_node_confirmpurchaseorder0"/>
 
180
            <field model="process.node" name="source_node_id" ref="purchase.process_node_draftpurchaseorder0"/>
 
181
            <field eval="[(6,0,[ref('purchase.trans_draft_confirmed')])]" name="transition_ids"/>
 
182
        </record>
 
183
 
 
184
        <record id="purchase.process_transition_confirmingpurchaseorder1" model="process.transition">
 
185
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
186
            <field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
 
187
            <field eval="&quot;&quot;&quot;In case there is no supplier for this product, the buyer can fill the form manually and confirm it. The RFQ becomes a confirmed Purchase Order.&quot;&quot;&quot;" name="note"/>
 
188
            <field model="process.node" name="source_node_id" ref="purchase.process_node_approvepurchaseorder0"/>
 
189
            <field model="process.node" name="target_node_id" ref="purchase.process_node_draftpurchaseorder1"/>
 
190
        </record>
 
191
 
 
192
        <record id="purchase.process_transition_approvingpurchaseorder0" model="process.transition">
 
193
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
194
            <field eval="&quot;&quot;&quot;Approbation&quot;&quot;&quot;" name="name"/>
 
195
            <field eval="&quot;&quot;&quot;The supplier approves the Purchase Order.&quot;&quot;&quot;" name="note"/>
 
196
            <field model="process.node" name="target_node_id" ref="purchase.process_node_approvepurchaseorder0"/>
 
197
            <field model="process.node" name="source_node_id" ref="purchase.process_node_confirmpurchaseorder0" />
 
198
        </record>
 
199
<!-- 
 
200
        <record id="purchase.process_transition_invoicefrompurchase0" model="process.transition">
 
201
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
202
            <field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
 
203
            <field eval="&quot;&quot;&quot;The invoice is created automatically if the Invoice control of the purchase order is 'On order'. The invoice can also be generated manually by the accountant (Invoice control = Manual).&quot;&quot;&quot;" name="note"/>
 
204
            <field model="process.node" name="target_node_id" ref="purchase.process_node_invoicecontrol0"/>
 
205
            <field model="process.node" name="source_node_id" ref="purchase.process_node_approvepurchaseorder0"/>
 
206
            <field eval="[(6,0,[ref('purchase.trans_router_invoice')])]" name="transition_ids"/>
 
207
        </record>
 
208
 -->
 
209
        <record id="purchase.process_transition_createpackinglist0" model="process.transition">
 
210
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
211
            <field eval="&quot;&quot;&quot;Pick list generated&quot;&quot;&quot;" name="name"/>
 
212
            <field eval="&quot;&quot;&quot;A pick list is generated to track the incoming products.&quot;&quot;&quot;" name="note"/>
 
213
            <field model="process.node" name="target_node_id" ref="purchase.process_node_packinglist0"/>
 
214
            <field model="process.node" name="source_node_id" ref="purchase.process_node_approvepurchaseorder0"/>
 
215
        </record>
 
216
        
 
217
        <record id="purchase.process_transition_invoicefrompackinglist0" model="process.transition">
 
218
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
219
            <field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
 
220
            <field eval="&quot;&quot;&quot;The invoice is created automatically if the Invoice control of the purchase order is 'On picking'. The invoice can also be generated manually by the accountant (Invoice control = Manual).&quot;&quot;&quot;" name="note"/>
 
221
            <field model="process.node" name="target_node_id" ref="purchase.process_node_invoicecontrol0"/>
 
222
            <field model="process.node" name="source_node_id" ref="purchase.process_node_packinglist0"/>
 
223
        </record>
 
224
 
 
225
        <record id="purchase.process_transition_purchaseinvoice0" model="process.transition">
 
226
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
227
            <field eval="&quot;&quot;&quot;From a purchase order&quot;&quot;&quot;" name="name"/>
 
228
            <field eval="&quot;&quot;&quot;A purchase order generates a supplier invoice, as soon as it is confirmed by the buyer. Depending on the Invoicing control of the purchase order, the invoice is based on received or on ordered quantities.&quot;&quot;&quot;" name="note"/>
 
229
            <field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
 
230
            <field model="process.node" name="source_node_id" ref="purchase.process_node_purchaseorder0"/>
 
231
        </record>
 
232
 
 
233
        <record id="purchase.process_transition_productrecept0" model="process.transition">
 
234
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
235
            <field eval="&quot;&quot;&quot;From a Pick list&quot;&quot;&quot;" name="name"/>
 
236
            <field eval="&quot;&quot;&quot;A Pick list generates a supplier invoice. Depending on the Invoicing control of the purchase order, the invoice is based on received or on ordered quantities.&quot;&quot;&quot;" name="note"/>
 
237
            <field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
 
238
            <field model="process.node" name="source_node_id" ref="purchase.process_node_productrecept0"/>
 
239
        </record>
 
240
 
 
241
        <record id="purchase.process_transition_packinginvoice0" model="process.transition">
 
242
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
243
            <field eval="&quot;&quot;&quot;From a Pick list&quot;&quot;&quot;" name="name"/>
 
244
            <field eval="&quot;&quot;&quot;A Pick list generates an invoice. Depending on the Invoicing control of the sale order, the invoice is based on delivered or on ordered quantities.&quot;&quot;&quot;" name="note"/>
 
245
            <field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
 
246
            <field model="process.node" name="source_node_id" ref="purchase.process_node_packinginvoice0"/>
 
247
        </record>
 
248
 
 
249
        <record id="purchase.process_transition_openincoming0" model="process.transition">
 
250
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
251
            <field eval="&quot;&quot;&quot;From a Pick list&quot;&quot;&quot;" name="name"/>
 
252
            <field eval="&quot;&quot;&quot;A Pick list generates an invoice. Depending on the Invoicing control of the sale order, the invoice is based on delivered or on ordered quantities.&quot;&quot;&quot;" name="note"/>
 
253
            <field model="process.node" name="target_node_id" ref="purchase.process_node_productrecept0"/>
 
254
            <field model="process.node" name="source_node_id" ref="purchase.process_node_purchaseorder0"/>
 
255
        </record>
 
256
        
 
257
        <record id="purchase.process_transition_purchasecommitment0" model="process.transition">
 
258
            <field eval="[(6,0,[])]" name="transition_ids"/>
 
259
            <field eval="&quot;&quot;&quot;From a purchase order&quot;&quot;&quot;" name="name"/>
 
260
            <field eval="&quot;&quot;&quot;A purchase order generates a commitment voucher, as soon as it is confirmed by the buyer.&quot;&quot;&quot;" name="note"/>
 
261
            <field model="process.node" name="target_node_id" ref="process_node_supplierdraftcommitment0"/>
 
262
            <field model="process.node" name="source_node_id" ref="purchase.process_node_purchaseorder0"/>
 
263
        </record>
 
264
 
 
265
        <!--
 
266
            Process Action
 
267
        -->
 
268
 
 
269
        <record id="purchase.process_transition_action_confirmpurchaseorder0" model="process.transition.action">
 
270
            <field eval="&quot;&quot;&quot;wkf_confirm_order&quot;&quot;&quot;" name="action"/>
 
271
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
 
272
            <field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
 
273
            <field name="transition_id" ref="purchase.process_transition_confirmingpurchaseorder0"/>
 
274
        </record>
 
275
 
 
276
        <record id="purchase.process_transition_action_cancelpurchaseorder0" model="process.transition.action">
 
277
            <field eval="&quot;&quot;&quot;write({'state':'cancel'})&quot;&quot;&quot;" name="action"/>
 
278
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
 
279
            <field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
 
280
            <field name="transition_id" ref="purchase.process_transition_confirmingpurchaseorder0"/>
 
281
        </record>
 
282
 
 
283
        <record id="purchase.process_transition_action_approvingpurchaseorder0" model="process.transition.action">
 
284
            <field eval="&quot;&quot;&quot;wkf_approve_order&quot;&quot;&quot;" name="action"/>
 
285
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
 
286
            <field eval="&quot;&quot;&quot;Approve&quot;&quot;&quot;" name="name"/>
 
287
            <field name="transition_id" ref="purchase.process_transition_approvingpurchaseorder0"/>
 
288
        </record>
 
289
 
 
290
        <record id="purchase.process_transition_action_approvingcancelpurchaseorder0" model="process.transition.action">
 
291
            <field eval="&quot;&quot;&quot;write({'state':'cancel'})&quot;&quot;&quot;" name="action"/>
 
292
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
 
293
            <field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
 
294
            <field name="transition_id" ref="purchase.process_transition_approvingpurchaseorder0"/>
 
295
        </record>
 
296
<!-- 
 
297
        <record id="purchase.process_transition_action_invoicefrompurchaseorder0" model="process.transition.action">
 
298
            <field eval="&quot;&quot;&quot;action_invoice_create&quot;&quot;&quot;" name="action"/>
 
299
            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
 
300
            <field eval="&quot;&quot;&quot;Create invoice&quot;&quot;&quot;" name="name"/>
 
301
            <field name="transition_id" ref="purchase.process_transition_invoicefrompurchase0"/>
 
302
        </record>
 
303
 -->
 
304
    </data>
 
305
</openerp>