FIX store field product_code in stock.move

This commit is contained in:
David Beal
2016-11-11 18:31:56 +01:00
parent 6176b37fa6
commit 08f434b6a0
4 changed files with 39 additions and 38 deletions

View File

@@ -24,7 +24,7 @@ msgstr "\"{'group_by': 'min_date:day'}\""
#: view:stock.move:stock_usability.view_move_form #: view:stock.move:stock_usability.view_move_form
#: view:stock.move:stock_usability.view_move_picking_form #: view:stock.move:stock_usability.view_move_picking_form
msgid "Advanced Parameters" msgid "Advanced Parameters"
msgstr "Advanced Parameters" msgstr "Paramètres Avancées"
#. module: stock_usability #. module: stock_usability
#: sql_constraint:stock.warehouse.orderpoint:0 #: sql_constraint:stock.warehouse.orderpoint:0
@@ -34,22 +34,22 @@ msgstr "An orderpoint already exists for the same company, same warehouse, same
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,company_id:0 #: field:procurement.scheduler.log,company_id:0
msgid "Company" msgid "Company"
msgstr "Company" msgstr "Société"
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,create_uid:0 #: field:procurement.scheduler.log,create_uid:0
msgid "Created by" msgid "Created by"
msgstr "Created by" msgstr "Créé par"
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,create_date:0 #: field:procurement.scheduler.log,create_date:0
msgid "Created on" msgid "Created on"
msgstr "Created on" msgstr "Créé le"
#. module: stock_usability #. module: stock_usability
#: view:stock.picking:stock_usability.view_picking_internal_search #: view:stock.picking:stock_usability.view_picking_internal_search
msgid "Date Done" msgid "Date Done"
msgstr "Date Done" msgstr "Date Terminé"
#. module: stock_usability #. module: stock_usability
#: help:stock.quant,uom_id:0 #: help:stock.quant,uom_id:0
@@ -59,7 +59,7 @@ msgstr "Default Unit of Measure used for all stock operation."
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,display_name:0 #: field:procurement.scheduler.log,display_name:0
msgid "Display Name" msgid "Display Name"
msgstr "Display Name" msgstr "Nom Affiché"
#. module: stock_usability #. module: stock_usability
#: view:stock.picking:stock_usability.view_picking_internal_search #: view:stock.picking:stock_usability.view_picking_internal_search
@@ -69,7 +69,7 @@ msgstr "Date prévue"
#. module: stock_usability #. module: stock_usability
#: view:stock.location:stock_usability.view_location_search #: view:stock.location:stock_usability.view_location_search
msgid "Group By" msgid "Group By"
msgstr "Group By" msgstr "Groupé par"
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,id:0 #: field:procurement.scheduler.log,id:0
@@ -99,22 +99,22 @@ msgstr "Routes logistiques"
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,__last_update:0 #: field:procurement.scheduler.log,__last_update:0
msgid "Last Modified on" msgid "Last Modified on"
msgstr "Last Modified on" msgstr "Modifié le"
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,write_uid:0 #: field:procurement.scheduler.log,write_uid:0
msgid "Last Updated by" msgid "Last Updated by"
msgstr "Last Updated by" msgstr "Mis à jour par"
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,write_date:0 #: field:procurement.scheduler.log,write_date:0
msgid "Last Updated on" msgid "Last Updated on"
msgstr "Last Updated on" msgstr "Modifié le"
#. module: stock_usability #. module: stock_usability
#: view:stock.location:stock_usability.view_location_search #: view:stock.location:stock_usability.view_location_search
msgid "Location Type" msgid "Location Type"
msgstr "Location Type" msgstr "Type d'Emplacement"
#. module: stock_usability #. module: stock_usability
#: model:ir.model,name:stock_usability.model_procurement_scheduler_log #: model:ir.model,name:stock_usability.model_procurement_scheduler_log
@@ -140,7 +140,7 @@ msgstr "Origine"
#. module: stock_usability #. module: stock_usability
#: view:stock.picking:stock_usability.view_picking_internal_search #: view:stock.picking:stock_usability.view_picking_internal_search
msgid "Partner" msgid "Partner"
msgstr "Partner" msgstr "Partenaire"
#. module: stock_usability #. module: stock_usability
#: model:ir.model,name:stock_usability.model_stock_picking #: model:ir.model,name:stock_usability.model_stock_picking
@@ -162,11 +162,6 @@ msgstr "Approvisionnement"
msgid "Procurement Scheduler Logs" msgid "Procurement Scheduler Logs"
msgstr "Procurement Scheduler Logs" msgstr "Procurement Scheduler Logs"
#. module: stock_usability
#: field:stock.move,product_supplier_code:0
msgid "Product Code"
msgstr "Code Produit"
#. module: stock_usability #. module: stock_usability
#: model:ir.actions.act_window,name:stock_usability.stock_location_path_action #: model:ir.actions.act_window,name:stock_usability.stock_location_path_action
#: model:ir.ui.menu,name:stock_usability.stock_location_path_menu #: model:ir.ui.menu,name:stock_usability.stock_location_path_menu
@@ -207,7 +202,7 @@ msgstr "Scheduler Logs"
#. module: stock_usability #. module: stock_usability
#: field:procurement.scheduler.log,start_datetime:0 #: field:procurement.scheduler.log,start_datetime:0
msgid "Start Date" msgid "Start Date"
msgstr "Start Date" msgstr "Date de Début"
#. module: stock_usability #. module: stock_usability
#: model:ir.model,name:stock_usability.model_stock_move #: model:ir.model,name:stock_usability.model_stock_move
@@ -217,12 +212,17 @@ msgstr "Mouvement de stock"
#. module: stock_usability #. module: stock_usability
#: view:procurement.order:stock_usability.view_procurement_form_stock_inherit #: view:procurement.order:stock_usability.view_procurement_form_stock_inherit
msgid "Stock Moves" msgid "Stock Moves"
msgstr "Stock Moves" msgstr "Mouvements de stock"
#. module: stock_usability #. module: stock_usability
#: help:stock.move,product_supplier_code:0 #: 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" msgid "Supplier product code if exist else product Internal Reference if exist"
msgstr "Code produit fournisseur si existant sinon Référence Interne du produit si existant" msgstr "Code article fournisseur si existant sinon référence interne de l'article si existant"
#. module: stock_usability #. module: stock_usability
#: model:ir.model,name:stock_usability.model_stock_picking_type #: model:ir.model,name:stock_usability.model_stock_picking_type
@@ -237,21 +237,21 @@ msgstr "Total"
#. module: stock_usability #. module: stock_usability
#: view:stock.quant:stock_usability.view_stock_quant_tree #: view:stock.quant:stock_usability.view_stock_quant_tree
msgid "Total Qty" msgid "Total Qty"
msgstr "Total Qty" msgstr "Qté Total"
#. module: stock_usability #. module: stock_usability
#: view:stock.picking:stock_usability.stock_picking_graph #: view:stock.picking:stock_usability.stock_picking_graph
msgid "Transfers" msgid "Transfers"
msgstr "Transfers" msgstr "Transferts"
#. module: stock_usability #. module: stock_usability
#: field:stock.quant,uom_id:0 #: field:stock.quant,uom_id:0
msgid "Unit of Measure" msgid "Unit of Measure"
msgstr "Unit of Measure" msgstr "Unité de Mesure"
#. module: stock_usability #. module: stock_usability
#: view:stock.move:stock_usability.view_move_form #: view:stock.move:stock_usability.view_move_form
#: view:stock.move:stock_usability.view_move_picking_tree #: view:stock.move:stock_usability.view_move_picking_tree
msgid "Unreserve" msgid "Unreserve"
msgstr "Unreserve" msgstr "Déréserver"

View File

@@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n" "Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-10 13:46+0000\n" "POT-Creation-Date: 2016-11-11 17:22+0000\n"
"PO-Revision-Date: 2016-11-10 13:46+0000\n" "PO-Revision-Date: 2016-11-11 17:22+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@@ -162,11 +162,6 @@ msgstr ""
msgid "Procurement Scheduler Logs" msgid "Procurement Scheduler Logs"
msgstr "" msgstr ""
#. module: stock_usability
#: field:stock.move,product_supplier_code:0
msgid "Product Code"
msgstr ""
#. module: stock_usability #. module: stock_usability
#: model:ir.actions.act_window,name:stock_usability.stock_location_path_action #: model:ir.actions.act_window,name:stock_usability.stock_location_path_action
#: model:ir.ui.menu,name:stock_usability.stock_location_path_menu #: model:ir.ui.menu,name:stock_usability.stock_location_path_menu
@@ -220,7 +215,12 @@ msgid "Stock Moves"
msgstr "" msgstr ""
#. module: stock_usability #. module: stock_usability
#: help:stock.move,product_supplier_code:0 #: 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" msgid "Supplier product code if exist else product Internal Reference if exist"
msgstr "" msgstr ""

View File

@@ -77,8 +77,9 @@ class StockWarehouseOrderpoint(models.Model):
class StockMove(models.Model): class StockMove(models.Model):
_inherit = 'stock.move' _inherit = 'stock.move'
product_supplier_code = fields.Char( product_code = fields.Char(
string='Product Code', compute='_compute_product_supplier_code', string='Supplier Code', compute='_compute_product_code',
store=True, readonly=True,
help="Supplier product code if exist else product " help="Supplier product code if exist else product "
"Internal Reference if exist") "Internal Reference if exist")
@@ -92,10 +93,10 @@ class StockMove(models.Model):
@api.multi @api.multi
@api.depends('product_id', 'picking_id.partner_id') @api.depends('product_id', 'picking_id.partner_id')
def _compute_product_supplier_code(self): def _compute_product_code(self):
for rec in self: for rec in self:
if rec.picking_id.partner_id and rec.product_id: if rec.picking_id.partner_id and rec.product_id:
rec.product_supplier_code = rec.with_context( rec.product_code = rec.with_context(
partner_id=rec.picking_id.partner_id.id).product_id.code partner_id=rec.picking_id.partner_id.id).product_id.code
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):

View File

@@ -162,7 +162,7 @@
states="confirmed,assigned"/> states="confirmed,assigned"/>
</field> </field>
<field name="product_id" position="after"> <field name="product_id" position="after">
<field name="product_supplier_code"/> <field name="product_code"/>
</field> </field>
</field> </field>
</record> </record>