Merge lp:~syleam/wms/5.0-christophe-chauvet into lp:wms

Proposed by Christophe CHAUVET
Status: Merged
Approved by: Christophe CHAUVET
Approved revision: no longer in the source branch.
Merged at revision: 212
Proposed branch: lp:~syleam/wms/5.0-christophe-chauvet
Merge into: lp:wms
Diff against target: 2322 lines (+1033/-291)
20 files modified
wms/i18n/fr_FR.po (+141/-61)
wms/i18n/wms.pot (+128/-50)
wms/object/burst.py (+27/-9)
wms/object/picking.py (+33/-16)
wms/object/tracking.py (+1/-1)
wms/object/warehouse.py (+28/-2)
wms/view/burst.xml (+2/-2)
wms/view/location.xml (+8/-0)
wms/view/warehouse.xml (+28/-4)
wms/wizard/burst.py (+3/-3)
wms/wizard/generate_wave.py (+4/-4)
wms/wizard/wizard.xml (+4/-4)
wms_inventory/__terp__.py (+1/-0)
wms_inventory/i18n/fr_FR.po (+199/-38)
wms_inventory/i18n/wms_inventory.pot (+188/-44)
wms_inventory/object/__init__.py (+1/-0)
wms_inventory/object/inventory.py (+158/-53)
wms_inventory/object/warehouse.py (+37/-0)
wms_inventory/view/warehouse.xml (+41/-0)
wms_location/object/location.py (+1/-0)
To merge this branch: bzr merge lp:~syleam/wms/5.0-christophe-chauvet
Reviewer Review Type Date Requested Status
Christophe CHAUVET Approve
Review via email: mp+51498@code.launchpad.net

Commit message

bugfix merge for 2 bugs

Description of the change

Fix 2 bugs and new features for inventory

To post a comment you must log in.
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

The regression test pass successfull

review: Approve
212. By Christophe CHAUVET

merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'wms/i18n/fr_FR.po'
--- wms/i18n/fr_FR.po 2011-02-24 20:58:12 +0000
+++ wms/i18n/fr_FR.po 2011-02-28 08:44:57 +0000
@@ -5,8 +5,8 @@
5msgstr ""5msgstr ""
6"Project-Id-Version: OpenERP Server 5.0.12\n"6"Project-Id-Version: OpenERP Server 5.0.12\n"
7"Report-Msgid-Bugs-To: support@openerp.com\n"7"Report-Msgid-Bugs-To: support@openerp.com\n"
8"POT-Creation-Date: 2011-02-24 20:33:56+0000\n"8"POT-Creation-Date: 2011-02-27 21:41:21+0000\n"
9"PO-Revision-Date: 2011-02-24 21:57+0100\n"9"PO-Revision-Date: 2011-02-27 22:43+0100\n"
10"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"10"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"
11"Language-Team: \n"11"Language-Team: \n"
12"MIME-Version: 1.0\n"12"MIME-Version: 1.0\n"
@@ -15,6 +15,12 @@
15"X-Generator: Translate Toolkit 1.3.0\n"15"X-Generator: Translate Toolkit 1.3.0\n"
1616
17#. module: wms17#. module: wms
18#: model:stock.location,name:wms.stock_location_output_thursday
19#: model:stock.round,name:wms.stock_round_thursday
20msgid "Thursday"
21msgstr "Jeudi"
22
23#. module: wms
18#: model:ir.actions.wizard,name:wms.wizard_generate_wave24#: model:ir.actions.wizard,name:wms.wizard_generate_wave
19msgid "Generate wave"25msgid "Generate wave"
20msgstr "Générer une vague"26msgstr "Générer une vague"
@@ -31,11 +37,6 @@
31msgstr "Reception en rafale"37msgstr "Reception en rafale"
3238
33#. module: wms39#. module: wms
34#: view:stock.burst:0
35msgid "Pickings"
36msgstr "Pickings"
37
38#. module: wms
39#: help:product.ul,is_inside:040#: help:product.ul,is_inside:0
40msgid "Check this if the content is include in this volume"41msgid "Check this if the content is include in this volume"
41msgstr "Cocher ceci si le contenu est inclus dans le volume"42msgstr "Cocher ceci si le contenu est inclus dans le volume"
@@ -62,6 +63,11 @@
62msgstr "Enregistre le prix facturé, vérifier l'unité de facturation également"63msgstr "Enregistre le prix facturé, vérifier l'unité de facturation également"
6364
64#. module: wms65#. module: wms
66#: field:stock.picking,wave_id:0
67msgid "Wave"
68msgstr "Vague"
69
70#. module: wms
65#: field:product.ul,volume:071#: field:product.ul,volume:0
66msgid "Volume"72msgid "Volume"
67msgstr "Volume"73msgstr "Volume"
@@ -149,6 +155,11 @@
149msgstr "Suivi"155msgstr "Suivi"
150156
151#. module: wms157#. module: wms
158#: wizard_button:wms.burst,init,end:0
159msgid "Finnish"
160msgstr "Terminé"
161
162#. module: wms
152#: help:product.ul,product_id:0163#: help:product.ul,product_id:0
153msgid "Product for replenishment"164msgid "Product for replenishment"
154msgstr "Produit pour le réapprovisionnement"165msgstr "Produit pour le réapprovisionnement"
@@ -204,12 +215,23 @@
204msgstr "Est ce que le contenu est à l'intérieur ?"215msgstr "Est ce que le contenu est à l'intérieur ?"
205216
206#. module: wms217#. module: wms
218#: field:stock.warehouse,parent_id:0
219msgid "Parent warehouse"
220msgstr "Entrepôt parent"
221
222#. module: wms
223#: view:stock.burst:0
224msgid "Pickings in"
225msgstr "Receptions liés"
226
227#. module: wms
207#: field:wms.report.stock.available,qty:0228#: field:wms.report.stock.available,qty:0
208msgid "Qty"229msgid "Qty"
209msgstr "Qté"230msgstr "Qté"
210231
211#. module: wms232#. module: wms
212#: wizard_button:picking.generate.wave,init,valid:0233#: wizard_button:picking.generate.wave,init,valid:0
234#: wizard_button:wms.burst,init,valid:0
213msgid "OK"235msgid "OK"
214msgstr "OK"236msgstr "OK"
215237
@@ -271,9 +293,14 @@
271msgstr "Lot de production"293msgstr "Lot de production"
272294
273#. module: wms295#. module: wms
274#: help:stock.picking,warehouse_id:0296#: view:stock.warehouse:0
275msgid "Indicate the warehouse for this picking"297msgid "burst"
276msgstr "Indiquer l'entrepôt pour ce bon"298msgstr "Rafale"
299
300#. module: wms
301#: help:stock.warehouse,keep_missing_product_in:0
302msgid "If check, missing product line on receipt order stay with quantity = 0"
303msgstr "Si coché, les lignes de produits manquant sur les receptions reste avec une quantité égal à 0 "
277304
278#. module: wms305#. module: wms
279#: view:stock.picking:0306#: view:stock.picking:0
@@ -281,6 +308,11 @@
281msgstr "Vérifier la disponibilité"308msgstr "Vérifier la disponibilité"
282309
283#. module: wms310#. module: wms
311#: field:stock.warehouse,check_tracking_burst:0
312msgid "check tracking"
313msgstr "Activer le suivi"
314
315#. module: wms
284#: field:res.partner,is_transporter:0316#: field:res.partner,is_transporter:0
285msgid "Transporter ?"317msgid "Transporter ?"
286msgstr "Transporteur ?"318msgstr "Transporteur ?"
@@ -334,16 +366,37 @@
334msgstr "PUMP"366msgstr "PUMP"
335367
336#. module: wms368#. module: wms
369#: view:stock.burst:0
370msgid "Pickings out"
371msgstr "Préparatiions liés"
372
373#. module: wms
374#: constraint:stock.warehouse:0
375msgid "You cannot create recursive warehouse !"
376msgstr "Vous ne pouvez pas créer d'entrepôts récursifs !"
377
378#. module: wms
337#: help:product.ul,warehouse_ids:0379#: help:product.ul,warehouse_ids:0
338msgid "Select the warehouse where the UL must be seen"380msgid "Select the warehouse where the UL must be seen"
339msgstr "Selectionner le ou les entrepot(s) ou sera visible cette unité"381msgstr "Selectionner le ou les entrepot(s) ou sera visible cette unité"
340382
341#. module: wms383#. module: wms
384#: model:ir.actions.wizard,name:wms.stock_burst
385msgid "Fast entry"
386msgstr "Saisie rapide"
387
388#. module: wms
342#: help:product.product,qty_physical:0389#: help:product.product,qty_physical:0
343msgid "Currenti real quantities of products, include reserved"390msgid "Currenti real quantities of products, include reserved"
344msgstr "Quantité réel courant du produit, incluant le réservé"391msgstr "Quantité réel courant du produit, incluant le réservé"
345392
346#. module: wms393#. module: wms
394#: code:addons/wms/wizard/generate_wave.py:0
395#, python-format
396msgid "Select cart"
397msgstr "Sélectionner un chariot"
398
399#. module: wms
347#: view:stock.burst.line:0400#: view:stock.burst.line:0
348msgid "Line"401msgid "Line"
349msgstr "Ligne"402msgstr "Ligne"
@@ -365,6 +418,7 @@
365418
366#. module: wms419#. module: wms
367#: field:stock.burst.line,remark_id:0420#: field:stock.burst.line,remark_id:0
421#: wizard_field:wms.burst,init,remark_id:0
368msgid "Observation"422msgid "Observation"
369msgstr "Observation"423msgstr "Observation"
370424
@@ -374,12 +428,6 @@
374msgstr "Erreur: L'unité secondaire doit être dans un catégorie différente que l'unité principale"428msgstr "Erreur: L'unité secondaire doit être dans un catégorie différente que l'unité principale"
375429
376#. module: wms430#. module: wms
377#: code:addons/wms/wizard/generate_wave.py:0
378#, python-format
379msgid "You cannot affect chariot on picking in done or cancel"
380msgstr "Vous ne pouvez pas affecter un chariot sur un bon terminé ou annulé"
381
382#. module: wms
383#: field:product.ul,width:0431#: field:product.ul,width:0
384msgid "Width"432msgid "Width"
385msgstr "Largeur"433msgstr "Largeur"
@@ -395,12 +443,6 @@
395msgstr "Enreigistre le PUMP dans les mouvements de stock"443msgstr "Enreigistre le PUMP dans les mouvements de stock"
396444
397#. module: wms445#. module: wms
398#: code:addons/wms/wizard/generate_wave.py:0
399#, python-format
400msgid "Only picking out must be affected to a chariot!"
401msgstr "Seule des préparations peuvent être affecter dans un chariot!"
402
403#. module: wms
404#: view:stock.picking:0446#: view:stock.picking:0
405msgid "Force Availability"447msgid "Force Availability"
406msgstr "Forcer la disponibilité"448msgstr "Forcer la disponibilité"
@@ -411,11 +453,6 @@
411msgstr "Commentaire"453msgstr "Commentaire"
412454
413#. module: wms455#. module: wms
414#: wizard_field:picking.generate.wave,init,chariot_id:0
415msgid "Chariot"
416msgstr "Chariot"
417
418#. module: wms
419#: view:stock.burst:0456#: view:stock.burst:0
420msgid "Partial"457msgid "Partial"
421msgstr "Partiel"458msgstr "Partiel"
@@ -457,12 +494,22 @@
457msgstr "Carton déchiré"494msgstr "Carton déchiré"
458495
459#. module: wms496#. module: wms
497#: help:stock.warehouse,parent_id:0
498msgid "Define the parent warehouse"
499msgstr "Définier l'entrepôt parent"
500
501#. module: wms
460#: code:addons/wms/object/burst.py:0502#: code:addons/wms/object/burst.py:0
461#, python-format503#, python-format
462msgid "Not in initial receipt"504msgid "Not in initial receipt"
463msgstr "Absent dans le bon initial"505msgstr "Absent dans le bon initial"
464506
465#. module: wms507#. module: wms
508#: help:stock.location,analysis_id:0
509msgid "Select the ABC of product that can be store by default in this location"
510msgstr "Sélectionner la classe ABC du produit qui sera stocké par défaut dans cet emplacement"
511
512#. module: wms
466#: constraint:product.template:0513#: constraint:product.template:0
467msgid "Error: The default UOM and the purchase UOM must be in the same category."514msgid "Error: The default UOM and the purchase UOM must be in the same category."
468msgstr "Erreur: l'unité par défaut et l'unité d'achat doivent appartenir à la même catégorie."515msgstr "Erreur: l'unité par défaut et l'unité d'achat doivent appartenir à la même catégorie."
@@ -474,9 +521,9 @@
474msgstr "Note"521msgstr "Note"
475522
476#. module: wms523#. module: wms
477#: model:ir.actions.act_window,name:wms.act_product_product_2_stock_move_in524#: view:product.product:0
478msgid "Incoming stock"525msgid "Qty Available"
479msgstr "Stock entrant"526msgstr "Qté disponible"
480527
481#. module: wms528#. module: wms
482#: field:res.company,average_price_stock_picking_internal:0529#: field:res.company,average_price_stock_picking_internal:0
@@ -520,6 +567,11 @@
520msgstr "Ce champ pourra être utilser lors de l'impression"567msgstr "Ce champ pourra être utilser lors de l'impression"
521568
522#. module: wms569#. module: wms
570#: wizard_field:picking.generate.wave,init,cart_id:0
571msgid "Cart"
572msgstr "Chariot de préparation"
573
574#. module: wms
523#: view:stock.picking:0575#: view:stock.picking:0
524msgid "Validate"576msgid "Validate"
525msgstr "Valider"577msgstr "Valider"
@@ -535,14 +587,19 @@
535msgstr "Actif"587msgstr "Actif"
536588
537#. module: wms589#. module: wms
590#: help:stock.picking,wave_id:0
591msgid "Picking wave affectation for this picking"
592msgstr "Affectation à la vague pour cette préparation"
593
594#. module: wms
538#: model:product.template,name:wms.product_magic_mouse_product_template595#: model:product.template,name:wms.product_magic_mouse_product_template
539msgid "Magic Mouse"596msgid "Magic Mouse"
540msgstr "Magic Mouse"597msgstr "Magic Mouse"
541598
542#. module: wms599#. module: wms
543#: model:ir.actions.act_window,name:wms.action_picking_wms_out_board600#: help:stock.picking,warehouse_id:0
544msgid "Picking Orders"601msgid "Indicate the warehouse for this picking"
545msgstr "Bons de préparations"602msgstr "Indiquer l'entrepôt pour ce bon"
546603
547#. module: wms604#. module: wms
548#: help:res.partner,round_id:0605#: help:res.partner,round_id:0
@@ -572,10 +629,9 @@
572msgstr "DPA"629msgstr "DPA"
573630
574#. module: wms631#. module: wms
575#: model:stock.location,name:wms.stock_location_output_thursday632#: model:stock.location,name:wms.stock_location_w1_output
576#: model:stock.round,name:wms.stock_round_thursday633msgid "Output 1"
577msgid "Thursday"634msgstr "Sortie 1"
578msgstr "Jeudi"
579635
580#. module: wms636#. module: wms
581#: code:addons/wms/object/burst.py:0637#: code:addons/wms/object/burst.py:0
@@ -593,12 +649,18 @@
593msgstr "Nom de la tournée"649msgstr "Nom de la tournée"
594650
595#. module: wms651#. module: wms
652#: model:ir.model,name:wms.model_stock_move_remark
653msgid "Remark for the stock move"
654msgstr "Observation pour ce mouvement de stock"
655
656#. module: wms
596#: model:ir.model,name:wms.model_stock_burst_line657#: model:ir.model,name:wms.model_stock_burst_line
597msgid "Burst picking line"658msgid "Burst picking line"
598msgstr "Ligne de saisie en rafale"659msgstr "Ligne de saisie en rafale"
599660
600#. module: wms661#. module: wms
601#: field:stock.burst.line,quantity:0662#: field:stock.burst.line,quantity:0
663#: wizard_field:wms.burst,init,quantity:0
602msgid "Quantity"664msgid "Quantity"
603msgstr "Quantité"665msgstr "Quantité"
604666
@@ -627,14 +689,17 @@
627msgstr "Code"689msgstr "Code"
628690
629#. module: wms691#. module: wms
630#: model:ir.model,name:wms.model_stock_move_remark692#: field:stock.warehouse,keep_missing_product_in:0
631msgid "Remark for the stock move"693msgid "Keep product in"
632msgstr "Observation pour ce mouvement de stock"694msgstr "Garder la trace des produits entrants"
633695
634#. module: wms696#. module: wms
697#: code:addons/wms/wizard/burst.py:0
635#: model:ir.ui.menu,name:wms.menu_stock_burst698#: model:ir.ui.menu,name:wms.menu_stock_burst
636#: view:stock.burst:0699#: view:stock.burst:0
637#: field:stock.burst.line,burst_id:0700#: field:stock.burst.line,burst_id:0
701#: wizard_view:wms.burst,init:0
702#, python-format
638msgid "Burst"703msgid "Burst"
639msgstr "Mode rafale"704msgstr "Mode rafale"
640705
@@ -667,6 +732,12 @@
667msgstr "Annuler"732msgstr "Annuler"
668733
669#. module: wms734#. module: wms
735#: code:addons/wms/wizard/generate_wave.py:0
736#, python-format
737msgid "You cannot affect cart on picking in done or cancel"
738msgstr "Vous ne pouvez affecter un chariot sur des préparations terminées ou annulées"
739
740#. module: wms
670#: view:res.company:0741#: view:res.company:0
671msgid "Average price calculate on stock picking"742msgid "Average price calculate on stock picking"
672msgstr "Calcul du PUMP sur les mouvements de stock de type :"743msgstr "Calcul du PUMP sur les mouvements de stock de type :"
@@ -682,9 +753,9 @@
682msgstr "Rediriger"753msgstr "Rediriger"
683754
684#. module: wms755#. module: wms
685#: help:stock.location,analysis_id:0756#: view:stock.warehouse:0
686msgid "Select the ABC of product that can be store by default in this location"757msgid "Information"
687msgstr "Sélectionner la classe ABC du produit qui sera stocké par défaut dans cet emplacement"758msgstr "Information"
688759
689#. module: wms760#. module: wms
690#: field:stock.picking,picking_time:0761#: field:stock.picking,picking_time:0
@@ -697,6 +768,11 @@
697msgstr "The Object name must start with x_ and not contain any special character !"768msgstr "The Object name must start with x_ and not contain any special character !"
698769
699#. module: wms770#. module: wms
771#: model:ir.actions.act_window,name:wms.action_picking_wms_out_board
772msgid "Picking Orders"
773msgstr "Bons de préparations"
774
775#. module: wms
700#: model:ir.actions.act_window,name:wms.act_open_stock_picking_transfer_view776#: model:ir.actions.act_window,name:wms.act_open_stock_picking_transfer_view
701#: model:ir.ui.menu,name:wms.menu_stock_picking_transfer777#: model:ir.ui.menu,name:wms.menu_stock_picking_transfer
702#: view:stock.picking:0778#: view:stock.picking:0
@@ -723,9 +799,10 @@
723msgstr "Vous devez assigner un lot de production pour ce produit"799msgstr "Vous devez assigner un lot de production pour ce produit"
724800
725#. module: wms801#. module: wms
726#: model:stock.location,name:wms.stock_location_w1_output802#: code:addons/wms/wizard/generate_wave.py:0
727msgid "Output 1"803#, python-format
728msgstr "Sortie 1"804msgid "Affect a cart for these picking"
805msgstr "Affecter un chariot à ces bons de préparations"
729806
730#. module: wms807#. module: wms
731#: model:ir.module.module,description:wms.module_meta_information808#: model:ir.module.module,description:wms.module_meta_information
@@ -767,6 +844,12 @@
767"\n"844"\n"
768845
769#. module: wms846#. module: wms
847#: code:addons/wms/wizard/generate_wave.py:0
848#, python-format
849msgid "Only picking out must be affected to a cart!"
850msgstr "Seul des bons de préparation peuvent être affecter à un chariot!"
851
852#. module: wms
770#: field:res.users,context_warehouse_id:0853#: field:res.users,context_warehouse_id:0
771#: field:stock.picking,warehouse_id:0854#: field:stock.picking,warehouse_id:0
772#: field:wms.report.stock.available,warehouse_id:0855#: field:wms.report.stock.available,warehouse_id:0
@@ -798,6 +881,7 @@
798#: field:stock.burst.line,product_id:0881#: field:stock.burst.line,product_id:0
799#: field:stock.picking,product_id:0882#: field:stock.picking,product_id:0
800#: field:stock.tracking,product_id:0883#: field:stock.tracking,product_id:0
884#: wizard_field:wms.burst,init,product_id:0
801#: field:wms.report.stock.available,product_id:0885#: field:wms.report.stock.available,product_id:0
802msgid "Product"886msgid "Product"
803msgstr "Produit"887msgstr "Produit"
@@ -818,9 +902,9 @@
818msgstr "Fournit le concept de classe ABC"902msgstr "Fournit le concept de classe ABC"
819903
820#. module: wms904#. module: wms
821#: field:stock.picking,wave_id:0905#: help:stock.warehouse,check_tracking_burst:0
822msgid "Wave"906msgid "Check tracking on burst out"
823msgstr "Vague"907msgstr "Activer le suivi en préparation rafale"
824908
825#. module: wms909#. module: wms
826#: field:res.company,average_price_stock_picking_delivery:0910#: field:res.company,average_price_stock_picking_delivery:0
@@ -901,13 +985,9 @@
901msgstr "Dimension/Poids de l'unité logistique seulement"985msgstr "Dimension/Poids de l'unité logistique seulement"
902986
903#. module: wms987#. module: wms
904#: code:addons/wms/wizard/generate_wave.py:0988#: model:ir.actions.act_window,name:wms.act_product_product_2_stock_move_in
905#, python-format989msgid "Incoming stock"
906msgid ""990msgstr "Stock entrant"
907"Not enough location on this chariot.\n"
908"Required %d\n"
909"Available %d"
910msgstr "Pas assez d'emplacement sur ce chariot.\n"
911991
912#. module: wms992#. module: wms
913#: model:ir.model,name:wms.model_stock_burst993#: model:ir.model,name:wms.model_stock_burst
@@ -930,11 +1010,6 @@
930msgstr "Utiliser pour faire un traitement différent, lorsque la remarque est sélectionnée!"1010msgstr "Utiliser pour faire un traitement différent, lorsque la remarque est sélectionnée!"
9311011
932#. module: wms1012#. module: wms
933#: view:product.product:0
934msgid "Qty Available"
935msgstr "Qté disponible"
936
937#. module: wms
938#: field:product.product,analysis_id:01013#: field:product.product,analysis_id:0
939#: field:stock.location,analysis_id:01014#: field:stock.location,analysis_id:0
940msgid "ABC Class"1015msgid "ABC Class"
@@ -977,3 +1052,8 @@
977msgid "You try to assign a lot which is not from the same product"1052msgid "You try to assign a lot which is not from the same product"
978msgstr "Vous essayez d'assigner un lot qui n'appartient pas au même produit"1053msgstr "Vous essayez d'assigner un lot qui n'appartient pas au même produit"
9791054
1055#~ msgid "test"
1056#~ msgstr "test"
1057#~ msgid "Pickings"
1058#~ msgstr "Pickings"
1059
9801060
=== modified file 'wms/i18n/wms.pot'
--- wms/i18n/wms.pot 2011-02-24 20:58:12 +0000
+++ wms/i18n/wms.pot 2011-02-28 08:44:57 +0000
@@ -4,10 +4,10 @@
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.12\n"7"Project-Id-Version: OpenERP Server 5.0.15\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2011-02-24 20:33:56+0000\n"9"POT-Creation-Date: 2011-02-27 21:41:21+0000\n"
10"PO-Revision-Date: 2011-02-24 20:33:56+0000\n"10"PO-Revision-Date: 2011-02-27 21:41:21+0000\n"
11"Last-Translator: <>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
@@ -16,6 +16,12 @@
16"Plural-Forms: \n"16"Plural-Forms: \n"
1717
18#. module: wms18#. module: wms
19#: model:stock.location,name:wms.stock_location_output_thursday
20#: model:stock.round,name:wms.stock_round_thursday
21msgid "Thursday"
22msgstr ""
23
24#. module: wms
19#: model:ir.actions.wizard,name:wms.wizard_generate_wave25#: model:ir.actions.wizard,name:wms.wizard_generate_wave
20msgid "Generate wave"26msgid "Generate wave"
21msgstr ""27msgstr ""
@@ -32,11 +38,6 @@
32msgstr ""38msgstr ""
3339
34#. module: wms40#. module: wms
35#: view:stock.burst:0
36msgid "Pickings"
37msgstr ""
38
39#. module: wms
40#: help:product.ul,is_inside:041#: help:product.ul,is_inside:0
41msgid "Check this if the content is include in this volume"42msgid "Check this if the content is include in this volume"
42msgstr ""43msgstr ""
@@ -63,6 +64,11 @@
63msgstr ""64msgstr ""
6465
65#. module: wms66#. module: wms
67#: field:stock.picking,wave_id:0
68msgid "Wave"
69msgstr ""
70
71#. module: wms
66#: field:product.ul,volume:072#: field:product.ul,volume:0
67msgid "Volume"73msgid "Volume"
68msgstr ""74msgstr ""
@@ -150,6 +156,11 @@
150msgstr ""156msgstr ""
151157
152#. module: wms158#. module: wms
159#: wizard_button:wms.burst,init,end:0
160msgid "Finnish"
161msgstr ""
162
163#. module: wms
153#: help:product.ul,product_id:0164#: help:product.ul,product_id:0
154msgid "Product for replenishment"165msgid "Product for replenishment"
155msgstr ""166msgstr ""
@@ -205,12 +216,23 @@
205msgstr ""216msgstr ""
206217
207#. module: wms218#. module: wms
219#: field:stock.warehouse,parent_id:0
220msgid "Parent warehouse"
221msgstr ""
222
223#. module: wms
224#: view:stock.burst:0
225msgid "Pickings in"
226msgstr ""
227
228#. module: wms
208#: field:wms.report.stock.available,qty:0229#: field:wms.report.stock.available,qty:0
209msgid "Qty"230msgid "Qty"
210msgstr ""231msgstr ""
211232
212#. module: wms233#. module: wms
213#: wizard_button:picking.generate.wave,init,valid:0234#: wizard_button:picking.generate.wave,init,valid:0
235#: wizard_button:wms.burst,init,valid:0
214msgid "OK"236msgid "OK"
215msgstr ""237msgstr ""
216238
@@ -272,8 +294,13 @@
272msgstr ""294msgstr ""
273295
274#. module: wms296#. module: wms
275#: help:stock.picking,warehouse_id:0297#: view:stock.warehouse:0
276msgid "Indicate the warehouse for this picking"298msgid "burst"
299msgstr ""
300
301#. module: wms
302#: help:stock.warehouse,keep_missing_product_in:0
303msgid "If check, missing product line on receipt order stay with quantity = 0"
277msgstr ""304msgstr ""
278305
279#. module: wms306#. module: wms
@@ -282,6 +309,11 @@
282msgstr ""309msgstr ""
283310
284#. module: wms311#. module: wms
312#: field:stock.warehouse,check_tracking_burst:0
313msgid "check tracking"
314msgstr ""
315
316#. module: wms
285#: field:res.partner,is_transporter:0317#: field:res.partner,is_transporter:0
286msgid "Transporter ?"318msgid "Transporter ?"
287msgstr ""319msgstr ""
@@ -335,16 +367,37 @@
335msgstr ""367msgstr ""
336368
337#. module: wms369#. module: wms
370#: view:stock.burst:0
371msgid "Pickings out"
372msgstr ""
373
374#. module: wms
375#: constraint:stock.warehouse:0
376msgid "You cannot create recursive warehouse !"
377msgstr ""
378
379#. module: wms
338#: help:product.ul,warehouse_ids:0380#: help:product.ul,warehouse_ids:0
339msgid "Select the warehouse where the UL must be seen"381msgid "Select the warehouse where the UL must be seen"
340msgstr ""382msgstr ""
341383
342#. module: wms384#. module: wms
385#: model:ir.actions.wizard,name:wms.stock_burst
386msgid "Fast entry"
387msgstr ""
388
389#. module: wms
343#: help:product.product,qty_physical:0390#: help:product.product,qty_physical:0
344msgid "Currenti real quantities of products, include reserved"391msgid "Currenti real quantities of products, include reserved"
345msgstr ""392msgstr ""
346393
347#. module: wms394#. module: wms
395#: code:addons/wms/wizard/generate_wave.py:0
396#, python-format
397msgid "Select cart"
398msgstr ""
399
400#. module: wms
348#: view:stock.burst.line:0401#: view:stock.burst.line:0
349msgid "Line"402msgid "Line"
350msgstr ""403msgstr ""
@@ -366,6 +419,7 @@
366419
367#. module: wms420#. module: wms
368#: field:stock.burst.line,remark_id:0421#: field:stock.burst.line,remark_id:0
422#: wizard_field:wms.burst,init,remark_id:0
369msgid "Observation"423msgid "Observation"
370msgstr ""424msgstr ""
371425
@@ -375,12 +429,6 @@
375msgstr ""429msgstr ""
376430
377#. module: wms431#. module: wms
378#: code:addons/wms/wizard/generate_wave.py:0
379#, python-format
380msgid "You cannot affect chariot on picking in done or cancel"
381msgstr ""
382
383#. module: wms
384#: field:product.ul,width:0432#: field:product.ul,width:0
385msgid "Width"433msgid "Width"
386msgstr ""434msgstr ""
@@ -396,12 +444,6 @@
396msgstr ""444msgstr ""
397445
398#. module: wms446#. module: wms
399#: code:addons/wms/wizard/generate_wave.py:0
400#, python-format
401msgid "Only picking out must be affected to a chariot!"
402msgstr ""
403
404#. module: wms
405#: view:stock.picking:0447#: view:stock.picking:0
406msgid "Force Availability"448msgid "Force Availability"
407msgstr ""449msgstr ""
@@ -412,11 +454,6 @@
412msgstr ""454msgstr ""
413455
414#. module: wms456#. module: wms
415#: wizard_field:picking.generate.wave,init,chariot_id:0
416msgid "Chariot"
417msgstr ""
418
419#. module: wms
420#: view:stock.burst:0457#: view:stock.burst:0
421msgid "Partial"458msgid "Partial"
422msgstr ""459msgstr ""
@@ -458,12 +495,22 @@
458msgstr ""495msgstr ""
459496
460#. module: wms497#. module: wms
498#: help:stock.warehouse,parent_id:0
499msgid "Define the parent warehouse"
500msgstr ""
501
502#. module: wms
461#: code:addons/wms/object/burst.py:0503#: code:addons/wms/object/burst.py:0
462#, python-format504#, python-format
463msgid "Not in initial receipt"505msgid "Not in initial receipt"
464msgstr ""506msgstr ""
465507
466#. module: wms508#. module: wms
509#: help:stock.location,analysis_id:0
510msgid "Select the ABC of product that can be store by default in this location"
511msgstr ""
512
513#. module: wms
467#: constraint:product.template:0514#: constraint:product.template:0
468msgid "Error: The default UOM and the purchase UOM must be in the same category."515msgid "Error: The default UOM and the purchase UOM must be in the same category."
469msgstr ""516msgstr ""
@@ -475,8 +522,8 @@
475msgstr ""522msgstr ""
476523
477#. module: wms524#. module: wms
478#: model:ir.actions.act_window,name:wms.act_product_product_2_stock_move_in525#: view:product.product:0
479msgid "Incoming stock"526msgid "Qty Available"
480msgstr ""527msgstr ""
481528
482#. module: wms529#. module: wms
@@ -521,6 +568,11 @@
521msgstr ""568msgstr ""
522569
523#. module: wms570#. module: wms
571#: wizard_field:picking.generate.wave,init,cart_id:0
572msgid "Cart"
573msgstr ""
574
575#. module: wms
524#: view:stock.picking:0576#: view:stock.picking:0
525msgid "Validate"577msgid "Validate"
526msgstr ""578msgstr ""
@@ -536,13 +588,18 @@
536msgstr ""588msgstr ""
537589
538#. module: wms590#. module: wms
591#: help:stock.picking,wave_id:0
592msgid "Picking wave affectation for this picking"
593msgstr ""
594
595#. module: wms
539#: model:product.template,name:wms.product_magic_mouse_product_template596#: model:product.template,name:wms.product_magic_mouse_product_template
540msgid "Magic Mouse"597msgid "Magic Mouse"
541msgstr ""598msgstr ""
542599
543#. module: wms600#. module: wms
544#: model:ir.actions.act_window,name:wms.action_picking_wms_out_board601#: help:stock.picking,warehouse_id:0
545msgid "Picking Orders"602msgid "Indicate the warehouse for this picking"
546msgstr ""603msgstr ""
547604
548#. module: wms605#. module: wms
@@ -573,9 +630,8 @@
573msgstr ""630msgstr ""
574631
575#. module: wms632#. module: wms
576#: model:stock.location,name:wms.stock_location_output_thursday633#: model:stock.location,name:wms.stock_location_w1_output
577#: model:stock.round,name:wms.stock_round_thursday634msgid "Output 1"
578msgid "Thursday"
579msgstr ""635msgstr ""
580636
581#. module: wms637#. module: wms
@@ -594,12 +650,18 @@
594msgstr ""650msgstr ""
595651
596#. module: wms652#. module: wms
653#: model:ir.model,name:wms.model_stock_move_remark
654msgid "Remark for the stock move"
655msgstr ""
656
657#. module: wms
597#: model:ir.model,name:wms.model_stock_burst_line658#: model:ir.model,name:wms.model_stock_burst_line
598msgid "Burst picking line"659msgid "Burst picking line"
599msgstr ""660msgstr ""
600661
601#. module: wms662#. module: wms
602#: field:stock.burst.line,quantity:0663#: field:stock.burst.line,quantity:0
664#: wizard_field:wms.burst,init,quantity:0
603msgid "Quantity"665msgid "Quantity"
604msgstr ""666msgstr ""
605667
@@ -628,14 +690,17 @@
628msgstr ""690msgstr ""
629691
630#. module: wms692#. module: wms
631#: model:ir.model,name:wms.model_stock_move_remark693#: field:stock.warehouse,keep_missing_product_in:0
632msgid "Remark for the stock move"694msgid "Keep product in"
633msgstr ""695msgstr ""
634696
635#. module: wms697#. module: wms
698#: code:addons/wms/wizard/burst.py:0
636#: model:ir.ui.menu,name:wms.menu_stock_burst699#: model:ir.ui.menu,name:wms.menu_stock_burst
637#: view:stock.burst:0700#: view:stock.burst:0
638#: field:stock.burst.line,burst_id:0701#: field:stock.burst.line,burst_id:0
702#: wizard_view:wms.burst,init:0
703#, python-format
639msgid "Burst"704msgid "Burst"
640msgstr ""705msgstr ""
641706
@@ -668,6 +733,12 @@
668msgstr ""733msgstr ""
669734
670#. module: wms735#. module: wms
736#: code:addons/wms/wizard/generate_wave.py:0
737#, python-format
738msgid "You cannot affect cart on picking in done or cancel"
739msgstr ""
740
741#. module: wms
671#: view:res.company:0742#: view:res.company:0
672msgid "Average price calculate on stock picking"743msgid "Average price calculate on stock picking"
673msgstr ""744msgstr ""
@@ -683,8 +754,8 @@
683msgstr ""754msgstr ""
684755
685#. module: wms756#. module: wms
686#: help:stock.location,analysis_id:0757#: view:stock.warehouse:0
687msgid "Select the ABC of product that can be store by default in this location"758msgid "Information"
688msgstr ""759msgstr ""
689760
690#. module: wms761#. module: wms
@@ -698,6 +769,11 @@
698msgstr ""769msgstr ""
699770
700#. module: wms771#. module: wms
772#: model:ir.actions.act_window,name:wms.action_picking_wms_out_board
773msgid "Picking Orders"
774msgstr ""
775
776#. module: wms
701#: model:ir.actions.act_window,name:wms.act_open_stock_picking_transfer_view777#: model:ir.actions.act_window,name:wms.act_open_stock_picking_transfer_view
702#: model:ir.ui.menu,name:wms.menu_stock_picking_transfer778#: model:ir.ui.menu,name:wms.menu_stock_picking_transfer
703#: view:stock.picking:0779#: view:stock.picking:0
@@ -724,8 +800,9 @@
724msgstr ""800msgstr ""
725801
726#. module: wms802#. module: wms
727#: model:stock.location,name:wms.stock_location_w1_output803#: code:addons/wms/wizard/generate_wave.py:0
728msgid "Output 1"804#, python-format
805msgid "Affect a cart for these picking"
729msgstr ""806msgstr ""
730807
731#. module: wms808#. module: wms
@@ -751,6 +828,12 @@
751msgstr ""828msgstr ""
752829
753#. module: wms830#. module: wms
831#: code:addons/wms/wizard/generate_wave.py:0
832#, python-format
833msgid "Only picking out must be affected to a cart!"
834msgstr ""
835
836#. module: wms
754#: field:res.users,context_warehouse_id:0837#: field:res.users,context_warehouse_id:0
755#: field:stock.picking,warehouse_id:0838#: field:stock.picking,warehouse_id:0
756#: field:wms.report.stock.available,warehouse_id:0839#: field:wms.report.stock.available,warehouse_id:0
@@ -782,6 +865,7 @@
782#: field:stock.burst.line,product_id:0865#: field:stock.burst.line,product_id:0
783#: field:stock.picking,product_id:0866#: field:stock.picking,product_id:0
784#: field:stock.tracking,product_id:0867#: field:stock.tracking,product_id:0
868#: wizard_field:wms.burst,init,product_id:0
785#: field:wms.report.stock.available,product_id:0869#: field:wms.report.stock.available,product_id:0
786msgid "Product"870msgid "Product"
787msgstr ""871msgstr ""
@@ -802,8 +886,8 @@
802msgstr ""886msgstr ""
803887
804#. module: wms888#. module: wms
805#: field:stock.picking,wave_id:0889#: help:stock.warehouse,check_tracking_burst:0
806msgid "Wave"890msgid "Check tracking on burst out"
807msgstr ""891msgstr ""
808892
809#. module: wms893#. module: wms
@@ -885,9 +969,8 @@
885msgstr ""969msgstr ""
886970
887#. module: wms971#. module: wms
888#: code:addons/wms/wizard/generate_wave.py:0972#: model:ir.actions.act_window,name:wms.act_product_product_2_stock_move_in
889#, python-format973msgid "Incoming stock"
890msgid "Not enough location on this chariot.\nRequired %d\nAvailable %d"
891msgstr ""974msgstr ""
892975
893#. module: wms976#. module: wms
@@ -911,11 +994,6 @@
911msgstr ""994msgstr ""
912995
913#. module: wms996#. module: wms
914#: view:product.product:0
915msgid "Qty Available"
916msgstr ""
917
918#. module: wms
919#: field:product.product,analysis_id:0997#: field:product.product,analysis_id:0
920#: field:stock.location,analysis_id:0998#: field:stock.location,analysis_id:0
921msgid "ABC Class"999msgid "ABC Class"
9221000
=== modified file 'wms/object/burst.py'
--- wms/object/burst.py 2011-02-22 16:02:33 +0000
+++ wms/object/burst.py 2011-02-28 08:44:57 +0000
@@ -57,7 +57,7 @@
5757
58 return super(stock_burst, self).copy(cr, uid, id, default, context=context)58 return super(stock_burst, self).copy(cr, uid, id, default, context=context)
5959
60 def _merge(self, cr, uid, ids, context=None):60 def _merge(self, cr, uid, id, context=None):
61 """61 """
62 Merge burst lines62 Merge burst lines
63 Returns burst lines in dico : {'product_key': (total_qty, [(qty, line_id, remark_id), (qty, line_id, remark_id), ])}63 Returns burst lines in dico : {'product_key': (total_qty, [(qty, line_id, remark_id), (qty, line_id, remark_id), ])}
@@ -67,15 +67,16 @@
6767
68 # Retrieve burst lines68 # Retrieve burst lines
69 burst_line_obj = self.pool.get('stock.burst.line')69 burst_line_obj = self.pool.get('stock.burst.line')
70 burst_line_ids = burst_line_obj.search(cr, uid, [('burst_id', '=', ids[0]), ('is_done', '=', False)], context=context)70 burst_line_ids = burst_line_obj.search(cr, uid, [('burst_id', '=', id), ('is_done', '=', False)], context=context)
71 burst_lines = burst_line_obj.browse(cr, uid, burst_line_ids, context=context)71 burst_lines = burst_line_obj.browse(cr, uid, burst_line_ids, context=context)
7272
73 known_lines = {}73 known_lines = {}
74 lines_to_delete = []74 lines_to_delete = []
75 burst_type = self.read(cr, uid, id, ['type'], context=context)['type']
75 for line in burst_lines:76 for line in burst_lines:
76 product_key = "%d_%d_%d" % (line.product_id.id, line.prodlot_id and line.prodlot_id.id or 0, line.tracking_id and line.tracking_id.id or 0)77 product_key = "%d_%d_%d" % (line.product_id.id, line.prodlot_id and line.prodlot_id.id or 0,
78 line.tracking_id and line.tracking_id.id or 0)
77 # Remarks are not significant for type 'out'79 # Remarks are not significant for type 'out'
78 burst_type = self.read(cr, uid, ids, ['type'], context=context)[0]['type']
79 rem_id = (burst_type != 'out') and line.remark_id.id or 080 rem_id = (burst_type != 'out') and line.remark_id.id or 0
80 # Check if product_id is known81 # Check if product_id is known
81 if product_key in known_lines.keys():82 if product_key in known_lines.keys():
@@ -103,8 +104,10 @@
103 lines_list.append((line.quantity, line.id, rem_id))104 lines_list.append((line.quantity, line.id, rem_id))
104 # final format :105 # final format :
105 known_lines[p] = (total, lines_list)106 known_lines[p] = (total, lines_list)
107
106 # Delete lines to delete108 # Delete lines to delete
107 burst_line_obj.unlink(cr, uid, lines_to_delete, context=context)109 if lines_to_delete:
110 burst_line_obj.unlink(cr, uid, lines_to_delete, context=context)
108111
109 return known_lines112 return known_lines
110113
@@ -117,7 +120,7 @@
117120
118 # Retrieve merged burst lines121 # Retrieve merged burst lines
119 burst_line_obj = self.pool.get('stock.burst.line')122 burst_line_obj = self.pool.get('stock.burst.line')
120 burst_lines = self._merge(cr, uid, ids, context=context)123 burst_lines = self._merge(cr, uid, ids[0], context=context)
121 # No new line : quit124 # No new line : quit
122 if not burst_lines:125 if not burst_lines:
123 return126 return
@@ -128,9 +131,9 @@
128 picking_id = self.read(cr, uid, ids, ['stock_picking_id'], context=context)[0]['stock_picking_id'][0]131 picking_id = self.read(cr, uid, ids, ['stock_picking_id'], context=context)[0]['stock_picking_id'][0]
129 backorder_ids = self.pool.get('stock.picking').search(cr, uid, [('backorder_id', '=', picking_id), ('state', 'not in', ('done', 'cancel', 'draft'))], context=context)132 backorder_ids = self.pool.get('stock.picking').search(cr, uid, [('backorder_id', '=', picking_id), ('state', 'not in', ('done', 'cancel', 'draft'))], context=context)
130 if backorder_ids:133 if backorder_ids:
131 picking = self.pool.get('stock.picking').browse(cr, uid, [backorder_ids[0]], context=context)[0]134 picking = self.pool.get('stock.picking').browse(cr, uid, backorder_ids[0], context=context)
132 else:135 else:
133 picking = self.pool.get('stock.picking').browse(cr, uid, [picking_id], context=context)[0]136 picking = self.pool.get('stock.picking').browse(cr, uid, picking_id, context=context)
134 picking_moves = picking_obj.move_merge(cr, uid, picking.id, context=context)137 picking_moves = picking_obj.move_merge(cr, uid, picking.id, context=context)
135138
136 # Compare burst lines and move lines139 # Compare burst lines and move lines
@@ -198,7 +201,9 @@
198 missing.append((move_id, qty))201 missing.append((move_id, qty))
199202
200 wf_service = netsvc.LocalService("workflow")203 wf_service = netsvc.LocalService("workflow")
204 del_empty_move = []
201 if len(missing) > 0:205 if len(missing) > 0:
206 no_keep = (picking.type == 'in' and not picking.warehouse_id.keep_missing_product_in) or False
202 # Generate new picking for missing products207 # Generate new picking for missing products
203 new_picking = picking_obj.copy(cr, uid, picking_id,208 new_picking = picking_obj.copy(cr, uid, picking_id,
204 {209 {
@@ -211,6 +216,12 @@
211 for (move_id, qty) in missing:216 for (move_id, qty) in missing:
212 # Generate move lines in new_picking for missing products217 # Generate move lines in new_picking for missing products
213 move_obj.copy(cr, uid, move_id, {'product_qty': qty, 'picking_id': new_picking, 'remark_id': False})218 move_obj.copy(cr, uid, move_id, {'product_qty': qty, 'picking_id': new_picking, 'remark_id': False})
219 if no_keep:
220 del_empty_move.append(move_id)
221
222 if del_empty_move:
223 #move_obj.write(cr, uid, del_empty_move, {'state': 'draft'})
224 move_obj.unlink(cr, uid, del_empty_move)
214225
215 # Sets state to assigned for new picking226 # Sets state to assigned for new picking
216 wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_confirm', cr)227 wf_service.trg_validate(uid, 'stock.picking', new_picking, 'button_confirm', cr)
@@ -218,13 +229,20 @@
218 if burst_type != 'out':229 if burst_type != 'out':
219 picking_obj.force_assign(cr, uid, [new_picking])230 picking_obj.force_assign(cr, uid, [new_picking])
220231
232 for val in done_move_lines:
233 if val in del_empty_move:
234 done_move_lines.remove(val)
235
221 # Set state to Done for picking236 # Set state to Done for picking
222 move_obj.write(cr, uid, done_move_lines, {'state': 'done'}, context=context)237 if done_move_lines:
238 move_obj.write(cr, uid, done_move_lines, {'state': 'done'}, context=context)
239
223 picking_obj.force_assign(cr, uid, [picking.id])240 picking_obj.force_assign(cr, uid, [picking.id])
224 wf_service.trg_validate(uid, 'stock.picking', picking.id, 'button_done', cr)241 wf_service.trg_validate(uid, 'stock.picking', picking.id, 'button_done', cr)
225242
226 # Set is_done=True for finished burst lines243 # Set is_done=True for finished burst lines
227 burst_line_obj.write(cr, uid, done_burst_lines, {'is_done': True}, context=context)244 burst_line_obj.write(cr, uid, done_burst_lines, {'is_done': True}, context=context)
245
228 # Add picking in M2M246 # Add picking in M2M
229 self.write(cr, uid, ids, {'picking_ids': [(4, picking.id)]}, context=context)247 self.write(cr, uid, ids, {'picking_ids': [(4, picking.id)]}, context=context)
230248
231249
=== modified file 'wms/object/picking.py'
--- wms/object/picking.py 2011-02-24 13:07:22 +0000
+++ wms/object/picking.py 2011-02-28 08:44:57 +0000
@@ -26,6 +26,15 @@
26from osv import fields26from osv import fields
27from tools.translate import _27from tools.translate import _
2828
29_picking_state = [
30 ('draft', 'Draft'),
31 ('auto', 'Waiting'),
32 ('confirmed', 'Confirmed'),
33 ('assigned', 'Assigned'),
34 ('done', 'Done'),
35 ('cancel', 'Cancelled'),
36]
37
2938
30class StockPicking(osv.osv):39class StockPicking(osv.osv):
31 """40 """
@@ -52,7 +61,8 @@
52 'transporter_number': fields.char('Tracking number', size=128),61 'transporter_number': fields.char('Tracking number', size=128),
53 'product_id': fields.related('move_lines', 'product_id', type='many2one', relation='product.product', string='Product'),62 'product_id': fields.related('move_lines', 'product_id', type='many2one', relation='product.product', string='Product'),
54 'round_id': fields.many2one('stock.round', 'Round', help='Use for manage deliveries'),63 'round_id': fields.many2one('stock.round', 'Round', help='Use for manage deliveries'),
55 'wave_id': fields.many2one('stock.location', 'Wave'),64 'wave_id': fields.many2one('stock.location', 'Wave', help='Picking wave affectation for this picking'),
65 'state': fields.selection(_picking_state, 'Status', readonly=True),
56 }66 }
5767
58 _defaults = {68 _defaults = {
@@ -61,6 +71,7 @@
61 'transporter_id': lambda *a: False,71 'transporter_id': lambda *a: False,
62 'transporter_number': lambda *a: False,72 'transporter_number': lambda *a: False,
63 'round_id': lambda *a: False,73 'round_id': lambda *a: False,
74 'state': lambda *a: 'draft',
64 }75 }
6576
66 def default_get(self, cr, uid, fields_list, context=None):77 def default_get(self, cr, uid, fields_list, context=None):
@@ -126,7 +137,7 @@
126137
127 def product_crossdock_location(self, cr, uid, product_id, warehouse_id, context=None):138 def product_crossdock_location(self, cr, uid, product_id, warehouse_id, context=None):
128 """139 """
129 Search id 140 Search id
130 """141 """
131 if context is None:142 if context is None:
132 context = {}143 context = {}
@@ -187,7 +198,7 @@
187 ['crossdock_location_id'], context=context)['crossdock_location_id']198 ['crossdock_location_id'], context=context)['crossdock_location_id']
188 if not default_crossdock:199 if not default_crossdock:
189 raise osv.except_osv(_('Error'), _('No default crossdock location defined on the warehouse!'))200 raise osv.except_osv(_('Error'), _('No default crossdock location defined on the warehouse!'))
190 crossdock_id = isinstance(default_crossdock, list) and default_crossdock[0] or default_crossdock201 crossdock_id = isinstance(default_crossdock, tuple) and default_crossdock[0] or default_crossdock
191202
192 ###203 ###
193 ## If we have an outgoing quantity, and location type is crossdock, we split in two line204 ## If we have an outgoing quantity, and location type is crossdock, we split in two line
@@ -201,7 +212,7 @@
201 args = [212 args = [
202 ('picking_id', 'in', picking_ids),213 ('picking_id', 'in', picking_ids),
203 ('product_id', '=', move.product_id.id),214 ('product_id', '=', move.product_id.id),
204 ('state', 'in', ['confirmed', 'waiting']),215 ('state', 'in', ['assigned', 'confirmed', 'waiting']),
205 ]216 ]
206 reserve_ids = move_obj.search(cr, uid, args,217 reserve_ids = move_obj.search(cr, uid, args,
207 limit=abs(move.product_qty), order='date_planned', context=context)218 limit=abs(move.product_qty), order='date_planned', context=context)
@@ -212,11 +223,12 @@
212 total_crossdock += r.product_qty223 total_crossdock += r.product_qty
213224
214 # Check if we must split the line in two if there is enougth quantity available225 # Check if we must split the line in two if there is enougth quantity available
215 if move.product_qty > total_crossdock:226 if total_crossdock and move.product_qty > total_crossdock:
216 args = {227 args = {
217 'product_qty': (move.product_qty - total_crossdock),228 'product_qty': (move.product_qty - total_crossdock),
218 'state': 'done',229 'state': 'done',
219 'crossdock_ok': True,230 'crossdock_ok': True,
231 'move_dest_id': False,
220 }232 }
221 new_id = move_obj.copy(cr, uid, move.id, args, context=context)233 new_id = move_obj.copy(cr, uid, move.id, args, context=context)
222 args = {234 args = {
@@ -226,7 +238,7 @@
226 'crossdock_ok': True,238 'crossdock_ok': True,
227 }239 }
228 move_obj.write(cr, uid, [move.id], args, context=context)240 move_obj.write(cr, uid, [move.id], args, context=context)
229 else:241 elif total_crossdock:
230 # We don't have enougth quantity, how many moves can be assigned with quantity242 # We don't have enougth quantity, how many moves can be assigned with quantity
231 args = {243 args = {
232 'location_dest_id': crossdock_id,244 'location_dest_id': crossdock_id,
@@ -244,11 +256,12 @@
244 else:256 else:
245 break257 break
246258
247 args = {259 if total_crossdock:
248 'location_id': crossdock_id,260 args = {
249 'state': 'assigned',261 'location_id': crossdock_id,
250 }262 'state': 'assigned',
251 move_obj.write(cr, uid, reserve_ids, args, context=context)263 }
264 move_obj.write(cr, uid, reserve_ids, args, context=context)
252265
253 return new_id or move.id266 return new_id or move.id
254267
@@ -308,15 +321,15 @@
308 # For each picking out in confirm, check all lines and verify if it available321 # For each picking out in confirm, check all lines and verify if it available
309 # If yes, execute the workflow.322 # If yes, execute the workflow.
310 args = [323 args = [
311 ('type','=','out'),324 ('type', '=', 'out'),
312 ('state','=','confirmed'),325 ('state', '=', 'confirmed'),
313 ]326 ]
314 p_ids = self.search(cr, uid, args)327 p_ids = self.search(cr, uid, args)
315 pick_list = []328 pick_list = []
316 for p in self.browse(cr, uid, p_ids):329 for p in self.browse(cr, uid, p_ids):
317 l_ok = True330 l_ok = True
318 for l in p.move_lines:331 for l in p.move_lines:
319 if l.state not in ('assigned','cancel'):332 if l.state not in ('assigned', 'cancel'):
320 l_ok = False333 l_ok = False
321334
322 if l_ok:335 if l_ok:
@@ -340,7 +353,8 @@
340 known_moves = {}353 known_moves = {}
341 moves_to_delete = []354 moves_to_delete = []
342 for move in move_obj.browse(cr, uid, move_ids, context=context):355 for move in move_obj.browse(cr, uid, move_ids, context=context):
343 product_key = "%d_%d_%d" % (move.product_id.id, move.prodlot_id and move.prodlot_id.id or 0, move.tracking_id and move.tracking_id.id or 0)356 product_key = "%d_%d_%d" % (move.product_id.id, move.prodlot_id and move.prodlot_id.id or 0,
357 move.tracking_id and move.tracking_id.id or 0)
344 # Check if product_id is known358 # Check if product_id is known
345 if product_key in known_moves.keys():359 if product_key in known_moves.keys():
346 # Add quantities360 # Add quantities
@@ -355,7 +369,10 @@
355 known_moves[p] = (move.product_qty, move.id, )369 known_moves[p] = (move.product_qty, move.id, )
356370
357 # Delete moves to delete371 # Delete moves to delete
358 move_obj.unlink(cr, uid, moves_to_delete, context=context)372 if moves_to_delete:
373 ctx = context.copy()
374 ctx['call_unlink'] = True
375 move_obj.unlink(cr, uid, moves_to_delete, context=ctx)
359376
360 return known_moves377 return known_moves
361378
362379
=== modified file 'wms/object/tracking.py'
--- wms/object/tracking.py 2010-07-01 08:22:53 +0000
+++ wms/object/tracking.py 2011-02-28 08:44:57 +0000
@@ -29,7 +29,7 @@
29 _inherit = 'stock.tracking'29 _inherit = 'stock.tracking'
30 30
31 _columns = {31 _columns = {
32 'product_id': fields.many2one('product.product', 'Product', required=True),32 'product_id': fields.many2one('product.product', 'Product'),
33 }33 }
3434
35 _defaults = {35 _defaults = {
3636
=== modified file 'wms/object/warehouse.py'
--- wms/object/warehouse.py 2011-01-31 18:09:20 +0000
+++ wms/object/warehouse.py 2011-02-28 08:44:57 +0000
@@ -36,9 +36,35 @@
36 'lot_stock_id': fields.many2one('stock.location', 'Location Stock', required=False, domain=[('usage', '<>', 'view')]),36 'lot_stock_id': fields.many2one('stock.location', 'Location Stock', required=False, domain=[('usage', '<>', 'view')]),
37 'lot_output_id': fields.many2one('stock.location', 'Location Output', required=False, domain=[('usage', '<>', 'view')]),37 'lot_output_id': fields.many2one('stock.location', 'Location Output', required=False, domain=[('usage', '<>', 'view')]),
38 'code': fields.char('Code', size=16, help='Enter the warehouse code'),38 'code': fields.char('Code', size=16, help='Enter the warehouse code'),
39 'parent_id': fields.many2one('stock.warehouse', 'Parent warehouse', help='Define the parent warehouse'),
39 'crossdock_location_id': fields.many2one('stock.location', 'Crossdock location',40 'crossdock_location_id': fields.many2one('stock.location', 'Crossdock location',
40 help='Choose the crossdock location on this warehouse'),41 help='Choose the crossdock location on this warehouse'),
41 }42 'check_tracking_burst': fields.boolean('check tracking', help='Check tracking on burst out'),
43 'keep_missing_product_in': fields.boolean('Keep product in', help='If check, missing product line on receipt order stay with quantity = 0'),
44 }
45
46 _defaults = {
47 'check_tracking_burst': lambda *a: False,
48 'keep_missing_product_in': lambda *a: True,
49 }
50
51 def _check_recursion(self, cr, uid, ids):
52 """
53 Check if the selected parent warehouse create a recursive loop
54 """
55 level = 100
56 while len(ids):
57 cr.execute('select distinct parent_id from stock_warehouse where id in %s', (tuple(ids),))
58 ids = filter(None, map(lambda x:x[0], cr.fetchall()))
59 if not level:
60 return False
61 level -= 1
62 return True
63
64 _constraints = [
65 (_check_recursion, 'You cannot create recursive warehouse !', ['parent_id']),
66 ]
67
4268
43 def search(self, cr, uid, args, offset=0, limit=None, order=None,69 def search(self, cr, uid, args, offset=0, limit=None, order=None,
44 context=None, count=False):70 context=None, count=False):
@@ -51,7 +77,7 @@
51 ids = super(Warehouse, self).search(cr, uid, args, offset=offset, limit=limit,77 ids = super(Warehouse, self).search(cr, uid, args, offset=offset, limit=limit,
52 order=order, context=context, count=count)78 order=order, context=context, count=count)
53 for w in self.browse(cr, uid, ids, context=context):79 for w in self.browse(cr, uid, ids, context=context):
54 if not w.lot_stock_id or not w.lot_input_id or not w.lot_output_id:80 if not context.get('new_warehouse', False) and (not w.lot_stock_id or not w.lot_input_id or not w.lot_output_id):
55 raise osv.except_osv(_('Error'), _('Warehouse "%s" not correctly configure !') % w.name)81 raise osv.except_osv(_('Error'), _('Warehouse "%s" not correctly configure !') % w.name)
5682
57 return ids83 return ids
5884
=== modified file 'wms/view/burst.xml'
--- wms/view/burst.xml 2011-02-22 16:02:33 +0000
+++ wms/view/burst.xml 2011-02-28 08:44:57 +0000
@@ -95,7 +95,7 @@
95 <field name="line_ids" string="Lines" colspan="4" nolabel="1"95 <field name="line_ids" string="Lines" colspan="4" nolabel="1"
96 attrs="{'readonly': [('state','=', 'done')]}"/>96 attrs="{'readonly': [('state','=', 'done')]}"/>
97 </page>97 </page>
98 <page string="Pickings">98 <page string="Pickings in">
99 <field name="picking_ids" nolabel="1" attrs="{'readonly': [('state','=', 'done')]}"/>99 <field name="picking_ids" nolabel="1" attrs="{'readonly': [('state','=', 'done')]}"/>
100 </page>100 </page>
101 </notebook>101 </notebook>
@@ -126,7 +126,7 @@
126 <field name="line_ids" string="Lines" colspan="4" nolabel="1"126 <field name="line_ids" string="Lines" colspan="4" nolabel="1"
127 attrs="{'readonly': [('state','=', 'done')]}"/>127 attrs="{'readonly': [('state','=', 'done')]}"/>
128 </page>128 </page>
129 <page string="Pickings">129 <page string="Pickings out">
130 <field name="picking_ids" nolabel="1" attrs="{'readonly': [('state','=', 'done')]}"/>130 <field name="picking_ids" nolabel="1" attrs="{'readonly': [('state','=', 'done')]}"/>
131 </page>131 </page>
132 </notebook>132 </notebook>
133133
=== modified file 'wms/view/location.xml'
--- wms/view/location.xml 2010-06-22 05:47:58 +0000
+++ wms/view/location.xml 2011-02-28 08:44:57 +0000
@@ -39,5 +39,13 @@
39 </field>39 </field>
40 </record>40 </record>
4141
42 <!-- ************************************************************** -->
43 <!-- ** Add value to the context, to bypass the protection id ***** -->
44 <!-- ** the warehouse is not well configure *********************** -->
45 <!-- ************************************************************** -->
46 <record id="stock.action_location_form" model="ir.actions.act_window">
47 <field name="context">{'new_warehouse': True}</field>
48 </record>
49
42 </data>50 </data>
43</openerp>51</openerp>
4452
=== modified file 'wms/view/warehouse.xml'
--- wms/view/warehouse.xml 2011-01-20 22:50:19 +0000
+++ wms/view/warehouse.xml 2011-02-28 08:44:57 +0000
@@ -44,10 +44,21 @@
44 </xpath>44 </xpath>
45 <xpath expr="/form/field[@name='name']" position="after">45 <xpath expr="/form/field[@name='name']" position="after">
46 <field name="code"/>46 <field name="code"/>
47 <field name="parent_id"/>
47 <field name="company_id"/>48 <field name="company_id"/>
49 <newline/>
48 </xpath>50 </xpath>
49 <xpath expr="/form/field[@name='lot_output_id']" position="after">51 <xpath expr="/form/field[@name='lot_output_id']" position="after">
50 <field name="crossdock_location_id" domain="[('usage','=', 'crossdock')]"/>52 <field name="crossdock_location_id" domain="[('warehouse_id','=', active_id),('usage','=', 'crossdock')]"/>
53 </xpath>
54 <xpath expr="/form/field[@name='partner_address_id']" position="after">
55 <notebook colspan="4">
56 <page string="Information">
57 <separator string="burst" colspan="4"/>
58 <field name="check_tracking_burst"/>
59 <field name="keep_missing_product_in" invisible="1"/>
60 </page>
61 </notebook>
51 </xpath>62 </xpath>
52 </data>63 </data>
5364
@@ -62,12 +73,25 @@
62 <field name="inherit_id" ref="stock.view_warehouse_tree"/>73 <field name="inherit_id" ref="stock.view_warehouse_tree"/>
63 <field name="arch" type="xml">74 <field name="arch" type="xml">
6475
65 <xpath expr="/tree/field[@name='name']" position="before">76 <data>
66 <field name="code"/>77 <xpath expr="/tree/field[@name='name']" position="before">
67 </xpath>78 <field name="code"/>
79 </xpath>
80 <xpath expr="/tree/field[@name='name']" position="after">
81 <field name="parent_id"/>
82 </xpath>
83 </data>
6884
69 </field>85 </field>
70 </record>86 </record>
7187
88 <!-- ************************************************************** -->
89 <!-- ** Add value to the context, to bypass the protection id ***** -->
90 <!-- ** the warehouse is not well configure *********************** -->
91 <!-- ************************************************************** -->
92 <record id="stock.action_warehouse_form" model="ir.actions.act_window">
93 <field name="context">{'new_warehouse': True}</field>
94 </record>
95
72 </data>96 </data>
73</openerp>97</openerp>
7498
=== modified file 'wms/wizard/burst.py'
--- wms/wizard/burst.py 2011-02-03 15:35:26 +0000
+++ wms/wizard/burst.py 2011-02-28 08:44:57 +0000
@@ -28,12 +28,12 @@
28from tools.translate import _28from tools.translate import _
2929
30init_form = """<?xml version="1.0" ?>30init_form = """<?xml version="1.0" ?>
31<form string="Burst">31<form string="%s">
32 <field name="product_id" colspan="4"/>32 <field name="product_id" colspan="4"/>
33 <field name="quantity"/>33 <field name="quantity"/>
34 <field name="remark_id"/>34 <field name="remark_id"/>
35</form>35</form>
36"""36""" % (_('Burst'))
3737
38init_fields = {38init_fields = {
39 'product_id': {'string': 'Product', 'type': 'many2one', 'relation': 'product.product', 'required': True, },39 'product_id': {'string': 'Product', 'type': 'many2one', 'relation': 'product.product', 'required': True, },
@@ -98,7 +98,7 @@
98 'type': 'form',98 'type': 'form',
99 'arch': init_form,99 'arch': init_form,
100 'fields': init_fields,100 'fields': init_fields,
101 'state': [('end','Cancel','gtk-cancel'), ('valid', 'OK', 'gtk-ok', True)],101 'state': [('end','Finnish','gtk-cancel'), ('valid', 'OK', 'gtk-ok', True)],
102 }102 }
103 },103 },
104 'valid': {104 'valid': {
105105
=== modified file 'wms/wizard/generate_wave.py'
--- wms/wizard/generate_wave.py 2011-02-24 22:02:45 +0000
+++ wms/wizard/generate_wave.py 2011-02-28 08:44:57 +0000
@@ -31,11 +31,11 @@
31_moves_arch = UpdateableStr()31_moves_arch = UpdateableStr()
3232
33init_form = """<?xml version="1.0" ?>33init_form = """<?xml version="1.0" ?>
34<form string="Select cart">34<form string="%s">
35 <separator string="Affect a cart for these picking" colspan="4"/>35 <separator string="%s" colspan="4"/>
36 <field name="cart_id" colspan="4" domain="[('categ_id','=', %d)]"/>36 <field name="cart_id" colspan="4" domain="[('categ_id','=', %d)]"/>
37</form>37</form>
38"""38"""
3939
40init_fields = {40init_fields = {
41 'cart_id': {'string': 'Cart', 'type': 'many2one', 'required': True, 'relation': 'stock.location'},41 'cart_id': {'string': 'Cart', 'type': 'many2one', 'required': True, 'relation': 'stock.location'},
@@ -60,7 +60,7 @@
60 ir_id = ir_mod_obj._get_id(cr, uid, 'wms_location', 'location_category_chariot')60 ir_id = ir_mod_obj._get_id(cr, uid, 'wms_location', 'location_category_chariot')
61 id = ir_mod_obj.read(cr, uid, ir_id, ['res_id'])['res_id']61 id = ir_mod_obj.read(cr, uid, ir_id, ['res_id'])['res_id']
6262
63 _moves_arch.string = init_form % id63 _moves_arch.string = init_form % (_('Select cart'), _('Affect a cart for these picking'), id)
6464
65 for i in pool.get('stock.picking').browse(cr, uid, data['ids'], context=context):65 for i in pool.get('stock.picking').browse(cr, uid, data['ids'], context=context):
66 if i.type != 'out':66 if i.type != 'out':
6767
=== modified file 'wms/wizard/wizard.xml'
--- wms/wizard/wizard.xml 2011-02-24 13:07:22 +0000
+++ wms/wizard/wizard.xml 2011-02-28 08:44:57 +0000
@@ -31,11 +31,11 @@
31 name="wms.partial_picking"31 name="wms.partial_picking"
32 string="Partial packing"/>32 string="Partial packing"/>
3333
34 <wizard34 <wizard id="stock_burst"
35 id="stock.burst"35 string="Fast entry"
36 model="stock.burst"36 model="stock.burst"
37 name="wms.burst"37 multi="False"
38 string="Burst"/>38 name="wms.burst"/>
3939
40 <wizard id="wizard_generate_wave"40 <wizard id="wizard_generate_wave"
41 string="Generate wave"41 string="Generate wave"
4242
=== modified file 'wms_inventory/__terp__.py'
--- wms_inventory/__terp__.py 2010-06-29 05:35:00 +0000
+++ wms_inventory/__terp__.py 2011-02-28 08:44:57 +0000
@@ -42,6 +42,7 @@
42 #'security/groups.xml',42 #'security/groups.xml',
43 #'security/ir.model.access.csv',43 #'security/ir.model.access.csv',
44 #'view/menu.xml',44 #'view/menu.xml',
45 'view/warehouse.xml',
45 'view/inventory.xml',46 'view/inventory.xml',
46 #'wizard/wizard.xml',47 #'wizard/wizard.xml',
47 #'report/report.xml',48 #'report/report.xml',
4849
=== modified file 'wms_inventory/i18n/fr_FR.po'
--- wms_inventory/i18n/fr_FR.po 2010-06-29 09:41:10 +0000
+++ wms_inventory/i18n/fr_FR.po 2011-02-28 08:44:57 +0000
@@ -5,8 +5,8 @@
5msgstr ""5msgstr ""
6"Project-Id-Version: PACKAGE VERSION\n"6"Project-Id-Version: PACKAGE VERSION\n"
7"Report-Msgid-Bugs-To: support@openerp.com\n"7"Report-Msgid-Bugs-To: support@openerp.com\n"
8"POT-Creation-Date: 2010-06-29 09:40:16+0000\n"8"POT-Creation-Date: 2011-02-27 18:39:06+0000\n"
9"PO-Revision-Date: 2010-06-29 11:40+0100\n"9"PO-Revision-Date: 2011-02-27 19:39+0100\n"
10"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"10"Last-Translator: Christophe Chauvet <christophe.chauvet@syleam.fr>\n"
11"Language-Team: LANGUAGE <LL@li.org>\n"11"Language-Team: LANGUAGE <LL@li.org>\n"
12"MIME-Version: 1.0\n"12"MIME-Version: 1.0\n"
@@ -15,9 +15,67 @@
15"X-Generator: Translate Toolkit 1.3.0\n"15"X-Generator: Translate Toolkit 1.3.0\n"
1616
17#. module: wms_inventory17#. module: wms_inventory
18#: constraint:ir.ui.view:018#: code:addons/wms_inventory/object/inventory.py:0
19msgid "Invalid XML for View Architecture!"19#, python-format
20msgid "nothing to regulate"
21msgstr "Rien à régulariser"
22
23#. module: wms_inventory
24#: code:addons/wms_inventory/object/inventory.py:0
25#, python-format
26msgid "global"
27msgstr "globale"
28
29#. module: wms_inventory
30#: code:addons/wms_inventory/object/inventory.py:0
31#, python-format
32msgid "quantity count %.2f"
33msgstr "quantité comptée %.2f"
34
35#. module: wms_inventory
36#: code:addons/wms_inventory/object/inventory.py:0
37#, python-format
38msgid "Default inventory location %s"
39msgstr "Emplacement d'inventaire par défaut %s"
40
41#. module: wms_inventory
42#: model:ir.module.module,description:wms_inventory.module_meta_information
43msgid ""
44"Module to extended inventory process\n"
45"- enter production lot in inventory line\n"
46"- enter serial number in inventory line\n"
20msgstr ""47msgstr ""
48"Module étendu de gestion du processus de l'inventaire\n"
49"- gestion des lot de production dans les lignes d'inventaires\n"
50"- gestion des numéros de série dans les lignes d'inventaires\n"
51
52#. module: wms_inventory
53#: code:addons/wms_inventory/object/inventory.py:0
54#, python-format
55msgid "quantity to reset %.2f"
56msgstr "quantité à reinitialisée %.2f"
57
58#. module: wms_inventory
59#: field:stock.inventory,warehouse_id:0
60msgid "Warehouse"
61msgstr "Entrepôt"
62
63#. module: wms_inventory
64#: field:stock.inventory,type:0
65msgid "Type"
66msgstr "TYpe"
67
68#. module: wms_inventory
69#: code:addons/wms_inventory/object/inventory.py:0
70#, python-format
71msgid " -> Partial Inventory"
72msgstr " -> Inventaire partiel"
73
74#. module: wms_inventory
75#: code:addons/wms_inventory/object/inventory.py:0
76#, python-format
77msgid " [%s]"
78msgstr " [%s]"
2179
22#. module: wms_inventory80#. module: wms_inventory
23#: help:stock.inventory,warehouse_id:081#: help:stock.inventory,warehouse_id:0
@@ -25,11 +83,118 @@
25msgstr "Sélectionner l'entrepôt ou sera fait cet inventaire"83msgstr "Sélectionner l'entrepôt ou sera fait cet inventaire"
2684
27#. module: wms_inventory85#. module: wms_inventory
86#: code:addons/wms_inventory/object/inventory.py:0
87#, python-format
88msgid "init"
89msgstr "init"
90
91#. module: wms_inventory
92#: code:addons/wms_inventory/object/inventory.py:0
93#, python-format
94msgid "Cost price %.2f"
95msgstr "P.U.M.P. %.2f"
96
97#. module: wms_inventory
98#: code:addons/wms_inventory/object/inventory.py:0
99#, python-format
100msgid "Inventory number %s"
101msgstr "Inventaire numéro %s"
102
103#. module: wms_inventory
104#: code:addons/wms_inventory/object/inventory.py:0
105#, python-format
106msgid "analyze"
107msgstr "analyse"
108
109#. module: wms_inventory
110#: code:addons/wms_inventory/object/inventory.py:0
111#, python-format
112msgid "product %s"
113msgstr "produit %s"
114
115#. module: wms_inventory
116#: constraint:ir.ui.view:0
117msgid "Invalid XML for View Architecture!"
118msgstr "XML non valide pour cette vue!"
119
120#. module: wms_inventory
121#: field:stock.inventory.line,tracking_id:0
122msgid "Tracking"
123msgstr "Suivi"
124
125#. module: wms_inventory
126#: code:addons/wms_inventory/object/inventory.py:0
127#, python-format
128msgid "quantity to regulate %.2f"
129msgstr "quantité à régularisé %.2f"
130
131#. module: wms_inventory
132#: code:addons/wms_inventory/object/inventory.py:0
133#, python-format
134msgid " -> Global Inventory"
135msgstr " -> Inventaire globale"
136
137#. module: wms_inventory
138#: code:addons/wms_inventory/object/inventory.py:0
139#, python-format
140msgid "Start to analyse each line"
141msgstr "Démarrer une analyse pour chaque ligne"
142
143#. module: wms_inventory
144#: code:addons/wms_inventory/object/inventory.py:0
145#, python-format
146msgid "Validate each inventory line"
147msgstr "Validation de chaque ligne d'inventaire"
148
149#. module: wms_inventory
150#: help:stock.inventory,type:0
151msgid "If global, reset all quantity product not found in this inventory"
152msgstr "Si globale, remise à zéro des quantités produits sur non trouvé dans l'inventaire"
153
154#. module: wms_inventory
155#: code:addons/wms_inventory/object/inventory.py:0
156#, python-format
157msgid ""
158"Inventory %s failed\n"
159"see below\n"
160msgstr "Échec de l'inventaire %s\n"
161
162#. module: wms_inventory
163#: code:addons/wms_inventory/object/inventory.py:0
164#, python-format
165msgid "Inventory %s has been finished"
166msgstr "L'inventaire %s est terminé."
167
168#. module: wms_inventory
169#: code:addons/wms_inventory/object/inventory.py:0
170#, python-format
171msgid "Finish the current inventory"
172msgstr "Fin de l'inventaire actuel"
173
174#. module: wms_inventory
175#: field:stock.warehouse,lot_inventory_id:0
176#: help:stock.warehouse,lot_inventory_id:0
177msgid "Default inventory location"
178msgstr "Emplacement de régul d'inventaire par défaut"
179
180#. module: wms_inventory
181#: code:addons/wms_inventory/object/inventory.py:0
182#, python-format
183msgid "Compute inventory %s done"
184msgstr "Calcul de l'inventaire %s terminé"
185
186#. module: wms_inventory
28#: selection:stock.inventory,type:0187#: selection:stock.inventory,type:0
29msgid "Partial"188msgid "Partial"
30msgstr "Partiel"189msgstr "Partiel"
31190
32#. module: wms_inventory191#. module: wms_inventory
192#: code:addons/wms_inventory/object/inventory.py:0
193#, python-format
194msgid "tracking %s"
195msgstr "suivi %s"
196
197#. module: wms_inventory
33#: selection:stock.inventory,type:0198#: selection:stock.inventory,type:0
34msgid "Global"199msgid "Global"
35msgstr "Globale"200msgstr "Globale"
@@ -37,16 +202,8 @@
37#. module: wms_inventory202#. module: wms_inventory
38#: code:addons/wms_inventory/object/inventory.py:0203#: code:addons/wms_inventory/object/inventory.py:0
39#, python-format204#, python-format
40msgid "Compute inventory %s done"205msgid "quantity in stock %.2f at location %s"
41msgstr "Calcul de l'inventaire %s terminé"206msgstr "Quantité en stock %.2f à cet emplacement %s"
42
43#. module: wms_inventory
44#: model:ir.module.module,description:wms_inventory.module_meta_information
45msgid ""
46"Module to extended inventory process\n"
47"- enter production lot in inventory line\n"
48"- enter serial number in inventory line\n"
49msgstr ""
50207
51#. module: wms_inventory208#. module: wms_inventory
52#: model:ir.module.module,shortdesc:wms_inventory.module_meta_information209#: model:ir.module.module,shortdesc:wms_inventory.module_meta_information
@@ -54,30 +211,22 @@
54msgstr "WMS Inventory"211msgstr "WMS Inventory"
55212
56#. module: wms_inventory213#. module: wms_inventory
57#: help:stock.inventory,type:0214#: code:addons/wms_inventory/object/inventory.py:0
58msgid "If global, reset all quantity product not found in this inventory"215#, python-format
59msgstr "Si globale, remise à zéro des quantités produits sur non trouvé dans l'inventaire"216msgid "error"
60217msgstr "erreur"
61#. module: wms_inventory218
62#: field:stock.inventory.line,tracking_id:0219#. module: wms_inventory
63msgid "Tracking"220#: code:addons/wms_inventory/object/inventory.py:0
64msgstr "Suivi"221#, python-format
65222msgid "action"
66#. module: wms_inventory223msgstr "action"
67#: field:stock.inventory,warehouse_id:0224
68msgid "Warehouse"225#. module: wms_inventory
69msgstr "Entrepôt"226#: code:addons/wms_inventory/object/inventory.py:0
70227#, python-format
71#. module: wms_inventory228msgid "production lot %s"
72#: code:addons/wms_inventory/object/inventory.py:0229msgstr "lot de production %s"
73#, python-format
74msgid "Inventory %s has been finished"
75msgstr "L'inventaire %s est terminé."
76
77#. module: wms_inventory
78#: field:stock.inventory,type:0
79msgid "Type"
80msgstr "TYpe"
81230
82#. module: wms_inventory231#. module: wms_inventory
83#: field:stock.inventory.line,prodlot_id:0232#: field:stock.inventory.line,prodlot_id:0
@@ -85,6 +234,18 @@
85msgstr "Lot de production"234msgstr "Lot de production"
86235
87#, python-format236#, python-format
237#~ msgid "quantity in stock %.2f"
238#~ msgstr "quantité en stock %.2f"
239
240#, python-format
241#~ msgid " %s"
242#~ msgstr " %s"
243
244#, python-format
245#~ msgid "Cost price %s"
246#~ msgstr "PUMP %s"
247
248#, python-format
88#~ msgid "\"\"Inventory %s has been finished\"\""249#~ msgid "\"\"Inventory %s has been finished\"\""
89#~ msgstr "\"\"l'inventaire %s est terminé\"\""250#~ msgstr "\"\"l'inventaire %s est terminé\"\""
90251
91252
=== modified file 'wms_inventory/i18n/wms_inventory.pot'
--- wms_inventory/i18n/wms_inventory.pot 2010-06-29 09:41:10 +0000
+++ wms_inventory/i18n/wms_inventory.pot 2011-02-28 08:44:57 +0000
@@ -4,10 +4,10 @@
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 5.0.11\n"7"Project-Id-Version: OpenERP Server 5.0.12\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2010-06-29 09:40:16+0000\n"9"POT-Creation-Date: 2011-02-27 18:39:06+0000\n"
10"PO-Revision-Date: 2010-06-29 09:40:16+0000\n"10"PO-Revision-Date: 2011-02-27 18:39:06+0000\n"
11"Last-Translator: <>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
@@ -16,29 +16,27 @@
16"Plural-Forms: \n"16"Plural-Forms: \n"
1717
18#. module: wms_inventory18#. module: wms_inventory
19#: constraint:ir.ui.view:019#: code:addons/wms_inventory/object/inventory.py:0
20msgid "Invalid XML for View Architecture!"20#, python-format
21msgstr ""21msgid "nothing to regulate"
2222msgstr ""
23#. module: wms_inventory23
24#: help:stock.inventory,warehouse_id:024#. module: wms_inventory
25msgid "Select the warehouse where the inventory is made"25#: code:addons/wms_inventory/object/inventory.py:0
26msgstr ""26#, python-format
2727msgid "global"
28#. module: wms_inventory28msgstr ""
29#: selection:stock.inventory,type:029
30msgid "Partial"30#. module: wms_inventory
31msgstr ""31#: code:addons/wms_inventory/object/inventory.py:0
3232#, python-format
33#. module: wms_inventory33msgid "quantity count %.2f"
34#: selection:stock.inventory,type:034msgstr ""
35msgid "Global"35
36msgstr ""36#. module: wms_inventory
3737#: code:addons/wms_inventory/object/inventory.py:0
38#. module: wms_inventory38#, python-format
39#: code:addons/wms_inventory/object/inventory.py:039msgid "Default inventory location %s"
40#, python-format
41msgid "Compute inventory %s done"
42msgstr ""40msgstr ""
4341
44#. module: wms_inventory42#. module: wms_inventory
@@ -50,18 +48,9 @@
50msgstr ""48msgstr ""
5149
52#. module: wms_inventory50#. module: wms_inventory
53#: model:ir.module.module,shortdesc:wms_inventory.module_meta_information51#: code:addons/wms_inventory/object/inventory.py:0
54msgid "Wms Inventory"52#, python-format
55msgstr ""53msgid "quantity to reset %.2f"
56
57#. module: wms_inventory
58#: help:stock.inventory,type:0
59msgid "If global, reset all quantity product not found in this inventory"
60msgstr ""
61
62#. module: wms_inventory
63#: field:stock.inventory.line,tracking_id:0
64msgid "Tracking"
65msgstr ""54msgstr ""
6655
67#. module: wms_inventory56#. module: wms_inventory
@@ -70,17 +59,172 @@
70msgstr ""59msgstr ""
7160
72#. module: wms_inventory61#. module: wms_inventory
73#: code:addons/wms_inventory/object/inventory.py:0
74#, python-format
75msgid "Inventory %s has been finished"
76msgstr ""
77
78#. module: wms_inventory
79#: field:stock.inventory,type:062#: field:stock.inventory,type:0
80msgid "Type"63msgid "Type"
81msgstr ""64msgstr ""
8265
83#. module: wms_inventory66#. module: wms_inventory
67#: code:addons/wms_inventory/object/inventory.py:0
68#, python-format
69msgid " -> Partial Inventory"
70msgstr ""
71
72#. module: wms_inventory
73#: code:addons/wms_inventory/object/inventory.py:0
74#, python-format
75msgid " [%s]"
76msgstr ""
77
78#. module: wms_inventory
79#: help:stock.inventory,warehouse_id:0
80msgid "Select the warehouse where the inventory is made"
81msgstr ""
82
83#. module: wms_inventory
84#: code:addons/wms_inventory/object/inventory.py:0
85#, python-format
86msgid "init"
87msgstr ""
88
89#. module: wms_inventory
90#: code:addons/wms_inventory/object/inventory.py:0
91#, python-format
92msgid "Cost price %.2f"
93msgstr ""
94
95#. module: wms_inventory
96#: code:addons/wms_inventory/object/inventory.py:0
97#, python-format
98msgid "Inventory number %s"
99msgstr ""
100
101#. module: wms_inventory
102#: code:addons/wms_inventory/object/inventory.py:0
103#, python-format
104msgid "analyze"
105msgstr ""
106
107#. module: wms_inventory
108#: code:addons/wms_inventory/object/inventory.py:0
109#, python-format
110msgid "product %s"
111msgstr ""
112
113#. module: wms_inventory
114#: constraint:ir.ui.view:0
115msgid "Invalid XML for View Architecture!"
116msgstr ""
117
118#. module: wms_inventory
119#: field:stock.inventory.line,tracking_id:0
120msgid "Tracking"
121msgstr ""
122
123#. module: wms_inventory
124#: code:addons/wms_inventory/object/inventory.py:0
125#, python-format
126msgid "quantity to regulate %.2f"
127msgstr ""
128
129#. module: wms_inventory
130#: code:addons/wms_inventory/object/inventory.py:0
131#, python-format
132msgid " -> Global Inventory"
133msgstr ""
134
135#. module: wms_inventory
136#: code:addons/wms_inventory/object/inventory.py:0
137#, python-format
138msgid "Start to analyse each line"
139msgstr ""
140
141#. module: wms_inventory
142#: code:addons/wms_inventory/object/inventory.py:0
143#, python-format
144msgid "Validate each inventory line"
145msgstr ""
146
147#. module: wms_inventory
148#: help:stock.inventory,type:0
149msgid "If global, reset all quantity product not found in this inventory"
150msgstr ""
151
152#. module: wms_inventory
153#: code:addons/wms_inventory/object/inventory.py:0
154#, python-format
155msgid "Inventory %s failed\nsee below\n"
156msgstr ""
157
158#. module: wms_inventory
159#: code:addons/wms_inventory/object/inventory.py:0
160#, python-format
161msgid "Inventory %s has been finished"
162msgstr ""
163
164#. module: wms_inventory
165#: code:addons/wms_inventory/object/inventory.py:0
166#, python-format
167msgid "Finish the current inventory"
168msgstr ""
169
170#. module: wms_inventory
171#: field:stock.warehouse,lot_inventory_id:0
172#: help:stock.warehouse,lot_inventory_id:0
173msgid "Default inventory location"
174msgstr ""
175
176#. module: wms_inventory
177#: code:addons/wms_inventory/object/inventory.py:0
178#, python-format
179msgid "Compute inventory %s done"
180msgstr ""
181
182#. module: wms_inventory
183#: selection:stock.inventory,type:0
184msgid "Partial"
185msgstr ""
186
187#. module: wms_inventory
188#: code:addons/wms_inventory/object/inventory.py:0
189#, python-format
190msgid "tracking %s"
191msgstr ""
192
193#. module: wms_inventory
194#: selection:stock.inventory,type:0
195msgid "Global"
196msgstr ""
197
198#. module: wms_inventory
199#: code:addons/wms_inventory/object/inventory.py:0
200#, python-format
201msgid "quantity in stock %.2f at location %s"
202msgstr ""
203
204#. module: wms_inventory
205#: model:ir.module.module,shortdesc:wms_inventory.module_meta_information
206msgid "Wms Inventory"
207msgstr ""
208
209#. module: wms_inventory
210#: code:addons/wms_inventory/object/inventory.py:0
211#, python-format
212msgid "error"
213msgstr ""
214
215#. module: wms_inventory
216#: code:addons/wms_inventory/object/inventory.py:0
217#, python-format
218msgid "action"
219msgstr ""
220
221#. module: wms_inventory
222#: code:addons/wms_inventory/object/inventory.py:0
223#, python-format
224msgid "production lot %s"
225msgstr ""
226
227#. module: wms_inventory
84#: field:stock.inventory.line,prodlot_id:0228#: field:stock.inventory.line,prodlot_id:0
85msgid "Production Lot"229msgid "Production Lot"
86msgstr ""230msgstr ""
87231
=== modified file 'wms_inventory/object/__init__.py'
--- wms_inventory/object/__init__.py 2010-06-29 05:35:00 +0000
+++ wms_inventory/object/__init__.py 2011-02-28 08:44:57 +0000
@@ -22,6 +22,7 @@
22#22#
23##############################################################################23##############################################################################
2424
25import warehouse
25import inventory26import inventory
2627
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:28# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2829
=== modified file 'wms_inventory/object/inventory.py'
--- wms_inventory/object/inventory.py 2010-07-06 06:33:28 +0000
+++ wms_inventory/object/inventory.py 2011-02-28 08:44:57 +0000
@@ -30,13 +30,15 @@
30import thread30import thread
31import pooler31import pooler
32import time32import time
33import tempfile
34import base64
3335
3436
35class Inventory(osv.osv):37class Inventory(osv.osv):
36 _inherit = 'stock.inventory'38 _inherit = 'stock.inventory'
3739
38 _columns = {40 _columns = {
39 'type': fields.selection([('global','Global'),('partial','Partial')], 'Type', 41 'type': fields.selection([('global', 'Global'), ('partial', 'Partial')], 'Type',
40 help='If global, reset all quantity product not found in this inventory'),42 help='If global, reset all quantity product not found in this inventory'),
41 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True,43 'warehouse_id': fields.many2one('stock.warehouse', 'Warehouse', required=True,
42 help='Select the warehouse where the inventory is made'),44 help='Select the warehouse where the inventory is made'),
@@ -47,7 +49,6 @@
47 'warehouse_id': lambda obj, cr, uid, context: obj.pool.get('res.users')._default_warehouse(cr, uid, context),49 'warehouse_id': lambda obj, cr, uid, context: obj.pool.get('res.users')._default_warehouse(cr, uid, context),
48 }50 }
4951
50
51 def action_done(self, cr, uid, ids, context=None):52 def action_done(self, cr, uid, ids, context=None):
52 """53 """
53 Validate the inventory, it take a lot of time and must be launch in multi thread54 Validate the inventory, it take a lot of time and must be launch in multi thread
@@ -57,66 +58,156 @@
57 Treatment launch as a new thread58 Treatment launch as a new thread
58 Must be include production lot and tracking59 Must be include production lot and tracking
59 """60 """
61 def log_message(fic, section, message):
62 """
63 Format the content of the logfile
64 """
65 fic.write('[%s] %s: %s\n' % (time.strftime('%Y-%m-%d %H:%M:%S'), section.encode('utf-8'), message.encode('utf-8')))
66
60 logger = netsvc.Logger()67 logger = netsvc.Logger()
61 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] Start compute the inventory *********' % cr.dbname) 68 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] Start compute the inventory *********' % cr.dbname)
62 cr = pooler.get_db(cr.dbname).cursor()69 cr = pooler.get_db(cr.dbname).cursor()
63 for inv in self.browse(cr, uid, ids):70 for inv in self.browse(cr, uid, ids):
64 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] Inventory %s' % (cr.dbname, inv.name)) 71 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] Inventory %s' % (cr.dbname, inv.name))
65 move_ids = []72 # For each inventory, we save all step in the log file
66 move_line = []73 outfp = tempfile.NamedTemporaryFile(prefix='openerp', suffix='inventory')
67 inv_ok = True74 log_message(outfp, _('init'), _('Inventory number %s') % inv.name)
75 if inv.type == 'partial':
76 log_message(outfp, _('init'), _(' -> Partial Inventory'))
77 else:
78 log_message(outfp, _('init'), _(' -> Global Inventory'))
68 inv_message = ''79 inv_message = ''
69 for line in inv.inventory_line_id:80 # If default inventory location is missing in the warehouse, we add information in the logfile and exit properly
70 pid = line.product_id.id81 if inv.warehouse_id.lot_inventory_id:
71 price = line.product_id.standard_price or 0.082 log_message(outfp, _('init'), _('Default inventory location %s') % inv.warehouse_id.lot_inventory_id.name)
72 prodlot = line.prodlot_id and line.prodlot_id.id or False83 move_ids = []
73 tracking = line.tracking_id and line.tracking_id.id or False84 move_line = []
74 amount = self.pool.get('stock.location')._stock_get(cr, uid, line.location_id.id, [pid], 85 inv_ok = True
75 {'uom': line.product_uom.id, 'prodlot': prodlot, 'tracking': tracking})86 tmp_prod = []
76 change = line.product_qty - amount87 log_message(outfp, 'init', _('Start to analyse each line'))
77 if change:88 for line in inv.inventory_line_id:
78 location_id = line.product_id.product_tmpl_id.property_stock_inventory.id89 log_message(outfp, _('analyze'), '**********************')
79 value = {90 pid = line.product_id.id
80 'name': 'INV:' + str(line.inventory_id.id) + ':' + line.inventory_id.name,91 log_message(outfp, _('analyze'), _('product %s') % line.product_id.name)
81 'product_id': line.product_id.id,92 log_message(outfp, _('analyze'), _(' [%s]') % line.product_id.default_code)
82 'product_uom': line.product_uom.id,93 price = line.product_id.standard_price or 0.0
83 'date': inv.date,94 log_message(outfp, _('analyze'), _('Cost price %.2f') % line.product_id.standard_price)
84 'date_planned': inv.date,95 prodlot = line.prodlot_id and line.prodlot_id.id or False
85 'state': 'assigned',96 if prodlot:
86 'prodlot_id': prodlot,97 log_message(outfp, _('analyze'), _('production lot %s') % line.prodlot_id.name)
87 'tracking_id': tracking,98 tracking = line.tracking_id and line.tracking_id.id or False
88 }99 if tracking:
89 if change > 0:100 log_message(outfp, _('analyze'), _('tracking %s') % line.tracking_id.name)
90 value.update( {101
91 'product_qty': change,102 amount = self.pool.get('stock.location')._stock_get(cr, uid, line.location_id.id, [pid],
92 'location_id': location_id,103 {'uom': line.product_uom.id, 'prodlot': prodlot, 'tracking': tracking})
93 'location_dest_id': line.location_id.id,104 log_message(outfp, _('analyze'), _('quantity in stock %.2f at location %s') % (amount, line.location_id.name))
94 })105 log_message(outfp, _('analyze'), _('quantity count %.2f') % line.product_qty)
106
107 # for global inventory, we keep if we found this product
108 tmp_prod.append('%d_%d_%d_%d' % (line.product_id.id, line.location_id.id, prodlot or 0, tracking or 0))
109 change = line.product_qty - amount
110 if not change:
111 log_message(outfp, _('action'), _('nothing to regulate'))
95 else:112 else:
96 value.update( {113 log_message(outfp, _('action'), _('quantity to regulate %.2f') % change)
97 'product_qty': -change,114 location_id = line.product_id.product_tmpl_id.property_stock_inventory.id or inv.warehouse_id.lot_inventory_id.id
98 'location_id': line.location_id.id,115 value = {
116 'name': 'INV:' + str(line.inventory_id.id) + ':' + line.inventory_id.name,
117 'product_id': line.product_id.id,
118 'product_uom': line.product_uom.id,
119 'date': inv.date,
120 'date_planned': inv.date,
121 'state': 'assigned',
122 'prodlot_id': prodlot,
123 'tracking_id': tracking,
124 }
125 if change > 0:
126 value.update({
127 'product_qty': change,
128 'location_id': location_id,
129 'location_dest_id': line.location_id.id,
130 })
131 else:
132 value.update({
133 'product_qty': -change,
134 'location_id': line.location_id.id,
135 'location_dest_id': location_id,
136 })
137 try:
138 move_ids.append(self.pool.get('stock.move').create(cr, uid, value))
139 except except_orm, e:
140 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] %s %s' % (cr.dbname, e.name, e.value))
141 log_message(outfp, _('error'), '[%s] %s %s' % (cr.dbname, e.name, e.value))
142 inv_message += ' %s: %s\n' % (e.name, e.value)
143 inv_ok = False
144
145 ##
146 ## Global inventory must reset the missing product, on this warehouse
147 log_message(outfp, _('global'), '===========================================')
148 if inv.type == 'global':
149 avail_obj = self.pool.get('wms.report.stock.available')
150 args = [
151 ('warehouse_id', '=', inv.warehouse_id.id),
152 ]
153 avail_ids = avail_obj.search(cr, uid, args, context=context)
154 for a in avail_obj.browse(cr, uid, avail_ids, context=context):
155 log_message(outfp, _('analyze'), '**********************')
156 # Check if this product was already found at this location
157 tmp_key = '%d_%d_%d_%d' % (a.product_id.id, a.location_id.id,
158 a.prodlot_id and a.prodlot_id.id or 0, a.tracking_id and a.tracking_id.id or 0)
159
160 if tmp_key in tmp_prod:
161 continue
162
163 log_message(outfp, _('analyze'), _('product %s') % a.product_id.name)
164 log_message(outfp, _('analyze'), _(' [%s]') % a.product_id.default_code)
165 if a.prodlot_id:
166 log_message(outfp, _('analyze'), _('production lot %s') % a.prodlot_id.name)
167 if a.tracking_id:
168 log_message(outfp, _('analyze'), _('tracking %s') % a.tracking_id.name)
169 log_message(outfp, _('action'), _('quantity to reset %.2f') % a.qty)
170
171 location_id = line.product_id.product_tmpl_id.property_stock_inventory.id or inv.warehouse_id.lot_inventory_id.id
172 value = {
173 'name': 'INV: reset qty: ' + line.inventory_id.name,
174 'product_id': a.product_id.id,
175 'product_uom': a.uom_id.id,
176 'date': inv.date,
177 'date_planned': inv.date,
178 'state': 'assigned',
179 'prodlot_id': a.prodlot_id and a.prodlot_id.id or False,
180 'tracking_id': a.tracking_id and a.tracking_id.id or False,
181 'product_qty': a.qty,
182 'location_id': a.location_id.id,
99 'location_dest_id': location_id,183 'location_dest_id': location_id,
100 })184 }
185 try:
186 move_ids.append(self.pool.get('stock.move').create(cr, uid, value))
187 except except_orm, e:
188 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] %s %s' % (cr.dbname, e.name, e.value))
189 log_message(outfp, _('error'), '[%s] %s %s' % (cr.dbname, e.name, e.value))
190 inv_message += ' %s: %s\n' % (e.name, e.value)
191 inv_ok = False
192
193 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] Compute each line' % cr.dbname)
194 log_message(outfp, _('action'), _('Validate each inventory line'))
195 if len(move_ids) and inv_ok:
101 try:196 try:
102 move_ids.append(self.pool.get('stock.move').create(cr, uid, value))197 self.pool.get('stock.move').action_done(cr, uid, move_ids,
198 context=context)
103 except except_orm, e:199 except except_orm, e:
104 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] %s %s' % (cr.dbname, e.name, e.value)) 200 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] %s %s' % (cr.dbname, e.name, e.value))
105 inv_message += ' %s: %s\n' % (e.name, e.value)201 inv_message += ' %s: %s\n' % (e.name, e.value)
106 inv_ok = False202 inv_ok = False
107 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] Compute each line' % cr.dbname)
108 if len(move_ids) and inv_ok:
109 try:
110 self.pool.get('stock.move').action_done(cr, uid, move_ids,
111 context=context)
112 except except_orm, e:
113 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] %s %s' % (cr.dbname, e.name, e.value))
114 inv_message += ' %s: %s\n' % (e.name, e.value)
115 inv_ok = False
116203
117 if inv_ok:204 log_message(outfp, _('action'), _('Finish the current inventory'))
118 self.write(cr, uid, [inv.id], {'state': 'done', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S'), 205 if inv_ok:
119 'move_ids': [(6, 0, move_ids)]})206 self.write(cr, uid, [inv.id], {'state': 'done', 'date_done': time.strftime('%Y-%m-%d %H:%M:%S'),
207 'move_ids': [(6, 0, move_ids)]})
208 else:
209 log_message(outfp, 'error', 'defaut inventory location is missing on the warehouse %s' % inv.warehouse_id.name)
210 inv_ok = False
120211
121 ###212 ###
122 ## Send a request to the user whom launch the validation213 ## Send a request to the user whom launch the validation
@@ -131,12 +222,25 @@
131 'name': _('Compute inventory %s done') % inv.name,222 'name': _('Compute inventory %s done') % inv.name,
132 'act_from': uid,223 'act_from': uid,
133 'act_to': uid,224 'act_to': uid,
134 'body' : body,225 'body': body,
135 }, context=context)226 }, context=context)
136227
228 # Store the logfile as attachment
229 outfp.flush()
230 outfp.seek(0)
231 vals = {
232 'datas': base64.encodestring(outfp.read()),
233 'datas_fname': 'inv_%s' % inv.name,
234 'name': 'INV %s' % inv.name,
235 'res_model': 'stock.inventory',
236 'res_id': inv.id,
237 }
238 self.pool.get('ir.attachment').create(cr, uid, vals, context=context)
239 outfp.close()
240
137 cr.commit()241 cr.commit()
138 cr.close()242 cr.close()
139 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] End compute the inventory ***********' % cr.dbname) 243 logger.notifyChannel('wms_inventory', netsvc.LOG_INFO, '[%s] End compute the inventory ***********' % cr.dbname)
140 return True244 return True
141245
142 thread.start_new_thread(threading_done, (cr, uid, ids, context))246 thread.start_new_thread(threading_done, (cr, uid, ids, context))
@@ -144,6 +248,7 @@
144248
145Inventory()249Inventory()
146250
251
147class InventoryLine(osv.osv):252class InventoryLine(osv.osv):
148 _inherit = 'stock.inventory.line'253 _inherit = 'stock.inventory.line'
149254
150255
=== added file 'wms_inventory/object/warehouse.py'
--- wms_inventory/object/warehouse.py 1970-01-01 00:00:00 +0000
+++ wms_inventory/object/warehouse.py 2011-02-28 08:44:57 +0000
@@ -0,0 +1,37 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# wms_inventory module for OpenERP, Module to extended inventory process
5# Copyright (C) 2011 SYLEAM (<http://www.syleam.fr/>)
6# Christophe CHAUVET <christophe.chauvet@syleam.fr>
7#
8# This file is a part of wms_inventory
9#
10# wms_inventory is free software: you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation, either version 3 of the License, or
13# (at your option) any later version.
14#
15# wms_inventory is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License
21# along with this program. If not, see <http://www.gnu.org/licenses/>.
22#
23##############################################################################
24
25from osv import osv
26from osv import fields
27
28class StockWarehouse(osv.osv):
29 _inherit = 'stock.warehouse'
30
31 _columns = {
32 'lot_inventory_id': fields.many2one('stock.location', 'Default inventory location', help='Default inventory location'),
33 }
34
35StockWarehouse()
36
37# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
038
=== added file 'wms_inventory/view/warehouse.xml'
--- wms_inventory/view/warehouse.xml 1970-01-01 00:00:00 +0000
+++ wms_inventory/view/warehouse.xml 2011-02-28 08:44:57 +0000
@@ -0,0 +1,41 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<openerp>
3 <data>
4 ##############################################################################
5 #
6 # wms_inventory module for OpenERP, Module to extended inventory process
7 # Copyright (C) 2011 SYLEAM ([http://www.syleam.fr/])
8 # Christophe CHAUVET [christophe.chauvet@syleam.fr]
9 #
10 # This file is a part of wms_inventory
11 #
12 # wms_inventory is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
16 #
17 # wms_inventory is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program. If not, see [http://www.gnu.org/licenses/].
24 #
25 ##############################################################################
26
27 <record id="view_stock_warehouse_inventory_form" model="ir.ui.view">
28 <field name="name">stock.warehouse - inventory</field>
29 <field name="model">stock.warehouse</field>
30 <field name="type">form</field>
31 <field name="priority" eval="18"/>
32 <field name="inherit_id" ref="stock.view_warehouse"/>
33 <field name="arch" type="xml">
34 <xpath expr="/form/field[@name='crossdock_location_id']" position="after">
35 <field name="lot_inventory_id" domain="[('warehouse_id','=', active_id),('usage','=', 'inventory')]"/>
36 </xpath>
37 </field>
38 </record>
39
40 </data>
41</openerp>
042
=== modified file 'wms_location/object/location.py'
--- wms_location/object/location.py 2011-01-24 21:52:52 +0000
+++ wms_location/object/location.py 2011-02-28 08:44:57 +0000
@@ -110,6 +110,7 @@
110 ('product_uom', '=', context.get('uom')),110 ('product_uom', '=', context.get('uom')),
111 ('prodlot_id', '=', context.get('prodlot', False)),111 ('prodlot_id', '=', context.get('prodlot', False)),
112 ('tracking_id', '=', context.get('tracking', False)),112 ('tracking_id', '=', context.get('tracking', False)),
113 ('state', '=', 'done'),
113 ]114 ]
114 move_ids = move_obj.search(cr, uid, args, context=context)115 move_ids = move_obj.search(cr, uid, args, context=context)
115 move = move_obj.read(cr, uid, move_ids, ['product_qty'], context=context)116 move = move_obj.read(cr, uid, move_ids, ['product_qty'], context=context)

Subscribers

People subscribed via source and target branches