mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_reserve_rule: Migration to 14.0
This commit is contained in:
committed by
Denis Roussel
parent
1a39f8435f
commit
98c31d1f35
@@ -14,13 +14,13 @@ Stock Reservation Rules
|
||||
: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_reserve_rule
|
||||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_reserve_rule
|
||||
: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_reserve_rule
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_reserve_rule
|
||||
: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/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -145,7 +145,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_reserve_rule%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_reserve_rule%0Aversion:%2014.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.
|
||||
|
||||
@@ -175,6 +175,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_reserve_rule>`_ project on GitHub.
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_reserve_rule>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Stock Reservation Rules",
|
||||
"summary": "Configure reservation rules by location",
|
||||
"version": "13.0.1.4.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/stock-logistics-warehouse",
|
||||
"category": "Stock Management",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 13.0\n"
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@@ -76,6 +76,9 @@ msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_reserve_rule
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_move__display_name
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_picking_type__display_name
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_quant__display_name
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_reserve_rule__display_name
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_reserve_rule_removal__display_name
|
||||
msgid "Display Name"
|
||||
@@ -110,12 +113,18 @@ msgid "Funky Socks"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_reserve_rule
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_move__id
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_picking_type__id
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_quant__id
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_reserve_rule__id
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_reserve_rule_removal__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_reserve_rule
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_move____last_update
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_picking_type____last_update
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_quant____last_update
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_reserve_rule____last_update
|
||||
#: model:ir.model.fields,field_description:stock_reserve_rule.field_stock_reserve_rule_removal____last_update
|
||||
msgid "Last Modified on"
|
||||
@@ -258,3 +267,15 @@ msgstr ""
|
||||
#: model:product.template,uom_name:stock_reserve_rule.product_funky_socks_product_template
|
||||
msgid "Units"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_reserve_rule
|
||||
#: model:product.product,weight_uom_name:stock_reserve_rule.product_funky_socks
|
||||
#: model:product.template,weight_uom_name:stock_reserve_rule.product_funky_socks_product_template
|
||||
msgid "kg"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock_reserve_rule
|
||||
#: model:product.product,volume_uom_name:stock_reserve_rule.product_funky_socks
|
||||
#: model:product.template,volume_uom_name:stock_reserve_rule.product_funky_socks_product_template
|
||||
msgid "m³"
|
||||
msgstr ""
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
cr.execute(
|
||||
"""
|
||||
INSERT INTO stock_picking_type_stock_reserve_rule_rel
|
||||
(stock_reserve_rule_id, stock_picking_type_id)
|
||||
SELECT id, picking_type_id
|
||||
FROM stock_reserve_rule
|
||||
WHERE picking_type_id IS NOT NULL
|
||||
ON CONFLICT DO NOTHING;
|
||||
"""
|
||||
)
|
||||
@@ -9,5 +9,4 @@ class StockPickingType(models.Model):
|
||||
|
||||
reserve_rule_ids = fields.Many2many(
|
||||
comodel_name="stock.reserve.rule",
|
||||
inverse_name="picking_type_ids",
|
||||
)
|
||||
|
||||
@@ -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="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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_reserve_rule"><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_reserve_rule"><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="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.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/14.0/stock_reserve_rule"><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-14-0/stock-logistics-warehouse-14-0-stock_reserve_rule"><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/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module adds rules for advanced reservation / removal strategies.</p>
|
||||
<p>Rules are applied on a location and its sub-locations.</p>
|
||||
<p>A rule can exclude quants or locations based on configurable criteria,
|
||||
@@ -484,7 +484,7 @@ Bin A1 and 50 in Bin B1.</li>
|
||||
<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_reserve_rule%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_reserve_rule%0Aversion:%2014.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">
|
||||
@@ -508,7 +508,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_reserve_rule">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/14.0/stock_reserve_rule">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>
|
||||
|
||||
@@ -8,6 +8,7 @@ class TestReserveRule(common.SavepointCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
cls.partner_delta = cls.env.ref("base.res_partner_4")
|
||||
cls.wh = cls.env["stock.warehouse"].create(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user