[MIG] stock_quantity_history_location: Migration to 16.0

This commit is contained in:
Hedguhar Domínguez
2023-05-03 13:58:05 -06:00
committed by GuillemCForgeFlow
parent 337e6eae7b
commit 092cd9da36
4 changed files with 7 additions and 6 deletions

View File

@@ -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"],

View File

@@ -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}
)

View File

@@ -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

View File

@@ -11,6 +11,7 @@
<field
name="include_child_locations"
attrs="{'invisible': [('location_id', '=', False)]}"
groups="stock.group_stock_multi_locations"
/>
</field>
</field>