From fe6a3a36d665552eda097cda9f67c55e41760740 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 29 Nov 2018 12:59:23 +0100 Subject: [PATCH] [IMP] stock_picking_report_valued: Make tests more resilient In certain conditions of the DB (i.e. integration tests), previous code doesn't assure the price is going to be 100. --- .../tests/test_stock_picking_valued.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stock_picking_report_valued/tests/test_stock_picking_valued.py b/stock_picking_report_valued/tests/test_stock_picking_valued.py index 77670cd..190ec40 100644 --- a/stock_picking_report_valued/tests/test_stock_picking_valued.py +++ b/stock_picking_report_valued/tests/test_stock_picking_valued.py @@ -26,7 +26,11 @@ class TestStockPickingValued(common.SavepointCase): }) cls.sale_order = cls.env['sale.order'].create({ 'partner_id': cls.partner.id, - 'order_line': [(0, 0, {'product_id': cls.product.id})], + 'order_line': [(0, 0, { + 'product_id': cls.product.id, + 'price_unit': 100, + 'product_uom_qty': 1, + })], 'company_id': cls.env.user.company_id.id, }) cls.sale_order.company_id.tax_calculation_rounding_method = (