mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_putaway_product_template: Migration to 14.0
TT31847
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"name": "Product template in putaway strategies",
|
||||
"summary": "Add product template in putaway strategies from the product view",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"category": "Inventory",
|
||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||
"author": "Akretion, Odoo Community Association (OCA)",
|
||||
|
||||
57
stock_putaway_product_template/i18n/es.po
Normal file
57
stock_putaway_product_template/i18n/es.po
Normal file
@@ -0,0 +1,57 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * stock_putaway_product_template
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-11-11 09:02+0000\n"
|
||||
"PO-Revision-Date: 2021-11-11 09:02+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_putaway_product_template
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_product_template__display_name
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_stock_location__display_name
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_stock_putaway_rule__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nombre mostrado"
|
||||
|
||||
#. module: stock_putaway_product_template
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_product_template__id
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_stock_location__id
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_stock_putaway_rule__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_putaway_product_template
|
||||
#: model:ir.model,name:stock_putaway_product_template.model_stock_location
|
||||
msgid "Inventory Locations"
|
||||
msgstr "Ubicaciones de inventario"
|
||||
|
||||
#. module: stock_putaway_product_template
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_product_template____last_update
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_stock_location____last_update
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_stock_putaway_rule____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Última modificación el"
|
||||
|
||||
#. module: stock_putaway_product_template
|
||||
#: model:ir.model,name:stock_putaway_product_template.model_product_template
|
||||
msgid "Product Template"
|
||||
msgstr "Plantilla de producto"
|
||||
|
||||
#. module: stock_putaway_product_template
|
||||
#: model:ir.model.fields,field_description:stock_putaway_product_template.field_stock_putaway_rule__product_tmpl_id
|
||||
msgid "Product Tmpl"
|
||||
msgstr "Plantilla de producto"
|
||||
|
||||
#. module: stock_putaway_product_template
|
||||
#: model:ir.model,name:stock_putaway_product_template.model_stock_putaway_rule
|
||||
msgid "Putaway Rule"
|
||||
msgstr "Regla de Estrategia de Traslado"
|
||||
@@ -19,16 +19,15 @@ class StockPutawayRule(models.Model):
|
||||
@api.depends("product_id")
|
||||
def _compute_product_tmpl_id(self):
|
||||
for rec in self:
|
||||
rec.product_tmpl_id = False
|
||||
if rec.product_id:
|
||||
rec.product_tmpl_id = rec.product_id.product_tmpl_id
|
||||
else:
|
||||
params = self.env.context.get("params", {})
|
||||
if params.get("model", "") == "product.template":
|
||||
rec.product_tmpl_id = params.get("id", False)
|
||||
if params.get("model", "") == "product.template" and params.get("id"):
|
||||
rec.product_tmpl_id = params.get("id")
|
||||
|
||||
def filtered(self, func):
|
||||
res = super(StockPutawayRule, self).filtered(func)
|
||||
res = super().filtered(func)
|
||||
if res or not self.env.context.get("filter_putaway_rule"):
|
||||
return res
|
||||
product = func.__closure__[0].cell_contents
|
||||
|
||||
Reference in New Issue
Block a user