From 092cd9da36235897ec1eef891b6ec6f6d27e83fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hedguhar=20Dom=C3=ADnguez?= Date: Wed, 3 May 2023 13:58:05 -0600 Subject: [PATCH] [MIG] stock_quantity_history_location: Migration to 16.0 --- stock_quantity_history_location/__manifest__.py | 5 ++++- .../tests/test_stock_quantity_history_location.py | 4 ++-- .../wizards/stock_quantity_history.py | 3 --- .../wizards/stock_quantity_history.xml | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/stock_quantity_history_location/__manifest__.py b/stock_quantity_history_location/__manifest__.py index 61b82fa..ad34d79 100644 --- a/stock_quantity_history_location/__manifest__.py +++ b/stock_quantity_history_location/__manifest__.py @@ -5,9 +5,12 @@ { "name": "Stock Quantity History Location", "summary": "Provides stock quantity by location on past date", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", + "maintainers": [ + "luisg123v", + ], "website": "https://github.com/OCA/stock-logistics-reporting", "depends": ["stock"], "data": ["wizards/stock_quantity_history.xml"], diff --git a/stock_quantity_history_location/tests/test_stock_quantity_history_location.py b/stock_quantity_history_location/tests/test_stock_quantity_history_location.py index ef5cf6e..dae4733 100644 --- a/stock_quantity_history_location/tests/test_stock_quantity_history_location.py +++ b/stock_quantity_history_location/tests/test_stock_quantity_history_location.py @@ -31,7 +31,7 @@ class TestStockQuantityHistoryLocation(TestCommon): ) cls._create_stock_move(cls, location_dest_id=cls.child_test_stock_loc, qty=100) - def test_wizard_past_date(self): + def test_01_wizard_past_date(self): wizard = self.env["stock.quantity.history"].create( { "location_id": self.test_stock_loc.id, @@ -50,7 +50,7 @@ class TestStockQuantityHistoryLocation(TestCommon): 0.0, ) - def test_wizard_current(self): + def test_02_wizard_current(self): wizard = self.env["stock.quantity.history"].create( {"location_id": self.test_stock_loc.id, "include_child_locations": False} ) diff --git a/stock_quantity_history_location/wizards/stock_quantity_history.py b/stock_quantity_history_location/wizards/stock_quantity_history.py index b5e7b00..eb6cae8 100644 --- a/stock_quantity_history_location/wizards/stock_quantity_history.py +++ b/stock_quantity_history_location/wizards/stock_quantity_history.py @@ -2,7 +2,6 @@ # Copyright 2019 Aleph Objects, Inc. # Copyright 2021 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import ast from odoo import fields, models @@ -18,8 +17,6 @@ class StockQuantityHistory(models.TransientModel): def open_at_date(self): action = super().open_at_date() ctx = action["context"] - if isinstance(ctx, str): - ctx = ast.literal_eval(ctx) if self.location_id: ctx["location"] = self.location_id.id ctx["compute_child"] = self.include_child_locations diff --git a/stock_quantity_history_location/wizards/stock_quantity_history.xml b/stock_quantity_history_location/wizards/stock_quantity_history.xml index bd653a6..b34f001 100644 --- a/stock_quantity_history_location/wizards/stock_quantity_history.xml +++ b/stock_quantity_history_location/wizards/stock_quantity_history.xml @@ -11,6 +11,7 @@