From 396b17e48eb9e1890cb7eddccde9ae4e66d88548 Mon Sep 17 00:00:00 2001
From: mreficent
Date: Thu, 27 Jun 2019 14:11:17 +0200
Subject: [PATCH] [MIG] stock_removal_location_by_priority: Migration to 12.0
---
stock_removal_location_by_priority/README.rst | 10 +++++-----
stock_removal_location_by_priority/__init__.py | 2 ++
stock_removal_location_by_priority/__manifest__.py | 4 ++--
stock_removal_location_by_priority/models/__init__.py | 2 ++
.../models/stock_quant.py | 2 +-
.../security/stock_security.xml | 6 +++++-
.../static/description/index.html | 6 +++---
stock_removal_location_by_priority/tests/__init__.py | 2 ++
.../tests/test_stock_removal_location_by_priority.py | 1 -
.../views/res_config_settings_views.xml | 2 +-
10 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/stock_removal_location_by_priority/README.rst b/stock_removal_location_by_priority/README.rst
index eec6b6b8f..ad12e3b1e 100644
--- a/stock_removal_location_by_priority/README.rst
+++ b/stock_removal_location_by_priority/README.rst
@@ -14,13 +14,13 @@ Stock Removal Location by Priority
: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/11.0/stock_removal_location_by_priority
+ :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_removal_location_by_priority
: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-11-0/stock-logistics-warehouse-11-0-stock_removal_location_by_priority
+ :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_removal_location_by_priority
: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/11.0
+ :target: https://runbot.odoo-community.org/runbot/153/12.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -65,7 +65,7 @@ Bug Tracker
Bugs are tracked on `GitHub 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 `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -96,6 +96,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 `_ project on GitHub.
+This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/stock_removal_location_by_priority/__init__.py b/stock_removal_location_by_priority/__init__.py
index cd4bd41dd..a2aff3e43 100644
--- a/stock_removal_location_by_priority/__init__.py
+++ b/stock_removal_location_by_priority/__init__.py
@@ -1,2 +1,4 @@
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
from . import models
from .init_hook import pre_init_hook
diff --git a/stock_removal_location_by_priority/__manifest__.py b/stock_removal_location_by_priority/__manifest__.py
index 6eab05cee..2b296c48e 100644
--- a/stock_removal_location_by_priority/__manifest__.py
+++ b/stock_removal_location_by_priority/__manifest__.py
@@ -4,11 +4,11 @@
{
"name": "Stock Removal Location by Priority",
"summary": "Establish a removal priority on stock locations.",
- "version": "11.0.1.0.0",
+ "version": "12.0.1.0.0",
"author": "Eficent, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
- "category": "Warehouse Management",
+ "category": "Warehouse",
"depends": ["stock"],
"data": [
'security/stock_security.xml',
diff --git a/stock_removal_location_by_priority/models/__init__.py b/stock_removal_location_by_priority/models/__init__.py
index 81e02630a..fad922206 100644
--- a/stock_removal_location_by_priority/models/__init__.py
+++ b/stock_removal_location_by_priority/models/__init__.py
@@ -1,3 +1,5 @@
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
from . import res_config_settings
from . import stock_location
from . import stock_quant
diff --git a/stock_removal_location_by_priority/models/stock_quant.py b/stock_removal_location_by_priority/models/stock_quant.py
index 6eb768821..a0b50e5dc 100644
--- a/stock_removal_location_by_priority/models/stock_quant.py
+++ b/stock_removal_location_by_priority/models/stock_quant.py
@@ -11,7 +11,7 @@ class StockQuant(models.Model):
removal_priority = fields.Integer(
related='location_id.removal_priority',
- readonly=True, store=True,
+ store=True,
)
@api.model
diff --git a/stock_removal_location_by_priority/security/stock_security.xml b/stock_removal_location_by_priority/security/stock_security.xml
index 230cc962b..7a49c05e5 100644
--- a/stock_removal_location_by_priority/security/stock_security.xml
+++ b/stock_removal_location_by_priority/security/stock_security.xml
@@ -1,4 +1,8 @@
-
+
+
+
+
Removal Priority
diff --git a/stock_removal_location_by_priority/static/description/index.html b/stock_removal_location_by_priority/static/description/index.html
index 0b750ba04..038b6fbec 100644
--- a/stock_removal_location_by_priority/static/description/index.html
+++ b/stock_removal_location_by_priority/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-

+

This module adds a removal priority field on stock locations.
This priority applies when removing a product from different stock locations
and the incoming dates are equal in both locations.
@@ -415,7 +415,7 @@ use FIFO or LIFO removal strategy.
Bugs are tracked on GitHub 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.
+feedback.
Do not contact contributors directly about support or help with technical issues.
@@ -440,7 +440,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
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 project on GitHub.
+
This module is part of the OCA/stock-logistics-warehouse project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/stock_removal_location_by_priority/tests/__init__.py b/stock_removal_location_by_priority/tests/__init__.py
index 57ed6d147..fec5b5e00 100644
--- a/stock_removal_location_by_priority/tests/__init__.py
+++ b/stock_removal_location_by_priority/tests/__init__.py
@@ -1 +1,3 @@
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
+
from . import test_stock_removal_location_by_priority
diff --git a/stock_removal_location_by_priority/tests/test_stock_removal_location_by_priority.py b/stock_removal_location_by_priority/tests/test_stock_removal_location_by_priority.py
index 037efd0be..b89214855 100644
--- a/stock_removal_location_by_priority/tests/test_stock_removal_location_by_priority.py
+++ b/stock_removal_location_by_priority/tests/test_stock_removal_location_by_priority.py
@@ -3,7 +3,6 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from datetime import date
-
from odoo.tests.common import TransactionCase
diff --git a/stock_removal_location_by_priority/views/res_config_settings_views.xml b/stock_removal_location_by_priority/views/res_config_settings_views.xml
index d40cd25e0..8e721744a 100644
--- a/stock_removal_location_by_priority/views/res_config_settings_views.xml
+++ b/stock_removal_location_by_priority/views/res_config_settings_views.xml
@@ -9,7 +9,7 @@
-