From 7b80aba6b0276195a246f86092e09bfcc5b6c2f3 Mon Sep 17 00:00:00 2001 From: hveficent Date: Mon, 30 Dec 2019 11:11:10 +0100 Subject: [PATCH] [MIG] stock_inventory_exclude_sublocation: Migration to 13.0 --- .../README.rst | 13 ++- .../__manifest__.py | 9 +- .../models/stock_inventory.py | 5 +- .../readme/CONTRIBUTORS.rst | 3 +- .../static/description/index.html | 11 +- .../tests/test_exclude_sublocation.py | 110 +----------------- .../views/stock_inventory_view.xml | 4 +- 7 files changed, 26 insertions(+), 129 deletions(-) diff --git a/stock_inventory_exclude_sublocation/README.rst b/stock_inventory_exclude_sublocation/README.rst index d2798da02..e5e27393c 100644 --- a/stock_inventory_exclude_sublocation/README.rst +++ b/stock_inventory_exclude_sublocation/README.rst @@ -14,13 +14,13 @@ Stock Inventory Exclude Sublocation :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/12.0/stock_inventory_exclude_sublocation + :target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_inventory_exclude_sublocation :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-12-0/stock-logistics-warehouse-12-0-stock_inventory_exclude_sublocation + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_inventory_exclude_sublocation :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/12.0 + :target: https://runbot.odoo-community.org/runbot/153/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -55,7 +55,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. @@ -71,8 +71,9 @@ Authors Contributors ~~~~~~~~~~~~ -* Lois Rilo Antelo +* Lois Rilo Antelo * Bhavesh Odedra +* Héctor Villarreal Maintainers ~~~~~~~~~~~ @@ -87,6 +88,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_inventory_exclude_sublocation/__manifest__.py b/stock_inventory_exclude_sublocation/__manifest__.py index 9afd2ff11..5490a3b12 100644 --- a/stock_inventory_exclude_sublocation/__manifest__.py +++ b/stock_inventory_exclude_sublocation/__manifest__.py @@ -1,16 +1,15 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# (http://www.eficent.com) +# Copyright 2017-2019 ForgeFlow S.L. (http://www.forgeflow.com) # Copyright 2019 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Stock Inventory Exclude Sublocation", "summary": "Allow to perform inventories of a location without including " "its child locations.", - "version": "12.0.1.0.1", + "version": "13.0.1.0.1", "development_status": "Mature", - "author": "Eficent, " "Tecnativa, " "Odoo Community Association (OCA)", + "author": "ForgeFlow, Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/stock-logistics-warehouse", - "category": "Warehouse Management", + "category": "Warehouse", "depends": ["stock"], "data": ["views/stock_inventory_view.xml"], "license": "AGPL-3", diff --git a/stock_inventory_exclude_sublocation/models/stock_inventory.py b/stock_inventory_exclude_sublocation/models/stock_inventory.py index 94200c838..708637769 100644 --- a/stock_inventory_exclude_sublocation/models/stock_inventory.py +++ b/stock_inventory_exclude_sublocation/models/stock_inventory.py @@ -1,5 +1,4 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# (http://www.eficent.com) +# Copyright 2019 ForgeFlow S.L. (http://www.forgeflow.com) # Copyright 2019 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). @@ -28,6 +27,6 @@ class Inventory(models.Model): return vals new_vals = [] for val in vals: - if val["location_id"] == self.location_id.id: + if val["location_id"] in self.location_ids.ids: new_vals.append(val) return new_vals diff --git a/stock_inventory_exclude_sublocation/readme/CONTRIBUTORS.rst b/stock_inventory_exclude_sublocation/readme/CONTRIBUTORS.rst index 77f4ab6c8..e3a64aee6 100644 --- a/stock_inventory_exclude_sublocation/readme/CONTRIBUTORS.rst +++ b/stock_inventory_exclude_sublocation/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ -* Lois Rilo Antelo +* Lois Rilo Antelo * Bhavesh Odedra +* Héctor Villarreal diff --git a/stock_inventory_exclude_sublocation/static/description/index.html b/stock_inventory_exclude_sublocation/static/description/index.html index 4799dbfb2..f9d5ff9ca 100644 --- a/stock_inventory_exclude_sublocation/static/description/index.html +++ b/stock_inventory_exclude_sublocation/static/description/index.html @@ -3,7 +3,7 @@ - + Stock Inventory Exclude Sublocation