diff --git a/stock_usability/i18n/fr.po b/stock_usability/i18n/fr.po new file mode 100644 index 0000000..839c362 --- /dev/null +++ b/stock_usability/i18n/fr.po @@ -0,0 +1,257 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_usability +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-10 13:46+0000\n" +"PO-Revision-Date: 2016-11-10 13:46+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: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "\"{'group_by': 'min_date:day'}\"" +msgstr "\"{'group_by': 'min_date:day'}\"" + +#. module: stock_usability +#: view:stock.move:stock_usability.view_move_form +#: view:stock.move:stock_usability.view_move_picking_form +msgid "Advanced Parameters" +msgstr "Paramètres Avancées" + +#. module: stock_usability +#: sql_constraint:stock.warehouse.orderpoint:0 +msgid "An orderpoint already exists for the same company, same warehouse, same stock location and same product." +msgstr "An orderpoint already exists for the same company, same warehouse, same stock location and same product." + +#. module: stock_usability +#: field:procurement.scheduler.log,company_id:0 +msgid "Company" +msgstr "Société" + +#. module: stock_usability +#: field:procurement.scheduler.log,create_uid:0 +msgid "Created by" +msgstr "Créé par" + +#. module: stock_usability +#: field:procurement.scheduler.log,create_date:0 +msgid "Created on" +msgstr "Créé le" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Date Done" +msgstr "Date Terminé" + +#. module: stock_usability +#: help:stock.quant,uom_id:0 +msgid "Default Unit of Measure used for all stock operation." +msgstr "Default Unit of Measure used for all stock operation." + +#. module: stock_usability +#: field:procurement.scheduler.log,display_name:0 +msgid "Display Name" +msgstr "Nom Affiché" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Expected Date" +msgstr "Date prévue" + +#. module: stock_usability +#: view:stock.location:stock_usability.view_location_search +msgid "Group By" +msgstr "Groupé par" + +#. module: stock_usability +#: field:procurement.scheduler.log,id:0 +msgid "ID" +msgstr "ID" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_incoterms +msgid "Incoterms" +msgstr "Incoterms" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_inventory +msgid "Inventory" +msgstr "Inventaire" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_location +msgid "Inventory Locations" +msgstr "Emplacements de stock" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_location_route +msgid "Inventory Routes" +msgstr "Routes logistiques" + +#. module: stock_usability +#: field:procurement.scheduler.log,__last_update:0 +msgid "Last Modified on" +msgstr "Modifié le" + +#. module: stock_usability +#: field:procurement.scheduler.log,write_uid:0 +msgid "Last Updated by" +msgstr "Mis à jour par" + +#. module: stock_usability +#: field:procurement.scheduler.log,write_date:0 +msgid "Last Updated on" +msgstr "Modifié le" + +#. module: stock_usability +#: view:stock.location:stock_usability.view_location_search +msgid "Location Type" +msgstr "Type d'Emplacement" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_procurement_scheduler_log +msgid "Logs of the Procurement Scheduler" +msgstr "Logs of the Procurement Scheduler" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_warehouse_orderpoint +msgid "Minimum Inventory Rule" +msgstr "Règle de stock minimum" + +#. module: stock_usability +#: view:stock.move:stock_usability.view_move_form +#: view:stock.move:stock_usability.view_move_picking_form +msgid "Notes" +msgstr "Notes" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Origin" +msgstr "Origine" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Partner" +msgstr "Partenaire" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_picking +msgid "Picking List" +msgstr "Liste de livraison" + +#. module: stock_usability +#: view:stock.warehouse:stock_usability.view_warehouse +msgid "Picking Types" +msgstr "Types de préparation" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_procurement_order +msgid "Procurement" +msgstr "Approvisionnement" + +#. module: stock_usability +#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree +msgid "Procurement Scheduler Logs" +msgstr "Procurement Scheduler Logs" + +#. module: stock_usability +#: model:ir.actions.act_window,name:stock_usability.stock_location_path_action +#: model:ir.ui.menu,name:stock_usability.stock_location_path_menu +msgid "Push Rules" +msgstr "Push Rules" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_quant +msgid "Quants" +msgstr "Quants" + +#. module: stock_usability +#: field:stock.location,quant_ids:0 +msgid "Related Quants" +msgstr "Related Quants" + +#. module: stock_usability +#: view:stock.warehouse:stock_usability.view_warehouse +msgid "Routes" +msgstr "Routes" + +#. module: stock_usability +#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree +msgid "Scheduler End Time" +msgstr "Scheduler End Time" + +#. module: stock_usability +#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree +msgid "Scheduler Executed by" +msgstr "Scheduler Executed by" + +#. module: stock_usability +#: model:ir.actions.act_window,name:stock_usability.procurement_scheduler_log_action +#: model:ir.ui.menu,name:stock_usability.procurement_scheduler_log_menu +msgid "Scheduler Logs" +msgstr "Scheduler Logs" + +#. module: stock_usability +#: field:procurement.scheduler.log,start_datetime:0 +msgid "Start Date" +msgstr "Date de Début" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_move +msgid "Stock Move" +msgstr "Mouvement de stock" + +#. module: stock_usability +#: view:procurement.order:stock_usability.view_procurement_form_stock_inherit +msgid "Stock Moves" +msgstr "Mouvements de stock" + +#. module: stock_usability +#: field:stock.move,product_code:0 +msgid "Supplier Code" +msgstr "Code Fournisseur" + +#. module: stock_usability +#: help:stock.move,product_code:0 +msgid "Supplier product code if exist else product Internal Reference if exist" +msgstr "Code article fournisseur si existant sinon référence interne de l'article si existant" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_picking_type +msgid "The picking type determines the picking view" +msgstr "Le type de préparation détermine la vue de préparation" + +#. module: stock_usability +#: view:stock.transfer_details:stock_usability.view_stock_enter_transfer_details +msgid "Total" +msgstr "Total" + +#. module: stock_usability +#: view:stock.quant:stock_usability.view_stock_quant_tree +msgid "Total Qty" +msgstr "Qté Total" + +#. module: stock_usability +#: view:stock.picking:stock_usability.stock_picking_graph +msgid "Transfers" +msgstr "Transferts" + +#. module: stock_usability +#: field:stock.quant,uom_id:0 +msgid "Unit of Measure" +msgstr "Unité de Mesure" + +#. module: stock_usability +#: view:stock.move:stock_usability.view_move_form +#: view:stock.move:stock_usability.view_move_picking_tree +msgid "Unreserve" +msgstr "Déréserver" + diff --git a/stock_usability/i18n/stock_usability.pot b/stock_usability/i18n/stock_usability.pot new file mode 100644 index 0000000..9940310 --- /dev/null +++ b/stock_usability/i18n/stock_usability.pot @@ -0,0 +1,257 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_usability +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-11 17:22+0000\n" +"PO-Revision-Date: 2016-11-11 17:22+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: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "\"{'group_by': 'min_date:day'}\"" +msgstr "" + +#. module: stock_usability +#: view:stock.move:stock_usability.view_move_form +#: view:stock.move:stock_usability.view_move_picking_form +msgid "Advanced Parameters" +msgstr "" + +#. module: stock_usability +#: sql_constraint:stock.warehouse.orderpoint:0 +msgid "An orderpoint already exists for the same company, same warehouse, same stock location and same product." +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,company_id:0 +msgid "Company" +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,create_date:0 +msgid "Created on" +msgstr "" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Date Done" +msgstr "" + +#. module: stock_usability +#: help:stock.quant,uom_id:0 +msgid "Default Unit of Measure used for all stock operation." +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,display_name:0 +msgid "Display Name" +msgstr "" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Expected Date" +msgstr "" + +#. module: stock_usability +#: view:stock.location:stock_usability.view_location_search +msgid "Group By" +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,id:0 +msgid "ID" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_incoterms +msgid "Incoterms" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_inventory +msgid "Inventory" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_location +msgid "Inventory Locations" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_location_route +msgid "Inventory Routes" +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,__last_update:0 +msgid "Last Modified on" +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: stock_usability +#: view:stock.location:stock_usability.view_location_search +msgid "Location Type" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_procurement_scheduler_log +msgid "Logs of the Procurement Scheduler" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_warehouse_orderpoint +msgid "Minimum Inventory Rule" +msgstr "" + +#. module: stock_usability +#: view:stock.move:stock_usability.view_move_form +#: view:stock.move:stock_usability.view_move_picking_form +msgid "Notes" +msgstr "" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Origin" +msgstr "" + +#. module: stock_usability +#: view:stock.picking:stock_usability.view_picking_internal_search +msgid "Partner" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_picking +msgid "Picking List" +msgstr "" + +#. module: stock_usability +#: view:stock.warehouse:stock_usability.view_warehouse +msgid "Picking Types" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_procurement_order +msgid "Procurement" +msgstr "" + +#. module: stock_usability +#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree +msgid "Procurement Scheduler Logs" +msgstr "" + +#. module: stock_usability +#: model:ir.actions.act_window,name:stock_usability.stock_location_path_action +#: model:ir.ui.menu,name:stock_usability.stock_location_path_menu +msgid "Push Rules" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_quant +msgid "Quants" +msgstr "" + +#. module: stock_usability +#: field:stock.location,quant_ids:0 +msgid "Related Quants" +msgstr "" + +#. module: stock_usability +#: view:stock.warehouse:stock_usability.view_warehouse +msgid "Routes" +msgstr "" + +#. module: stock_usability +#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree +msgid "Scheduler End Time" +msgstr "" + +#. module: stock_usability +#: view:procurement.scheduler.log:stock_usability.procurement_scheduler_log_tree +msgid "Scheduler Executed by" +msgstr "" + +#. module: stock_usability +#: model:ir.actions.act_window,name:stock_usability.procurement_scheduler_log_action +#: model:ir.ui.menu,name:stock_usability.procurement_scheduler_log_menu +msgid "Scheduler Logs" +msgstr "" + +#. module: stock_usability +#: field:procurement.scheduler.log,start_datetime:0 +msgid "Start Date" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_move +msgid "Stock Move" +msgstr "" + +#. module: stock_usability +#: view:procurement.order:stock_usability.view_procurement_form_stock_inherit +msgid "Stock Moves" +msgstr "" + +#. module: stock_usability +#: field:stock.move,product_code:0 +msgid "Supplier Code" +msgstr "" + +#. module: stock_usability +#: help:stock.move,product_code:0 +msgid "Supplier product code if exist else product Internal Reference if exist" +msgstr "" + +#. module: stock_usability +#: model:ir.model,name:stock_usability.model_stock_picking_type +msgid "The picking type determines the picking view" +msgstr "" + +#. module: stock_usability +#: view:stock.transfer_details:stock_usability.view_stock_enter_transfer_details +msgid "Total" +msgstr "" + +#. module: stock_usability +#: view:stock.quant:stock_usability.view_stock_quant_tree +msgid "Total Qty" +msgstr "" + +#. module: stock_usability +#: view:stock.picking:stock_usability.stock_picking_graph +msgid "Transfers" +msgstr "" + +#. module: stock_usability +#: field:stock.quant,uom_id:0 +msgid "Unit of Measure" +msgstr "" + +#. module: stock_usability +#: view:stock.move:stock_usability.view_move_form +#: view:stock.move:stock_usability.view_move_picking_tree +msgid "Unreserve" +msgstr "" + diff --git a/stock_usability/stock.py b/stock_usability/stock.py index 24dd1b0..12d5da3 100644 --- a/stock_usability/stock.py +++ b/stock_usability/stock.py @@ -77,6 +77,12 @@ class StockWarehouseOrderpoint(models.Model): class StockMove(models.Model): _inherit = 'stock.move' + product_code = fields.Char( + string='Supplier Code', compute='_compute_product_code', + store=True, readonly=True, + help="Supplier product code if exist else product " + "Internal Reference if exist") + # It seems that it is not necessary any more to # have the digits= on these 2 fields to fix the bug # https://github.com/odoo/odoo/pull/10038 @@ -85,6 +91,14 @@ class StockMove(models.Model): # availability = fields.Float( # digits=dp.get_precision('Product Unit of Measure')) + @api.multi + @api.depends('product_id', 'picking_id.partner_id') + def _compute_product_code(self): + for rec in self: + if rec.picking_id.partner_id and rec.product_id: + rec.product_code = rec.with_context( + partner_id=rec.picking_id.partner_id.id).product_id.code + def name_get(self, cr, uid, ids, context=None): '''name_get of stock_move is important for the reservation of the quants: so want to add the name of the customer and the expected date diff --git a/stock_usability/stock_view.xml b/stock_usability/stock_view.xml index 1dda15b..4ca021d 100644 --- a/stock_usability/stock_view.xml +++ b/stock_usability/stock_view.xml @@ -161,6 +161,9 @@ icon="STOCK_UNDO" groups="stock.group_stock_user" states="confirmed,assigned"/> + + +