-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathis_inventaire_view.xml
460 lines (433 loc) · 22.6 KB
/
is_inventaire_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- is.inventaire -->
<record model="ir.ui.view" id="is_inventaire_form_view">
<field name="name">is_inventaire_form_view</field>
<field name="model">is.inventaire</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Form">
<header>
<button name="action_creer_feuille" type="object" string="Nouvelle feuille" states="creation" class="oe_highlight"/>
<button name="action_lignes_inventaire" type="object" string="Lignes inventaire"/>
<button name="action_ecarts_inventaire" type="object" string="Ecarts inventaire" states="traite"/>
<button name="action_anomalies_import_inventaire" type="object" string="Anomalies import inventaire" states="traite"/>
<field name="state" widget="statusbar" clickable="True" />
</header>
<sheet>
<group>
<group>
<field name="name"/>
<field name="date_creation"/>
<field name="createur_id"/>
<field name="selection"/>
<field name="commentaire"/>
</group>
</group>
<group string="Feuilles" attrs="{'invisible': [('line_ids', '=', [])]}">
<field name="line_ids" nolabel="1" readonly="1" >
<tree limit="200">
<button string="Feuille" name="action_acceder_feuille" type="object" icon="gtk-zoom-in" />
<field name="name"/>
<field name="date_creation"/>
<field name="createur_id" />
</tree>
</field>
</group>
<group string="Inventaires" states="cloture,traite">
<field name="inventory_ids" nolabel="1" >
<tree editable="bottom">
<button string="Inventaire" name="action_acceder_inventaire" type="object" icon="gtk-zoom-in" />
<field name="inventory_id"/>
</tree>
</field>
</group>
<!--
<group string="Ecarts" states="cloture,traite">
<field name="ecart_ids" nolabel="1" >
<tree editable="bottom" colors="red:ecart < 0">
<field name="location_id"/>
<field name="product_id"/>
<field name="us_id"/>
<field name="qt_odoo"/>
<field name="qt_inventaire"/>
<field name="ecart"/>
<field name="lieu"/>
</tree>
</field>
</group>
-->
<!--
<group string="Anomalies" states="traite">
<field name="anomalie_ids" nolabel="1" >
<tree editable="bottom">
<field name="location_id"/>
<field name="product_id"/>
<field name="qt_odoo"/>
<field name="qt_inventaire"/>
<field name="ecart"/>
<field name="theoretical_qty"/>
<field name="product_qty"/>
<field name="ecart_odoo"/>
<field name="anomalie"/>
</tree>
</field>
</group>
-->
</sheet>
<footer>
<button name="action_fin_inventaire" type="object" string="Fin d'inventaire" states="creation" confirm="Voulez-vous vraiment cloturer cet inventaire ?"/>
<button name="action_valide_inventaire" type="object" string="Valider les inventaires" class="oe_highlight" states="cloture" confirm="Voulez-vous vraiment mettre à jour les stocks ?"/>
</footer>
</form>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_tree_view">
<field name="name">is_inventaire_tree_view</field>
<field name="model">is.inventaire</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'creation'; red:state == 'cloture'; gray:state == 'traite'">
<field name="name"/>
<field name="date_creation"/>
<field name="createur_id"/>
<field name="commentaire"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_search_view" >
<field name="name">is_inventaire_search_view</field>
<field name="model">is.inventaire</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="createur_id"/>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="is_inventaire_action">
<field name="name">Inventaire</field>
<field name="res_model">is.inventaire</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!--Cette action server, permet d'executer la fonction python indiquée -->
<record id="is_action_mark_as_lost" model="ir.actions.server">
<field name="name">Importer depuis Prodstar</field>
<field name="model_id" ref="model_is_inventaire_feuille"/>
<field name="state">code</field>
<field name="code">
self.action_import_prodstar(cr, uid, context['active_ids'], context=context)
</field>
</record>
<!-- Ce record permet d'ajouter un sous-menu au bouton 'Autres options' et d'appeller l'action server précédente -->
<record id="is_ir_mark_as_lost" model="ir.values">
<field eval="'client_action_multi'" name="key2"/>
<field eval="'is.inventaire.feuille'" name="model"/>
<field name="name">Importer depuis Prodstar</field>
<field eval="'ir.actions.server,%d'%is_action_mark_as_lost" name="value"/>
</record>
<record model="ir.ui.view" id="is_inventaire_feuille_form_view">
<field name="name">is_inventaire_feuille_form_view</field>
<field name="model">is.inventaire.feuille</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Form">
<header>
<button name="action_creer_feuille" type="object" string="Nouvelle feuille" class="oe_highlight" />
</header>
<sheet class="oe_form_sheet_width_wider">
<group>
<group>
<field name="inventaire_id"/>
<field name="name"/>
</group>
<group>
<field name="date_creation"/>
<field name="createur_id"/>
<!--<field name="fichier" /> -->
</group>
</group>
<group>
<div style="color:green">Astuce : Pour la saisie des lignes, vous pouvez utiliser la touche TAB pour passer au champ suivant ou à la ligne suivante pour éviter d'utiliser la souris. La barre d'espace permet de cocher ou décocher une case</div>
</group>
<group>
<field name="line_ids" nolabel="1">
<tree editable="bottom"
create="true"
domain="[('location_id','=',location_id.id)]"
colors="blue:encours; red:composant_encours">
<field name="sequence" widget="handle"/>
<field name="product_id" on_change="onchange_product_id(product_id)" />
<field name="encours"/>
<field name="composant_encours" readonly="1"/>
<field name="us_id"/>
<field name="uc"/>
<field name="uc_us"/>
<field name="location_id"
domain="[('usage','=','internal')]"
on_change="onchange_location_id(product_id,location_id,qt_us,qt_uc,lieu)"/>
<field name="qt_us"/>
<field name="qt_uc"/>
<field name="qt_us_calc"/>
<field name="lieu"/>
<field name="lot_id" domain="[('product_id', '=', product_id)]" invisible="1" />
</tree>
</field>
</group>
<group>
<group>
<field name="anomalies"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_feuille_tree_view">
<field name="name">is_inventaire_feuille_tree_view</field>
<field name="model">is.inventaire.feuille</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'creation'; red:state == 'cloture'; gray:state == 'traite'" create="false" >
<field name="inventaire_id"/>
<field name="name"/>
<field name="date_creation"/>
<field name="createur_id"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_feuille_search_view" >
<field name="name">is_inventaire_feuille_search_view</field>
<field name="model">is.inventaire.feuille</field>
<field name="arch" type="xml">
<search>
<field name="inventaire_id"/>
<field name="name"/>
<field name="createur_id"/>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="is_inventaire_feuille_action">
<field name="name">Inventaire Feuille</field>
<field name="res_model">is.inventaire.feuille</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<!-- is.inventaire.line -->
<record model="ir.ui.view" id="is_inventaire_line_tree_view">
<field name="name">is_inventaire_line_tree_view</field>
<field name="model">is.inventaire.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'creation'; red:state == 'cloture'; gray:state == 'traite'" create="false" editable="true" >
<field name="inventaire_id"/>
<field name="feuille_id" readonly="1"/>
<field name="sequence" readonly="1"/>
<field name="product_id" readonly="1" widget="many2one_clickable"/>
<field name="encours" readonly="1"/>
<field name="composant_encours" readonly="1"/>
<field name="uc" readonly="1"/>
<field name="uc_us" readonly="1"/>
<field name="location_id" readonly="1"/>
<field name="qt_us"/>
<field name="qt_uc"/>
<field name="qt_us_calc" sum="Total"/>
<field name="lieu"/>
<field name="lot_id" domain="[('product_id', '=', product_id)]" />
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_line_search_view" >
<field name="name">is_inventaire_line_search_view</field>
<field name="model">is.inventaire.line</field>
<field name="arch" type="xml">
<search>
<field name="inventaire_id"/>
<field name="feuille_id"/>
<field name="product_id"/>
<field name="location_id"/>
<field name="lieu"/>
<group expand="1" string="Regrouper par">
<filter string="Inventaire" context="{'group_by':'inventaire_id'}"/>
<filter string="Feuille" context="{'group_by':'feuille_id'}"/>
<filter string="Emplacement" context="{'group_by':'location_id'}"/>
<filter string="Article" context="{'group_by':'product_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="is_inventaire_line_action">
<field name="name">Inventaire Ligne</field>
<field name="res_model">is.inventaire.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
<!-- stock.inventory.tree -->
<record id="stock.view_inventory_tree" model="ir.ui.view">
<field name="name">stock.inventory.tree</field>
<field name="model">stock.inventory</field>
<field name="arch" type="xml">
<tree string="Lot Inventory" colors="grey:state == 'cancel'">
<field name="name"/>
<field name="location_id"/>
<field name="date"/>
<field name="state"/>
</tree>
</field>
</record>
<!-- Remplacement de la vue par défaut pour ajouter 'sheet' -->
<record model="ir.ui.view" id="stock.view_stock_quant_form">
<field name="name">stock.quant.form</field>
<field name="model">stock.quant</field>
<field eval="10" name="priority"/>
<field name="arch" type="xml">
<form string="Quants" create="false" edit="false" delete="false">
<sheet>
<div class="oe_right oe_button_box">
<button name="action_view_quant_history" type="object" string="Quant History"/>
</div>
<group>
<field name="product_id"/>
<field name="qty"/>
<field name="lot_id" groups="stock.group_production_lot"/>
<field name="package_id" groups="stock.group_tracking_lot"/>
<field name="location_id"/>
<field name="in_date"/>
<field name="reservation_id"/>
<field name="propagated_from_id"/>
<field name="owner_id" groups="stock.group_tracking_owner"/>
<field name="inventory_value"/>
</group>
</sheet>
</form>
</field>
</record>
<!-- is.inventaire.ecart -->
<record model="ir.ui.view" id="is_inventaire_ecart_tree_view">
<field name="name">is_inventaire_ecart_tree_view</field>
<field name="model">is.inventaire.ecart</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree create="false" editable="false" >
<field name="product_id" readonly="1" widget="many2one_clickable"/>
<field name="code" readonly="1"/>
<field name="designation" readonly="1"/>
<field name="location_id" readonly="1"/>
<field name="us_id" readonly="1"/>
<field name="qt_odoo" readonly="1" sum="Total"/>
<field name="qt_inventaire" readonly="1" sum="Total"/>
<field name="ecart" readonly="1" sum="Total"/>
<field name="cout_actualise" readonly="1"/>
<field name="valorisation_ecart" readonly="1" sum="Total"/>
<field name="lieu" readonly="1"/>
<field name="selection"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_ecart_form_view">
<field name="name">is_inventaire_ecart_form_view</field>
<field name="model">is.inventaire.ecart</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form create="false" editable="false">
<sheet>
<group>
<field name="location_id"/>
<field name="product_id"/>
<field name="us_id"/>
<field name="qt_odoo"/>
<field name="qt_inventaire"/>
<field name="ecart"/>
<field name="cout_actualise"/>
<field name="valorisation_ecart"/>
<field name="lieu"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_ecart_search_view" >
<field name="name">is_inventaire_ecart_search_view</field>
<field name="model">is.inventaire.ecart</field>
<field name="arch" type="xml">
<search>
<field name="product_id"/>
<field name="location_id"/>
<field name="lieu"/>
<group expand="1" string="Regrouper par">
<filter string="Article" context="{'group_by':'product_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="is_inventaire_ecart_action">
<field name="name">Ecarts Inventaire</field>
<field name="res_model">is.inventaire.ecart</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
<!-- is.inventaire.anomalie -->
<record model="ir.ui.view" id="is_inventaire_anomalie_tree_view">
<field name="name">is_inventaire_anomalie_tree_view</field>
<field name="model">is.inventaire.anomalie</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree create="false">
<field name="location_id"/>
<field name="code"/>
<field name="designation"/>
<field name="qt_odoo"/>
<field name="qt_inventaire"/>
<field name="ecart"/>
<field name="theoretical_qty"/>
<field name="product_qty"/>
<field name="ecart_odoo"/>
<field name="anomalie"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_anomalie_form_view">
<field name="name">is_inventaire_anomalie_form_view</field>
<field name="model">is.inventaire.anomalie</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form create="false" editable="false">
<sheet>
<group>
<field name="location_id"/>
<field name="product_id"/>
<field name="qt_odoo"/>
<field name="qt_inventaire"/>
<field name="ecart"/>
<field name="theoretical_qty"/>
<field name="product_qty"/>
<field name="ecart_odoo"/>
<field name="anomalie"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.ui.view" id="is_inventaire_anomalie_search_view" >
<field name="name">is_inventaire_anomalie_search_view</field>
<field name="model">is.inventaire.anomalie</field>
<field name="arch" type="xml">
<search>
<field name="location_id"/>
<field name="product_id"/>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="is_inventaire_anomalie_action">
<field name="name">Anomalies Inventaire</field>
<field name="res_model">is.inventaire.anomalie</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
</data>
</openerp>