← Back to team overview

openerp-community-reviewer team mailing list archive

lp:~camptocamp/stock-logistic-flows/7.0-visualize_prodlots_from_a_location-rde into lp:stock-logistic-flows/7.0

 

Romain Deheele - Camptocamp has proposed merging lp:~camptocamp/stock-logistic-flows/7.0-visualize_prodlots_from_a_location-rde into lp:stock-logistic-flows/7.0.

Requested reviews:
  Stock and Logistic Core Editors (stock-logistic-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/stock-logistic-flows/7.0-visualize_prodlots_from_a_location-rde/+merge/190071

Hello,

This branch adds button to visualize prodlots currently presents from a location.

Best Regards,

Romain
-- 
https://code.launchpad.net/~camptocamp/stock-logistic-flows/7.0-visualize_prodlots_from_a_location-rde/+merge/190071
Your team Stock and Logistic Core Editors is requested to review the proposed merge of lp:~camptocamp/stock-logistic-flows/7.0-visualize_prodlots_from_a_location-rde into lp:stock-logistic-flows/7.0.
=== modified file 'product_serial/__openerp__.py'
--- product_serial/__openerp__.py	2013-08-01 12:40:27 +0000
+++ product_serial/__openerp__.py	2013-10-09 09:57:46 +0000
@@ -35,6 +35,7 @@
     2) If the option 'Active auto split' is active for the Company, OpenERP will automagically splits up picking list movements into one movement per product instance or logistical unit packing quantity (in that case, only the first logistical unit is taken into account at the present time. Improvement to take them all to be done !).
     3) Turns Incoming Pickings into an editable grid where you can directly type the codes of a new production lot and/or tracking number to create and associate to the move (it also checks it doesn't exist yet).
     4) If the option 'Group invoice lines' is active for the Company, OpenERP will group the invoice lines to make it look like the Sale/Purchase Order when generating an Invoice from a Picking.
+    5) Via Warehouse>Configuration>Locations>More>Prodlots, visualize prodlots currently present in the selected location.
 
     """,
     "demo" : ["product_demo.xml"],

=== added file 'product_serial/i18n/fr.po'
--- product_serial/i18n/fr.po	1970-01-01 00:00:00 +0000
+++ product_serial/i18n/fr.po	2013-10-09 09:57:46 +0000
@@ -0,0 +1,212 @@
+# Translation of OpenERP Server.
+# This file contains the translation of the following modules:
+#       * product_serial
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: OpenERP Server 7.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-09 09:30+0000\n"
+"PO-Revision-Date: 2013-10-09 09:30+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: product_serial
+#: field:stock.picking.prodlot.selection,last_number:0
+msgid "Last Number"
+msgstr "Dernier Numéro"
+
+#. module: product_serial
+#: selection:product.product,lot_split_type:0
+msgid "Single"
+msgstr "Unité"
+
+#. module: product_serial
+#: help:stock.production.lot,last_location_id:0
+msgid "Display the current stock location of this production lot"
+msgstr "Affiche l'emplacement actuel de ce lot"
+
+#. module: product_serial
+#: selection:product.product,lot_split_type:0
+msgid "None"
+msgstr "Aucun"
+
+#. module: product_serial
+#: model:ir.model,name:product_serial.model_stock_picking_prodlot_selection
+msgid "stock.picking.prodlot.selection"
+msgstr "stock.picking.prodlot.selection"
+
+#. module: product_serial
+#: field:stock.production.lot,last_location_id:0
+msgid "Last location"
+msgstr "Dernier emplacement"
+
+#. module: product_serial
+#: view:stock.move:0
+msgid "[('product_id','=?',product_id)]"
+msgstr "[('product_id','=?',product_id)]"
+
+#. module: product_serial
+#: view:stock.move:0
+msgid "Manual Split"
+msgstr "Découpage manuel"
+
+#. module: product_serial
+#: model:ir.model,name:product_serial.model_stock_production_lot
+msgid "Serial Number"
+msgstr "Numéro de série"
+
+#. module: product_serial
+#: model:ir.model,name:product_serial.model_stock_picking
+msgid "Picking List"
+msgstr "Opération de manutention"
+
+#. module: product_serial
+#: field:stock.move,new_tracking_code:0
+msgid "Create Tracking"
+msgstr "Créer un suivi"
+
+#. module: product_serial
+#: field:stock.picking.prodlot.selection,create_prodlots:0
+msgid "Create New Serial Numbers"
+msgstr "Créer Nouveaux Numéros de Série"
+
+#. module: product_serial
+#: field:stock.picking.prodlot.selection,first_number:0
+msgid "First Number"
+msgstr "Premier Numéro"
+
+#. module: product_serial
+#: model:ir.model,name:product_serial.model_product_product
+#: field:stock.picking.prodlot.selection,product_id:0
+msgid "Product"
+msgstr "Article"
+
+#. module: product_serial
+#: view:stock.move:0
+msgid "bottom"
+msgstr "dessous"
+
+#. module: product_serial
+#: field:stock.picking.prodlot.selection,prefix:0
+msgid "Prefix"
+msgstr "Préfixe"
+
+#. module: product_serial
+#: field:stock.move,new_prodlot_code:0
+msgid "Create Serial Number"
+msgstr "Créer numéro de série"
+
+#. module: product_serial
+#: field:res.company,autosplit_is_active:0
+msgid "Active auto split"
+msgstr "Activer l'auto découpe"
+
+#. module: product_serial
+#: field:res.company,is_group_invoice_line:0
+msgid "Group invoice lines"
+msgstr "Grouper les lignes de facture"
+
+#. module: product_serial
+#: model:ir.actions.act_window,name:product_serial.action_prodlot_selection
+#: view:stock.picking.prodlot.selection:0
+msgid "Select Production Lots"
+msgstr "Sélectionner les lots de production"
+
+#. module: product_serial
+#: view:stock.picking.prodlot.selection:0
+msgid "Validate"
+msgstr "Valider"
+
+#. module: product_serial
+#: view:stock.move:0
+msgid "onchange_lot_id(prodlot_id, product_qty, location_id, product_id, product_uom)"
+msgstr "onchange_lot_id(prodlot_id, product_qty, location_id, product_id, product_uom)"
+
+#. module: product_serial
+#: selection:product.product,lot_split_type:0
+msgid "Logistical Unit"
+msgstr "Unité logistique"
+
+#. module: product_serial
+#: model:ir.model,name:product_serial.model_res_company
+msgid "Companies"
+msgstr "Sociétés"
+
+#. module: product_serial
+#: field:product.product,lot_split_type:0
+msgid "Lot split type"
+msgstr "Type de découpage de lot"
+
+#. module: product_serial
+#: help:res.company,is_group_invoice_line:0
+msgid "If active, OpenERP will group the identical invoice lines when generating an invoice from a picking. If inactive, each move line will generate one invoice line."
+msgstr "Si actif, OpenERP groupera les lignes de factures identiques lors de\n"
+"la génération d'une facture depuis une livraison. Sinon, chaque\n"
+"mouvement de stock génèrera une ligne de facture."
+
+#. module: product_serial
+#: view:stock.move:0
+msgid "{'location_id':location_id, 'product_id':product_id}"
+msgstr "{'location_id':location_id, 'product_id':product_id}"
+
+#. module: product_serial
+#: view:stock.picking:0
+#: view:stock.picking.in:0
+#: view:stock.picking.out:0
+msgid "Spread Production Lots"
+msgstr "Spread Production Lots"
+
+#. module: product_serial
+#: field:stock.picking.prodlot.selection,suffix:0
+msgid "Suffix"
+msgstr "Suffixe"
+
+#. module: product_serial
+#: view:stock.move:0
+msgid "onchange_product_id(product_id,location_id,location_dest_id, False)"
+msgstr "onchange_product_id(product_id,location_id,location_dest_id, False)"
+
+#. module: product_serial
+#: help:product.product,lot_split_type:0
+msgid "None: no split ; single: 1 line/product unit ; Logistical Unit: split using the first Logistical Unit quantity of the product form packaging tab (to be improved to take into account all LU)"
+msgstr "Aucun: pas de découpe ; Unique : une ligne par unité de produit ;\n"
+"Unité logistique : découp en utilisant la première quantité\n"
+"appartenant à une unité logistique depuis l'onglet packaging (doit\n"
+"encore être amélioré)"
+
+#. module: product_serial
+#: view:res.company:0
+msgid "Product serial"
+msgstr "Numéro de série"
+
+#. module: product_serial
+#: model:ir.model,name:product_serial.model_stock_move
+msgid "Stock Move"
+msgstr "Mouvement de stock"
+
+#. module: product_serial
+#: view:stock.move:0
+msgid "Manual split"
+msgstr "Découpe manuelle"
+
+#. module: product_serial
+#: help:res.company,autosplit_is_active:0
+msgid "Active the automatic split of move lines on the pickings."
+msgstr "Active la découpe automatique des mouvements de stock de l'opération\n"
+"de manutention."
+
+#. module: product_serial
+#: view:stock.picking.prodlot.selection:0
+msgid "Cancel"
+msgstr "Annuler"
+
+#. module: product_serial
+#: model:ir.actions.act_window,name:product_serial.act_prodlot_location_open
+msgid "Prodlots"
+msgstr "Lots de Production"
+ 

=== modified file 'product_serial/stock.py'
--- product_serial/stock.py	2013-05-20 19:39:21 +0000
+++ product_serial/stock.py	2013-10-09 09:57:46 +0000
@@ -281,8 +281,28 @@
 
         return res
 
+    def _last_location_id_search(self, cr, uid, obj, name, args, context=None):
+        ops = ['=', ]
+        prodlot_ids = ()
+        if not len(args):
+            return []
+        prodlot_ids = []
+        for a in args:
+            operator = a[1]
+            value = a[2]
+            if not operator in ops:
+                raise osv.except_osv(_('Error !'), _('Operator %s not supported in searches for last_location_id (product.product).' % operator))
+            if operator == '=':
+                cr.execute(
+                    "select distinct prodlot_id "\
+                    "from stock_report_prodlots "\
+                    "where location_id = %s and qty > 0 ",
+                    (value, ))
+                prodlot_ids = filter(None, map(lambda x:x[0], cr.fetchall()))
+        return [('id','in',tuple(prodlot_ids))]
+
     _columns = {
-        'last_location_id': fields.function(_last_location_id,
+        'last_location_id': fields.function(_last_location_id, fnct_search=_last_location_id_search,
                                     type="many2one", relation="stock.location",
                                     string="Last location",
                                     help="Display the current stock location of this production lot"),

=== modified file 'product_serial/stock_view.xml'
--- product_serial/stock_view.xml	2013-05-20 19:39:45 +0000
+++ product_serial/stock_view.xml	2013-10-09 09:57:46 +0000
@@ -75,6 +75,20 @@
     </field>
 </record>
 
+<act_window
+    domain="[('last_location_id', '=', active_id)]"
+    id="act_prodlot_location_open"
+    name="Prodlots"
+    res_model="stock.production.lot"
+    src_model="stock.location"/>
+
+<record id="ir_act_prodlot_location_open" model="ir.values">
+    <field name="key2">tree_but_open</field>
+    <field name="model">stock.location</field>
+    <field name="name">Prodlots</field>
+    <field eval="'ir.actions.act_window,%d'%act_prodlot_location_open" name="value"/>
+</record>
+
 	<!-- Wizard to help users input production lots in batch -->
 <!-- TODO Nan-TIc : port to v6
 	<record id="view_stock_picking_prodlot_selection" model="ir.ui.view">


Follow ups