From 092bf326103fafc8b196eb8fc6bb718c8b2f2354 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Mon, 9 Nov 2020 12:56:46 +0100 Subject: [PATCH] fixup! [MIG] : Migration to 13.0 --- stock_pull_list/__manifest__.py | 4 ++-- stock_pull_list/tests/common.py | 5 +++-- stock_pull_list/tests/test_stock_pull_list.py | 2 +- stock_pull_list/wizards/stock_pull_list_wizard.py | 8 ++------ 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/stock_pull_list/__manifest__.py b/stock_pull_list/__manifest__.py index 90698c3ed..14f8413e8 100644 --- a/stock_pull_list/__manifest__.py +++ b/stock_pull_list/__manifest__.py @@ -12,7 +12,7 @@ "maintainers": ["LoisRForgeFlow"], "development_status": "Alpha", "category": "Warehouse Management", - "depends": ["stock", "stock_available_unreserved",], - "data": ["wizards/stock_pull_list_wizard.xml",], + "depends": ["stock", "stock_available_unreserved"], + "data": ["wizards/stock_pull_list_wizard.xml"], "installable": True, } diff --git a/stock_pull_list/tests/common.py b/stock_pull_list/tests/common.py index 21f954c24..4fb2e46c1 100644 --- a/stock_pull_list/tests/common.py +++ b/stock_pull_list/tests/common.py @@ -20,10 +20,10 @@ class TestPullListCommon(TransactionCase): self.customer_loc = self.env.ref("stock.stock_location_customers") self.warehouse_2 = self.wh_obj.create( - {"code": "WH-T", "name": "Warehouse Test",} + {"code": "WH-T", "name": "Warehouse Test"} ) self.product_a = self.env["product.product"].create( - {"name": "test product A", "default_code": "TEST-A", "type": "product",} + {"name": "test product A", "default_code": "TEST-A", "type": "product"} ) route_vals = { @@ -59,6 +59,7 @@ class TestPullListCommon(TransactionCase): "picking_type_id": self.ref("stock.picking_type_out"), "location_id": self.warehouse.lot_stock_id.id, "location_dest_id": self.customer_loc.id, + "scheduled_date": date_move, "move_lines": [ ( 0, diff --git a/stock_pull_list/tests/test_stock_pull_list.py b/stock_pull_list/tests/test_stock_pull_list.py index 69a8d225a..e9bd3283e 100644 --- a/stock_pull_list/tests/test_stock_pull_list.py +++ b/stock_pull_list/tests/test_stock_pull_list.py @@ -22,7 +22,7 @@ class TestStockPullList(TestPullListCommon): def test_02_consolidate(self): self._generate_moves() - wiz = self.wiz_obj.create({"consolidate_by_product": True,}) + wiz = self.wiz_obj.create({"consolidate_by_product": True}) wiz.action_prepare() line = wiz.line_ids.filtered(lambda l: l.product_id == self.product_a) self.assertEqual(len(line), 1) diff --git a/stock_pull_list/wizards/stock_pull_list_wizard.py b/stock_pull_list/wizards/stock_pull_list_wizard.py index 427d6063a..52112d621 100644 --- a/stock_pull_list/wizards/stock_pull_list_wizard.py +++ b/stock_pull_list/wizards/stock_pull_list_wizard.py @@ -18,9 +18,7 @@ class PullListWizard(models.TransientModel): wh = self.env["stock.warehouse"].search( [("company_id", "=", company.id)], limit=1 ) - res.update( - {"warehouse_id": wh.id, "location_id": wh.lot_stock_id.id,} - ) + res.update({"warehouse_id": wh.id, "location_id": wh.lot_stock_id.id}) return res location_id = fields.Many2one(comodel_name="stock.location", required=True,) @@ -172,9 +170,7 @@ class PullListWizard(models.TransientModel): for key, demand_qty in demand_dict.items(): supply_qty = incoming_dict.get(key, 0.0) lines.append((0, 0, self._prepare_line_values(key, demand_qty, supply_qty))) - self.update( - {"line_ids": lines,} - ) + self.update({"line_ids": lines}) res = self._act_window_pull_list_step_2() return res