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 v15.0
[UPD] Update stock_putaway_product_template.pot
This commit is contained in:
committed by
Carolina Fernandez
parent
dc1daf737d
commit
760fd23e88
@@ -14,13 +14,13 @@ Product template in putaway strategies
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_putaway_product_template
|
||||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_putaway_product_template
|
||||
:alt: OCA/stock-logistics-warehouse
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_putaway_product_template
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_putaway_product_template
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/153/13.0
|
||||
:target: https://runbot.odoo-community.org/runbot/153/15.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -46,7 +46,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-warehouse/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_putaway_product_template%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_putaway_product_template%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -69,6 +69,7 @@ Contributors
|
||||
|
||||
* Sergio Teruel
|
||||
* Víctor Martínez
|
||||
* César A. Sánchez
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
@@ -94,6 +95,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-kevinkhao| |maintainer-sebastienbeau|
|
||||
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_putaway_product_template>`_ project on GitHub.
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_putaway_product_template>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -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.1.0",
|
||||
"version": "15.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"
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Project-Id-Version: Odoo Server 15.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
|
||||
@@ -7,7 +7,15 @@ from odoo import models
|
||||
class StockLocation(models.Model):
|
||||
_inherit = "stock.location"
|
||||
|
||||
def _get_putaway_strategy(self, product):
|
||||
def _get_putaway_strategy(
|
||||
self, product, quantity=0, package=None, packaging=None, additional_qty=None
|
||||
):
|
||||
return super(
|
||||
StockLocation, self.with_context(filter_putaway_rule=True)
|
||||
)._get_putaway_strategy(product)
|
||||
)._get_putaway_strategy(
|
||||
product,
|
||||
quantity=quantity,
|
||||
package=package,
|
||||
packaging=packaging,
|
||||
additional_qty=additional_qty,
|
||||
)
|
||||
|
||||
@@ -19,19 +19,28 @@ 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
|
||||
if isinstance(func, str):
|
||||
name = func
|
||||
|
||||
def func(rec):
|
||||
any(rec.mapped(name))
|
||||
|
||||
# populate cache
|
||||
self.mapped(name)
|
||||
product = func.__closure__[0].cell_contents
|
||||
if isinstance(product, str):
|
||||
return res
|
||||
if product._name != "product.product":
|
||||
return res
|
||||
return self.with_context(filter_putaway_rule=False).filtered(
|
||||
|
||||
@@ -6,3 +6,4 @@
|
||||
|
||||
* Sergio Teruel
|
||||
* Víctor Martínez
|
||||
* César A. Sánchez
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_putaway_product_template"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_putaway_product_template"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_putaway_product_template"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_putaway_product_template"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module add product template in putaway strategies from the product view to not need defined putaway strategies for all variants.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
@@ -396,7 +396,7 @@ ul.auto-toc {
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_putaway_product_template%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_putaway_product_template%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -417,6 +417,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
|
||||
<li>Sergio Teruel</li>
|
||||
<li>Víctor Martínez</li>
|
||||
<li>César A. Sánchez</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -430,7 +431,7 @@ mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
|
||||
<p><a class="reference external" href="https://github.com/kevinkhao"><img alt="kevinkhao" src="https://github.com/kevinkhao.png?size=40px" /></a> <a class="reference external" href="https://github.com/sebastienbeau"><img alt="sebastienbeau" src="https://github.com/sebastienbeau.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_putaway_product_template">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_putaway_product_template">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user