Merge lp:~syleam/wms/5.0-alnslang into lp:wms

Proposed by Sebastien LANGE - http://www.Syleam.fr on 2011-04-19
Status: Needs review
Proposed branch: lp:~syleam/wms/5.0-alnslang
Merge into: lp:wms
Diff against target: 1075 lines (+491/-117)
14 files modified
wms/i18n/fr_FR.po (+12/-12)
wms/object/picking.py (+25/-2)
wms/wizard/wizard_partial_picking.py (+5/-3)
wms_inventory/__terp__.py (+2/-1)
wms_inventory/i18n/fr_FR.po (+119/-59)
wms_inventory/i18n/wms_inventory.pot (+105/-32)
wms_inventory/security/ir.model.access.csv (+2/-1)
wms_inventory/wizard/__init__.py (+4/-3)
wms_inventory/wizard/product_affect_location.py (+130/-0)
wms_inventory/wizard/product_affect_location.xml (+73/-0)
wms_location/i18n/fr_FR.po (+2/-2)
wms_location/object/location.py (+3/-1)
wms_sale/object/move.py (+8/-0)
wms_sale/wizard/compute_pump.py (+1/-1)
To merge this branch: bzr merge lp:~syleam/wms/5.0-alnslang
Reviewer Review Type Date Requested Status
OpenERP WMS Commiter 2011-04-19 Pending
Review via email: mp+58394@code.launchpad.net

Description of the change

Christophe,

This branch fixed bug and merged with the branches from Jean-Sébastien and Sylvain for customer's project.

Could you please check and merge it asap ?

Thanks

To post a comment you must log in.
lp:~syleam/wms/5.0-alnslang updated on 2011-05-07
229. By Sebastien LANGE - http://www.Syleam.fr on 2011-04-26

[FIX] Fix price accuracy in price_unit during picking in

230. By Christophe CHAUVET on 2011-05-07

[FIX] issue with document module

231. By Sebastien LANGE - http://www.Syleam.fr on 2011-05-07

[FIX] Fix possibility to change sequence

Unmerged revisions

231. By Sebastien LANGE - http://www.Syleam.fr on 2011-05-07

[FIX] Fix possibility to change sequence

230. By Christophe CHAUVET on 2011-05-07

[FIX] issue with document module

229. By Sebastien LANGE - http://www.Syleam.fr on 2011-04-26

[FIX] Fix price accuracy in price_unit during picking in

228. By Sebastien LANGE - http://www.Syleam.fr on 2011-04-19

[MERGE] with branch 5.0-sgaranger

227. By Sebastien LANGE - http://www.Syleam.fr on 2011-04-19

[IMP] the price unit of move.picking in is copy in purchase price in move out and delivery

226. By Sebastien LANGE - http://www.Syleam.fr on 2011-04-19

[FIX] Fixing location_dest_id if stock picking is created by sale order

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'wms/i18n/fr_FR.po'
2--- wms/i18n/fr_FR.po 2011-03-25 08:52:08 +0000
3+++ wms/i18n/fr_FR.po 2011-05-07 16:56:36 +0000
4@@ -7,8 +7,8 @@
5 "Project-Id-Version: OpenERP Server 5.0.15\n"
6 "Report-Msgid-Bugs-To: support@openerp.com\n"
7 "POT-Creation-Date: 2011-03-25 08:50:37+0000\n"
8-"PO-Revision-Date: 2011-03-25 09:51+0100\n"
9-"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"
10+"PO-Revision-Date: 2011-03-31 16:12+0100\n"
11+"Last-Translator: Sylvain Garancher <sylvain.garancher@syleam.fr>\n"
12 "Language-Team: \n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15@@ -79,7 +79,7 @@
16 #. module: wms
17 #: field:stock.warehouse,return_location_id:0
18 msgid "Return location"
19-msgstr "Emplacement de retourn"
20+msgstr "Emplacement de retour"
21
22 #. module: wms
23 #: help:stock.warehouse,parent_id:0
24@@ -492,7 +492,7 @@
25 #: code:addons/stock/wizard/wizard_track_line.py:0
26 #, python-format
27 msgid "Caution!"
28-msgstr "Caution!"
29+msgstr "Attention !"
30
31 #. module: stock
32 #: wizard_field:stock.fill_inventory,init,recursive:0
33@@ -1232,7 +1232,7 @@
34 #. module: stock
35 #: model:stock.location,name:stock.stock_location_14
36 msgid "Finished products"
37-msgstr "produits finis"
38+msgstr "Produits finis"
39
40 #. module: stock
41 #: field:stock.location,location_id:0
42@@ -1374,7 +1374,7 @@
43 #. module: stock
44 #: field:stock.location,allocation_method:0
45 msgid "Allocation Method"
46-msgstr "Méthod d'attribution"
47+msgstr "Méthode d'attribution"
48
49 #. module: stock
50 #: selection:stock.location,icon:0
51@@ -1508,7 +1508,7 @@
52 #. module: wms
53 #: help:product.uom,code:0
54 msgid "This field can be used on printing"
55-msgstr "Ce champ pourra être utilser lors de l'impression"
56+msgstr "Ce champ pourra être utilisé lors de l'impression"
57
58 #. modules: wms, stock
59 #: wizard_button:inventory.merge,init,end:0
60@@ -1739,12 +1739,12 @@
61 #: code:addons/wms/object/picking.py:0
62 #, python-format
63 msgid "Only picking in confirmed or assigned must be reset!"
64-msgstr "Seul les bon confirmés ou assignés peut être reinitialiser!"
65+msgstr "Seul les bons confirmés ou assignés peut être réinitialisés !"
66
67 #. module: stock
68 #: selection:stock.location,chained_auto_packing:0
69 msgid "Automatic No Step Added"
70-msgstr "Automatique aucun pas ajouter"
71+msgstr "Automatique aucun pas ajouté"
72
73 #. module: stock
74 #: wizard_view:stock.location.products,init:0
75@@ -2862,7 +2862,7 @@
76 #. module: wms
77 #: model:stock.location,name:wms.stock_location_syleam_alencon
78 msgid "Syleam - Alencon"
79-msgstr "Syleam - Alencon"
80+msgstr "Syleam - Alençon"
81
82 #. module: stock
83 #: code:addons/stock/stock.py:0
84@@ -2895,7 +2895,7 @@
85 #: selection:stock.move,state:0
86 #: selection:stock.picking,state:0
87 msgid "Cancelled"
88-msgstr "Cancelled"
89+msgstr "Annulé"
90
91 #. module: wms
92 #: model:ir.actions.act_window,name:wms.act_burst_2_stock_picking
93@@ -3381,7 +3381,7 @@
94 #. module: stock
95 #: wizard_button:wms.partial_picking,end2,end:0
96 msgid "Close"
97-msgstr "Close"
98+msgstr "Fermé"
99
100 #. module: stock
101 #: model:ir.actions.report.xml,name:stock.report_move_labels
102
103=== modified file 'wms/object/picking.py'
104--- wms/object/picking.py 2011-03-22 14:12:31 +0000
105+++ wms/object/picking.py 2011-05-07 16:56:36 +0000
106@@ -123,6 +123,28 @@
107
108 return super(StockPicking, self).create(cr, uid, values, context=context)
109
110+ def unlink(self, cr, uid, ids, context=None):
111+ """
112+ Redefine unlink to delete picking.delivery when picking.out is deleted
113+ """
114+ move_obj = self.pool.get('stock.move')
115+ move_out_ids = move_obj.search(cr, uid, [('picking_id', 'in', ids)], context=context)
116+ for move_out in move_obj.browse(cr, uid, move_out_ids, context=context):
117+ if move_out and move_out.move_dest_id and move_out.move_dest_id.picking_id:
118+ self.unlink(cr, uid, [move_out.move_dest_id.picking_id.id], context=context)
119+ return super(StockPicking, self).unlink(cr, uid, ids, context=context)
120+
121+ def action_cancel(self, cr, uid, ids, context=None):
122+ """
123+ Redefine action_cancel to cancel picking.delivery when picking.out is canceled
124+ """
125+ move_obj = self.pool.get('stock.move')
126+ move_out_ids = move_obj.search(cr, uid, [('picking_id', 'in', ids)], context=context)
127+ for move_out in move_obj.browse(cr, uid, move_out_ids, context=context):
128+ if move_out and move_out.move_dest_id and move_out.move_dest_id.picking_id:
129+ self.action_cancel(cr, uid, [move_out.move_dest_id.picking_id.id], context=context)
130+ return super(StockPicking, self).action_cancel(cr, uid, ids, context=context)
131+
132 def action_confirm(self, cr, uid, ids, context=None):
133 """
134 Change destination location on move, if there is a round on the picking
135@@ -131,8 +153,9 @@
136 pick = self.browse(cr, uid, ids, context=context)
137 for p in pick:
138 if p.type == 'out' and p.state == 'draft' and p.round_id and p.round_id.default_location_id:
139- move_ids = [x.id for x in p.move_lines]
140+ move_ids = [x.id for x in p.move_lines if x.state == 'draft']
141 move_obj.write(cr, uid, move_ids, {'location_dest_id': p.round_id.default_location_id.id}, context=context)
142+ move_obj._chain_compute(cr, uid, p.move_lines, context=context)
143
144 return super(StockPicking, self).action_confirm(cr, uid, ids, context=context)
145
146@@ -616,7 +639,7 @@
147
148 #def test_cancel(self, cr, uid, ids, context={}):
149 # """
150- # Redefine test cancel, to protect
151+ # Redefine test cancel, to protect
152 # """
153 # for pick in self.browse(cr, uid, ids, context=context):
154 # for move in pick.move_lines:
155
156=== modified file 'wms/wizard/wizard_partial_picking.py'
157--- wms/wizard/wizard_partial_picking.py 2011-03-04 11:07:55 +0000
158+++ wms/wizard/wizard_partial_picking.py 2011-05-07 16:56:36 +0000
159@@ -1,7 +1,7 @@
160 # -*- encoding: utf-8 -*-
161 ##############################################################################
162 #
163-# OpenERP, Open Source Management Solution
164+# OpenERP, Open Source Management Solution
165 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
166 # $Id$
167 #
168@@ -27,6 +27,7 @@
169
170 import wizard
171 from osv import osv
172+from tools import config
173 import tools
174 from tools.translate import _
175
176@@ -87,7 +88,7 @@
177 <field name="price%s"/>' % (m.id,m.id,))
178
179 _moves_fields['price%s' % m.id] = {'string': 'Unit Price',
180- 'type': 'float', 'required': True, 'default': make_default(price)}
181+ 'type': 'float', 'required': True, 'digits': (16, int(config['price_accuracy'])), 'default': make_default(price)}
182
183 _moves_fields['uom%s' % m.id] = {'string': 'UOM', 'type': 'many2one',
184 'relation': 'product.uom', 'required': True,
185@@ -159,9 +160,10 @@
186
187 new_picking = pick_obj.copy(cr, uid, pick.id,
188 {
189- 'name': pool.get('ir.sequence').get(cr, uid, 'stock.picking'),
190 'move_lines' : [],
191 'state':'draft',
192+ 'type': pick.type,
193+ 'sale_id' : pick.sale_id and pick.sale_id.id or False,
194 })
195 if data['form']['move%s' % move.id] <> 0:
196 new_obj = move_obj.copy(cr, uid, move.id,
197
198=== modified file 'wms_inventory/__terp__.py'
199--- wms_inventory/__terp__.py 2011-02-28 09:05:33 +0000
200+++ wms_inventory/__terp__.py 2011-05-07 16:56:36 +0000
201@@ -40,11 +40,12 @@
202 'init_xml': [],
203 'update_xml': [
204 #'security/groups.xml',
205- #'security/ir.model.access.csv',
206+ 'security/ir.model.access.csv',
207 #'view/menu.xml',
208 'view/warehouse.xml',
209 'view/inventory.xml',
210 #'wizard/wizard.xml',
211+ 'wizard/product_affect_location.xml',
212 #'report/report.xml',
213 ],
214 'demo_xml': [],
215
216=== modified file 'wms_inventory/i18n/fr_FR.po'
217--- wms_inventory/i18n/fr_FR.po 2011-03-01 13:04:52 +0000
218+++ wms_inventory/i18n/fr_FR.po 2011-05-07 16:56:36 +0000
219@@ -1,18 +1,24 @@
220 # Translation of OpenERP Server.
221 # This file contains the translation of the following modules:
222-# * wms_inventory
223+# * wms_inventory
224+#
225 msgid ""
226 msgstr ""
227-"Project-Id-Version: PACKAGE VERSION\n"
228+"Project-Id-Version: OpenERP Server 5.0.15\n"
229 "Report-Msgid-Bugs-To: support@openerp.com\n"
230-"POT-Creation-Date: 2011-02-27 18:39:06+0000\n"
231-"PO-Revision-Date: 2011-02-27 19:39+0100\n"
232-"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"
233-"Language-Team: LANGUAGE <LL@li.org>\n"
234+"POT-Creation-Date: 2011-04-12 14:26:02+0000\n"
235+"PO-Revision-Date: 2011-04-12 16:29+0100\n"
236+"Last-Translator: Sylvain Garancher <sylvain.garancher@syleam.fr>\n"
237+"Language-Team: \n"
238 "MIME-Version: 1.0\n"
239 "Content-Type: text/plain; charset=UTF-8\n"
240 "Content-Transfer-Encoding: 8bit\n"
241-"X-Generator: Translate Toolkit 1.3.0\n"
242+"Plural-Forms: \n"
243+
244+#. module: wms_inventory
245+#: constraint:ir.model:0
246+msgid "The Object name must start with x_ and not contain any special character !"
247+msgstr "Le nom de l'objet doit commencer avec x_ et ne pas contenir de caractères spéciaux !"
248
249 #. module: wms_inventory
250 #: code:addons/wms_inventory/object/inventory.py:0
251@@ -23,6 +29,12 @@
252 #. module: wms_inventory
253 #: code:addons/wms_inventory/object/inventory.py:0
254 #, python-format
255+msgid "product %s"
256+msgstr "produit %s"
257+
258+#. module: wms_inventory
259+#: code:addons/wms_inventory/object/inventory.py:0
260+#, python-format
261 msgid "global"
262 msgstr "globale"
263
264@@ -56,37 +68,60 @@
265 msgstr "quantité à reinitialisée %.2f"
266
267 #. module: wms_inventory
268+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
269+#, python-format
270+msgid "Location"
271+msgstr "Emplacement"
272+
273+#. module: wms_inventory
274+#: constraint:ir.actions.act_window:0
275+msgid "Invalid model name in the action definition."
276+msgstr "Nom du modèle invalide dans la définition de l'action."
277+
278+#. module: wms_inventory
279 #: field:stock.inventory,warehouse_id:0
280 msgid "Warehouse"
281 msgstr "Entrepôt"
282
283 #. module: wms_inventory
284+#: code:addons/wms_inventory/object/inventory.py:0
285+#, python-format
286+msgid " [%s]"
287+msgstr " [%s]"
288+
289+#. module: wms_inventory
290+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
291+#, python-format
292+msgid "Set procure method to stock for products"
293+msgstr "Change la méthode d'approvisionnement à 'stock' pour les produits"
294+
295+#. module: wms_inventory
296+#: code:addons/wms_inventory/object/inventory.py:0
297+#, python-format
298+msgid " -> Partial Inventory"
299+msgstr " -> Inventaire partiel"
300+
301+#. module: wms_inventory
302+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
303+#, python-format
304+msgid "end"
305+msgstr "fin"
306+
307+#. module: wms_inventory
308 #: field:stock.inventory,type:0
309 msgid "Type"
310 msgstr "Type"
311
312 #. module: wms_inventory
313-#: code:addons/wms_inventory/object/inventory.py:0
314-#, python-format
315-msgid " -> Partial Inventory"
316-msgstr " -> Inventaire partiel"
317-
318-#. module: wms_inventory
319-#: code:addons/wms_inventory/object/inventory.py:0
320-#, python-format
321-msgid " [%s]"
322-msgstr " [%s]"
323-
324-#. module: wms_inventory
325 #: help:stock.inventory,warehouse_id:0
326 msgid "Select the warehouse where the inventory is made"
327 msgstr "Sélectionner l'entrepôt ou sera fait cet inventaire"
328
329 #. module: wms_inventory
330-#: code:addons/wms_inventory/object/inventory.py:0
331+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
332 #, python-format
333-msgid "init"
334-msgstr "init"
335+msgid "End inventory %d : %s"
336+msgstr "Fin de l'inventaire %d : %s"
337
338 #. module: wms_inventory
339 #: code:addons/wms_inventory/object/inventory.py:0
340@@ -96,26 +131,38 @@
341
342 #. module: wms_inventory
343 #: code:addons/wms_inventory/object/inventory.py:0
344+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
345+#, python-format
346+msgid "action"
347+msgstr "action"
348+
349+#. module: wms_inventory
350+#: code:addons/wms_inventory/object/inventory.py:0
351 #, python-format
352 msgid "Inventory number %s"
353 msgstr "Inventaire numéro %s"
354
355 #. module: wms_inventory
356+#: view:wizard.product.affect.location:0
357+msgid "Affect"
358+msgstr "Affectation"
359+
360+#. module: wms_inventory
361 #: code:addons/wms_inventory/object/inventory.py:0
362 #, python-format
363 msgid "analyze"
364 msgstr "analyse"
365
366 #. module: wms_inventory
367-#: code:addons/wms_inventory/object/inventory.py:0
368+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
369 #, python-format
370-msgid "product %s"
371-msgstr "produit %s"
372+msgid "Set orderpoint active for products"
373+msgstr "Active les règles de stock minimum pour les produits"
374
375 #. module: wms_inventory
376 #: constraint:ir.ui.view:0
377 msgid "Invalid XML for View Architecture!"
378-msgstr "XML non valide pour cette vue!"
379+msgstr "XML non valide pour l'architecture de la vue"
380
381 #. module: wms_inventory
382 #: field:stock.inventory.line,tracking_id:0
383@@ -137,14 +184,30 @@
384 #. module: wms_inventory
385 #: code:addons/wms_inventory/object/inventory.py:0
386 #, python-format
387+msgid "error"
388+msgstr "erreur"
389+
390+#. module: wms_inventory
391+#: model:ir.actions.act_window,name:wms_inventory.act_open_wizard_product_affect_location_view
392+msgid "Affect product location"
393+msgstr "Affectation des emplacements aux produits"
394+
395+#. module: wms_inventory
396+#: field:stock.inventory.line,prodlot_id:0
397+msgid "Production Lot"
398+msgstr "Lot de production"
399+
400+#. module: wms_inventory
401+#: code:addons/wms_inventory/object/inventory.py:0
402+#, python-format
403 msgid "Start to analyse each line"
404 msgstr "Démarrer une analyse pour chaque ligne"
405
406 #. module: wms_inventory
407-#: code:addons/wms_inventory/object/inventory.py:0
408+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
409 #, python-format
410-msgid "Validate each inventory line"
411-msgstr "Validation de chaque ligne d'inventaire"
412+msgid "Start inventory %d : %s"
413+msgstr "Démarrage de l'inventaire %d : %s"
414
415 #. module: wms_inventory
416 #: help:stock.inventory,type:0
417@@ -157,7 +220,9 @@
418 msgid ""
419 "Inventory %s failed\n"
420 "see below\n"
421-msgstr "Échec de l'inventaire %s\n"
422+msgstr ""
423+"L'inventaire %s a échoué\n"
424+"Voir ci dessous\n"
425
426 #. module: wms_inventory
427 #: code:addons/wms_inventory/object/inventory.py:0
428@@ -184,6 +249,13 @@
429 msgstr "Calcul de l'inventaire %s terminé"
430
431 #. module: wms_inventory
432+#: code:addons/wms_inventory/object/inventory.py:0
433+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
434+#, python-format
435+msgid "init"
436+msgstr "init"
437+
438+#. module: wms_inventory
439 #: selection:stock.inventory,type:0
440 msgid "Partial"
441 msgstr "Partiel"
442@@ -191,6 +263,12 @@
443 #. module: wms_inventory
444 #: code:addons/wms_inventory/object/inventory.py:0
445 #, python-format
446+msgid "Validate each inventory line"
447+msgstr "Validation de chaque ligne d'inventaire"
448+
449+#. module: wms_inventory
450+#: code:addons/wms_inventory/object/inventory.py:0
451+#, python-format
452 msgid "tracking %s"
453 msgstr "suivi %s"
454
455@@ -206,21 +284,24 @@
456 msgstr "Quantité en stock %.2f à cet emplacement %s"
457
458 #. module: wms_inventory
459+#: model:ir.model,name:wms_inventory.model_wizard_product_affect_location
460+msgid "Affects location to products from inventory"
461+msgstr "Affecte les emplacements aux produits depuis l'inventaire"
462+
463+#. module: wms_inventory
464 #: model:ir.module.module,shortdesc:wms_inventory.module_meta_information
465 msgid "Wms Inventory"
466 msgstr "WMS Inventory"
467
468 #. module: wms_inventory
469-#: code:addons/wms_inventory/object/inventory.py:0
470-#, python-format
471-msgid "error"
472-msgstr "erreur"
473+#: view:wizard.product.affect.location:0
474+msgid "Affect product locations ?"
475+msgstr "Affecter les emplacements aux produits ?"
476
477 #. module: wms_inventory
478-#: code:addons/wms_inventory/object/inventory.py:0
479-#, python-format
480-msgid "action"
481-msgstr "action"
482+#: view:wizard.product.affect.location:0
483+msgid "Cancel"
484+msgstr "Annuler"
485
486 #. module: wms_inventory
487 #: code:addons/wms_inventory/object/inventory.py:0
488@@ -228,24 +309,3 @@
489 msgid "production lot %s"
490 msgstr "lot de production %s"
491
492-#. module: wms_inventory
493-#: field:stock.inventory.line,prodlot_id:0
494-msgid "Production Lot"
495-msgstr "Lot de production"
496-
497-#, python-format
498-#~ msgid "quantity in stock %.2f"
499-#~ msgstr "quantité en stock %.2f"
500-
501-#, python-format
502-#~ msgid " %s"
503-#~ msgstr " %s"
504-
505-#, python-format
506-#~ msgid "Cost price %s"
507-#~ msgstr "PUMP %s"
508-
509-#, python-format
510-#~ msgid "\"\"Inventory %s has been finished\"\""
511-#~ msgstr "\"\"l'inventaire %s est terminé\"\""
512-
513
514=== modified file 'wms_inventory/i18n/wms_inventory.pot'
515--- wms_inventory/i18n/wms_inventory.pot 2011-02-27 18:40:01 +0000
516+++ wms_inventory/i18n/wms_inventory.pot 2011-05-07 16:56:36 +0000
517@@ -4,10 +4,10 @@
518 #
519 msgid ""
520 msgstr ""
521-"Project-Id-Version: OpenERP Server 5.0.12\n"
522+"Project-Id-Version: OpenERP Server 5.0.15\n"
523 "Report-Msgid-Bugs-To: support@openerp.com\n"
524-"POT-Creation-Date: 2011-02-27 18:39:06+0000\n"
525-"PO-Revision-Date: 2011-02-27 18:39:06+0000\n"
526+"POT-Creation-Date: 2011-04-12 14:25:32+0000\n"
527+"PO-Revision-Date: 2011-04-12 14:25:32+0000\n"
528 "Last-Translator: <>\n"
529 "Language-Team: \n"
530 "MIME-Version: 1.0\n"
531@@ -16,6 +16,11 @@
532 "Plural-Forms: \n"
533
534 #. module: wms_inventory
535+#: constraint:ir.model:0
536+msgid "The Object name must start with x_ and not contain any special character !"
537+msgstr ""
538+
539+#. module: wms_inventory
540 #: code:addons/wms_inventory/object/inventory.py:0
541 #, python-format
542 msgid "nothing to regulate"
543@@ -24,6 +29,12 @@
544 #. module: wms_inventory
545 #: code:addons/wms_inventory/object/inventory.py:0
546 #, python-format
547+msgid "product %s"
548+msgstr ""
549+
550+#. module: wms_inventory
551+#: code:addons/wms_inventory/object/inventory.py:0
552+#, python-format
553 msgid "global"
554 msgstr ""
555
556@@ -54,36 +65,59 @@
557 msgstr ""
558
559 #. module: wms_inventory
560+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
561+#, python-format
562+msgid "Location"
563+msgstr ""
564+
565+#. module: wms_inventory
566+#: constraint:ir.actions.act_window:0
567+msgid "Invalid model name in the action definition."
568+msgstr ""
569+
570+#. module: wms_inventory
571 #: field:stock.inventory,warehouse_id:0
572 msgid "Warehouse"
573 msgstr ""
574
575 #. module: wms_inventory
576+#: code:addons/wms_inventory/object/inventory.py:0
577+#, python-format
578+msgid " [%s]"
579+msgstr ""
580+
581+#. module: wms_inventory
582+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
583+#, python-format
584+msgid "Set procure method to stock for products"
585+msgstr ""
586+
587+#. module: wms_inventory
588+#: code:addons/wms_inventory/object/inventory.py:0
589+#, python-format
590+msgid " -> Partial Inventory"
591+msgstr ""
592+
593+#. module: wms_inventory
594+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
595+#, python-format
596+msgid "end"
597+msgstr ""
598+
599+#. module: wms_inventory
600 #: field:stock.inventory,type:0
601 msgid "Type"
602 msgstr ""
603
604 #. module: wms_inventory
605-#: code:addons/wms_inventory/object/inventory.py:0
606-#, python-format
607-msgid " -> Partial Inventory"
608-msgstr ""
609-
610-#. module: wms_inventory
611-#: code:addons/wms_inventory/object/inventory.py:0
612-#, python-format
613-msgid " [%s]"
614-msgstr ""
615-
616-#. module: wms_inventory
617 #: help:stock.inventory,warehouse_id:0
618 msgid "Select the warehouse where the inventory is made"
619 msgstr ""
620
621 #. module: wms_inventory
622-#: code:addons/wms_inventory/object/inventory.py:0
623+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
624 #, python-format
625-msgid "init"
626+msgid "End inventory %d : %s"
627 msgstr ""
628
629 #. module: wms_inventory
630@@ -94,20 +128,32 @@
631
632 #. module: wms_inventory
633 #: code:addons/wms_inventory/object/inventory.py:0
634+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
635+#, python-format
636+msgid "action"
637+msgstr ""
638+
639+#. module: wms_inventory
640+#: code:addons/wms_inventory/object/inventory.py:0
641 #, python-format
642 msgid "Inventory number %s"
643 msgstr ""
644
645 #. module: wms_inventory
646+#: view:wizard.product.affect.location:0
647+msgid "Affect"
648+msgstr ""
649+
650+#. module: wms_inventory
651 #: code:addons/wms_inventory/object/inventory.py:0
652 #, python-format
653 msgid "analyze"
654 msgstr ""
655
656 #. module: wms_inventory
657-#: code:addons/wms_inventory/object/inventory.py:0
658+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
659 #, python-format
660-msgid "product %s"
661+msgid "Set orderpoint active for products"
662 msgstr ""
663
664 #. module: wms_inventory
665@@ -135,13 +181,29 @@
666 #. module: wms_inventory
667 #: code:addons/wms_inventory/object/inventory.py:0
668 #, python-format
669+msgid "error"
670+msgstr ""
671+
672+#. module: wms_inventory
673+#: model:ir.actions.act_window,name:wms_inventory.act_open_wizard_product_affect_location_view
674+msgid "Affect product location"
675+msgstr ""
676+
677+#. module: wms_inventory
678+#: field:stock.inventory.line,prodlot_id:0
679+msgid "Production Lot"
680+msgstr ""
681+
682+#. module: wms_inventory
683+#: code:addons/wms_inventory/object/inventory.py:0
684+#, python-format
685 msgid "Start to analyse each line"
686 msgstr ""
687
688 #. module: wms_inventory
689-#: code:addons/wms_inventory/object/inventory.py:0
690+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
691 #, python-format
692-msgid "Validate each inventory line"
693+msgid "Start inventory %d : %s"
694 msgstr ""
695
696 #. module: wms_inventory
697@@ -180,6 +242,13 @@
698 msgstr ""
699
700 #. module: wms_inventory
701+#: code:addons/wms_inventory/object/inventory.py:0
702+#: code:addons/wms_inventory/wizard/product_affect_location.py:0
703+#, python-format
704+msgid "init"
705+msgstr ""
706+
707+#. module: wms_inventory
708 #: selection:stock.inventory,type:0
709 msgid "Partial"
710 msgstr ""
711@@ -187,6 +256,12 @@
712 #. module: wms_inventory
713 #: code:addons/wms_inventory/object/inventory.py:0
714 #, python-format
715+msgid "Validate each inventory line"
716+msgstr ""
717+
718+#. module: wms_inventory
719+#: code:addons/wms_inventory/object/inventory.py:0
720+#, python-format
721 msgid "tracking %s"
722 msgstr ""
723
724@@ -202,20 +277,23 @@
725 msgstr ""
726
727 #. module: wms_inventory
728+#: model:ir.model,name:wms_inventory.model_wizard_product_affect_location
729+msgid "Affects location to products from inventory"
730+msgstr ""
731+
732+#. module: wms_inventory
733 #: model:ir.module.module,shortdesc:wms_inventory.module_meta_information
734 msgid "Wms Inventory"
735 msgstr ""
736
737 #. module: wms_inventory
738-#: code:addons/wms_inventory/object/inventory.py:0
739-#, python-format
740-msgid "error"
741+#: view:wizard.product.affect.location:0
742+msgid "Affect product locations ?"
743 msgstr ""
744
745 #. module: wms_inventory
746-#: code:addons/wms_inventory/object/inventory.py:0
747-#, python-format
748-msgid "action"
749+#: view:wizard.product.affect.location:0
750+msgid "Cancel"
751 msgstr ""
752
753 #. module: wms_inventory
754@@ -224,8 +302,3 @@
755 msgid "production lot %s"
756 msgstr ""
757
758-#. module: wms_inventory
759-#: field:stock.inventory.line,prodlot_id:0
760-msgid "Production Lot"
761-msgstr ""
762-
763
764=== modified file 'wms_inventory/object/inventory.py'
765=== modified file 'wms_inventory/security/ir.model.access.csv'
766--- wms_inventory/security/ir.model.access.csv 2010-06-29 04:55:17 +0000
767+++ wms_inventory/security/ir.model.access.csv 2011-05-07 16:56:36 +0000
768@@ -1,1 +1,2 @@
769-"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
770+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
771+"access_wizard_product_affect_location","wizard_product_affect_location","wms_inventory.model_wizard_product_affect_location","base.group_user",1,1,1,1
772
773=== modified file 'wms_inventory/wizard/__init__.py'
774--- wms_inventory/wizard/__init__.py 2010-06-29 04:55:17 +0000
775+++ wms_inventory/wizard/__init__.py 2011-05-07 16:56:36 +0000
776@@ -22,6 +22,7 @@
777 #
778 ##############################################################################
779
780-
781-
782-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
783\ No newline at end of file
784+import product_affect_location
785+
786+
787+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
788
789=== added file 'wms_inventory/wizard/product_affect_location.py'
790--- wms_inventory/wizard/product_affect_location.py 1970-01-01 00:00:00 +0000
791+++ wms_inventory/wizard/product_affect_location.py 2011-05-07 16:56:36 +0000
792@@ -0,0 +1,130 @@
793+# -*- coding: utf-8 -*-
794+##############################################################################
795+#
796+# wms_inventory module for OpenERP, Module to extended inventory process
797+# Copyright (C) 2011 SYLEAM Info Services (<http://www.Syleam.fr/>)
798+# Sylvain Garancher <sylvain.garancher@syleam.fr>
799+#
800+# This file is a part of wms_inventory
801+#
802+# wms_inventory is free software: you can redistribute it and/or modify
803+# it under the terms of the GNU General Public License as published by
804+# the Free Software Foundation, either version 3 of the License, or
805+# (at your option) any later version.
806+#
807+# wms_inventory is distributed in the hope that it will be useful,
808+# but WITHOUT ANY WARRANTY; without even the implied warranty of
809+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
810+# GNU General Public License for more details.
811+#
812+# You should have received a copy of the GNU General Public License
813+# along with this program. If not, see <http://www.gnu.org/licenses/>.
814+#
815+##############################################################################
816+
817+from osv import osv
818+import netsvc
819+import thread
820+import time
821+import tempfile
822+import pooler
823+import base64
824+from tools.translate import _
825+
826+
827+class wizard_product_affect_location(osv.osv_memory):
828+ _name = 'wizard.product.affect.location'
829+ _description = 'Affects location to products from inventory'
830+
831+ def affect_product_locations(self, cr, uid, ids, context=None):
832+ stock_inv_obj = self.pool.get('stock.inventory')
833+ inv_line_obj = self.pool.get('stock.inventory.line')
834+ warehouse_obj = self.pool.get('stock.warehouse')
835+ product_obj = self.pool.get('product.product')
836+ location_obj = self.pool.get('product.location')
837+ orderpoint_obj = self.pool.get('stock.warehouse.orderpoint')
838+
839+ # Init log
840+ logger = netsvc.Logger()
841+
842+ def threading_done(cr, uid, ids, data, context=None):
843+ """
844+ Treatment launch as a new thread
845+ Must be include production lot and tracking
846+ """
847+ def log_message(fic, section, message):
848+ """
849+ Format the content of the logfile
850+ """
851+ fic.write('[%s] %s: %s\n' % (time.strftime('%Y-%m-%d %H:%M:%S'), section.encode('utf-8'), message.encode('utf-8')))
852+
853+ # Open log file
854+ outfp = tempfile.NamedTemporaryFile(prefix='openerp', suffix='inventory')
855+
856+ # Open new cursor
857+ cr = pooler.get_db(cr.dbname).cursor()
858+ start_logline = _('Start inventory %d : %s') % (data['id'], data['name'])
859+ logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '%s [%s]' % (start_logline, outfp.name))
860+ log_message(outfp, _('init'), start_logline)
861+
862+ warehouse_id = data['warehouse_id'][0]
863+ from_location = warehouse_obj.read(cr, uid, warehouse_id, ['lot_input_id'], context=context)['lot_input_id'][0]
864+
865+ product_ids = []
866+ line_ids = data['inventory_line_id']
867+ for line in inv_line_obj.browse(cr, uid, line_ids, context=context):
868+ product_ids.append(line.product_id.id)
869+ product_location = location_obj.search(cr, uid, [('product_id', '=', line.product_id.id), ('location_from_id', '=', from_location)], context=context)
870+ action = 'Add'
871+ # If line already exits, we update
872+ if product_location:
873+ action = 'Update'
874+ location_obj.write(cr, uid, product_location[0], {'location_dest_id': line.location_id.id}, context=context)
875+ # Else, we add a new line
876+ else:
877+ product_obj.write(cr, uid, [line.product_id.id], {'location_ids': [(0, 0, {
878+ 'name': _('Location'),
879+ 'location_from_id': from_location,
880+ 'location_dest_id': line.location_id.id,
881+ 'delay': 0,
882+ 'auto': 'transparent',
883+ })]}, context=context)
884+ log_message(outfp, _('action'), _(action + ' location for product [%s] %s : %s') % (line.product_id.default_code, line.product_id.name, line.location_id.complete_name))
885+
886+ orderpoint_ids = orderpoint_obj.search(cr, uid, [('product_id', 'in', product_ids), ('active', '=', False)], context=context)
887+ orderpoint_obj.write(cr, uid, orderpoint_ids, {'active': True}, context=context)
888+ log_message(outfp, _('action'), _('Set orderpoint active for products'))
889+
890+ product_obj.write(cr, uid, product_ids, {'procure_method': 'make_to_stock'}, context=context)
891+ log_message(outfp, _('action'), _('Set procure method to stock for products'))
892+
893+ end_logline = _('End inventory %d : %s') % (data['id'], data['name'])
894+ logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, end_logline)
895+ log_message(outfp, _('end'), end_logline)
896+ # Close log file
897+ outfp.flush()
898+ outfp.seek(0)
899+ vals = {
900+ 'datas': base64.encodestring(outfp.read()),
901+ 'datas_fname': 'inv_%s' % data['name'],
902+ 'name': 'INV %s' % data['name'],
903+ 'res_model': 'stock.inventory',
904+ 'res_id': data['id'],
905+ }
906+ outfp.close()
907+ self.pool.get('ir.attachment').create(cr, uid, vals, context=context)
908+ # Close cursor
909+ cr.commit()
910+ cr.close()
911+ return True
912+
913+ logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, 'Start affect products location from inventory')
914+ data = stock_inv_obj.read(cr, uid, context.get('active_id'), ['name', 'inventory_line_id', 'warehouse_id'], context=context)
915+ thread.start_new_thread(threading_done, (cr, uid, ids, data, context))
916+
917+ return {'type': 'ir_actions.act_window_close'}
918+
919+wizard_product_affect_location()
920+
921+
922+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
923
924=== added file 'wms_inventory/wizard/product_affect_location.xml'
925--- wms_inventory/wizard/product_affect_location.xml 1970-01-01 00:00:00 +0000
926+++ wms_inventory/wizard/product_affect_location.xml 2011-05-07 16:56:36 +0000
927@@ -0,0 +1,73 @@
928+<?xml version="1.0" encoding="UTF-8"?>
929+<openerp>
930+ <data>
931+ ##############################################################################
932+ #
933+ # wms_inventory module for OpenERP, Module to extended inventory process
934+ # Copyright (C) 2011 SYLEAM Info Services ([http://www.Syleam.fr/])
935+ # Sylvain Garancher [sylvain.garancher@syleam.fr]
936+ #
937+ # This file is a part of wms_inventory
938+ #
939+ # wms_inventory is free software: you can redistribute it and/or modify
940+ # it under the terms of the GNU General Public License as published by
941+ # the Free Software Foundation, either version 3 of the License, or
942+ # (at your option) any later version.
943+ #
944+ # wms_inventory is distributed in the hope that it will be useful,
945+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
946+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
947+ # GNU General Public License for more details.
948+ #
949+ # You should have received a copy of the GNU General Public License
950+ # along with this program. If not, see [http://www.gnu.org/licenses/].
951+ #
952+ ##############################################################################
953+
954+ <record id="view_wizard_product_affect_location_form" model="ir.ui.view">
955+ <field name="name">wizard.product.affect.location.form</field>
956+ <field name="model">wizard.product.affect.location</field>
957+ <field name="type">form</field>
958+ <field name="arch" type="xml">
959+ <form string="Affect product locations ?">
960+ <group colspan="4">
961+ <label string="Affect product locations ?" colspan="4"/>
962+ </group>
963+ <group colspan="4">
964+ <button string="Cancel" special="cancel" icon="gtk-cancel"/>
965+ <button string="Affect" type="object" name="affect_product_locations" icon="gtk-ok"/>
966+ </group>
967+ </form>
968+ </field>
969+ </record>
970+
971+ <record model="ir.actions.act_window" id="act_open_wizard_product_affect_location_view">
972+ <field name="name">Affect product location</field>
973+ <field name="type">ir.actions.act_window</field>
974+ <field name="res_model">wizard.product.affect.location</field>
975+ <field name="src_model">stock.inventory</field>
976+ <field name="view_type">form</field>
977+ <field name="view_mode">form</field>
978+ <field name="target">new</field>
979+ <field name="usage">menu</field>
980+ <field name="domain">[]</field>
981+ <field name="context">{}</field>
982+ </record>
983+
984+ <record model="ir.actions.act_window.view" id="act_open_wizard_product_affect_location_view_form">
985+ <field name="act_window_id" ref="act_open_wizard_product_affect_location_view"/>
986+ <field name="sequence" eval="20"/>
987+ <field name="view_mode">form</field>
988+ <field name="view_id" ref="view_wizard_product_affect_location_form"/>
989+ </record>
990+
991+ <record id="value_act_open_wizard_product_affect_location" model="ir.values">
992+ <field name="name">Affect product location</field>
993+ <field name="key2">client_action_multi</field>
994+ <field name="model">stock.inventory</field>
995+ <field name="object">True</field>
996+ <field name="value" eval="'ir.actions.act_window,'+str(act_open_wizard_product_affect_location_view)"/>
997+ </record>
998+
999+ </data>
1000+</openerp>
1001
1002=== modified file 'wms_location/i18n/fr_FR.po'
1003--- wms_location/i18n/fr_FR.po 2011-01-24 21:44:11 +0000
1004+++ wms_location/i18n/fr_FR.po 2011-05-07 16:56:36 +0000
1005@@ -35,7 +35,7 @@
1006 #. module: wms_location
1007 #: selection:product.location,auto:0
1008 msgid "Automatic No Step Added"
1009-msgstr "Mouvement automatique, sans pas ajouter"
1010+msgstr "Mouvement automatique, sans pas ajouté"
1011
1012 #. module: wms_location
1013 #: field:stock.location,transcend_height:0
1014@@ -79,7 +79,7 @@
1015 "The 'Automatic Move' value will create a stock move after the current one that will be validated automatically. With 'Manual Operation', the stock move has to be validated by a worker. With 'Automatic No Step Added', the location is replaced in the original move."
1016 msgstr ""
1017 "Ceci est utilisé pour définir le chemin que le produit doit suivre dans l'arborescence des emplacements.\n"
1018-"le 'Mouvement automatique' créer un mouvement de stock de la position courante qui sera valider automatiquement. Avec 'Opération manuelle' sera valider par le logisticien. Avec 'Mouvement automatique, sans pas ajouter' l'emplacement sera remplacer dans le mouvement original."
1019+"le 'Mouvement automatique' créer un mouvement de stock de la position courante qui sera valider automatiquement. Avec 'Opération manuelle' sera valider par le logisticien. Avec 'Mouvement automatique, sans pas ajouté' l'emplacement sera remplacer dans le mouvement original."
1020
1021 #. module: wms_location
1022 #: view:stock.location:0
1023
1024=== modified file 'wms_location/object/location.py'
1025--- wms_location/object/location.py 2011-03-25 11:26:38 +0000
1026+++ wms_location/object/location.py 2011-05-07 16:56:36 +0000
1027@@ -109,7 +109,7 @@
1028 res = 0.0
1029 for m in move:
1030 res += m['product_qty']
1031-
1032+
1033 # We compute all quantity out in this location
1034 args = [
1035 ('location_id', '=', location_id),
1036@@ -137,6 +137,8 @@
1037 result = []
1038 amount = 0.0
1039 loc_ids = self.search(cr, uid, [('location_id', 'child_of', ids)])
1040+ if not loc_ids:
1041+ loc_ids = ids
1042
1043 arg_query1 = [tuple(loc_ids)]
1044 sql_query1 = """SELECT coalesce(sum(m11.product_qty), 0)
1045
1046=== modified file 'wms_sale/object/move.py'
1047--- wms_sale/object/move.py 2011-03-09 11:36:46 +0000
1048+++ wms_sale/object/move.py 2011-05-07 16:56:36 +0000
1049@@ -273,6 +273,14 @@
1050 ## qty > stock_qty => pump wrong the good pump is the price_unit
1051 pump = price_unit
1052 log_message(outfp, 'wms_sale.stock_move.compute_pump', 'Compute the new P.U.M.P. = %s' % repr(pump))
1053+ # add price unit like purchase price in out and delivery
1054+ if move.move_dest_id and move.move_dest_id.sale_line_id.type == 'make_to_order':
1055+ move_to_add_pourchase_price_ids = [move.move_dest_id.id]
1056+ if move.move_dest_id.move_dest_id:
1057+ move_to_add_pourchase_price_ids.append(move.move_dest_id.move_dest_id.id)
1058+ self.write(cr, uid, move_to_add_pourchase_price_ids, {'purchase_price': price_unit}, context=context)
1059+
1060+
1061 if move.picking_id and move.picking_id.type in picking_type:
1062 # write the pump in average_price
1063 average_uom_id = move.product_id.list_price_uom_id and move.product_id.list_price_uom_id.id or move.product_uom.id
1064
1065=== modified file 'wms_sale/wizard/compute_pump.py'
1066--- wms_sale/wizard/compute_pump.py 2010-11-23 09:05:48 +0000
1067+++ wms_sale/wizard/compute_pump.py 2011-05-07 16:56:36 +0000
1068@@ -70,7 +70,7 @@
1069 {
1070 'type': 'float',
1071 'string': move.product_id.name,
1072- 'digit': (16, int(config['price_accuracy'])),
1073+ 'digits': (16, int(config['price_accuracy'])),
1074 },
1075 })
1076

Subscribers

People subscribed via source and target branches