From 4bfde23509ff006aea336c99ab91f4539e620fc3 Mon Sep 17 00:00:00 2001 From: Bruno Zanotti Date: Fri, 17 May 2024 12:32:22 -0300 Subject: [PATCH] [MIG] sale_stock_product_pack: Migration to 17.0 --- sale_stock_product_pack/__manifest__.py | 2 +- .../tests/test_sale_stock_product_pack.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sale_stock_product_pack/__manifest__.py b/sale_stock_product_pack/__manifest__.py index 25ebdf43..79b05fb9 100644 --- a/sale_stock_product_pack/__manifest__.py +++ b/sale_stock_product_pack/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Sale Stock Product Pack", "summary": "Compatibility module for packs that are storable products", - "version": "16.0.1.0.0", + "version": "17.0.1.0.0", "development_status": "Beta", "category": "Sale", "website": "https://github.com/OCA/product-pack", diff --git a/sale_stock_product_pack/tests/test_sale_stock_product_pack.py b/sale_stock_product_pack/tests/test_sale_stock_product_pack.py index 886cb4e1..bab5a400 100644 --- a/sale_stock_product_pack/tests/test_sale_stock_product_pack.py +++ b/sale_stock_product_pack/tests/test_sale_stock_product_pack.py @@ -1,9 +1,9 @@ # Copyright 2021 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo.tests import Form, common +from odoo.tests import Form, TransactionCase -class TestSaleStockProductPack(common.SavepointCase): +class TestSaleStockProductPack(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() @@ -30,7 +30,8 @@ def test_delivered_quantities(self): for line in self.sale.picking_ids.move_ids.filtered( lambda x: x.product_id != self.product_pack ): - line.quantity_done = line.product_uom_qty + line.quantity = line.product_uom_qty + self.sale.picking_ids.move_ids.picked = True self.sale.picking_ids._action_done() # All components delivered, all the pack quantities should be so # TODO: it needs to compute twice. In view it does it fine.