From 49fb56a8d39cb745c8d9fc59958562e55b685b35 Mon Sep 17 00:00:00 2001 From: Hetashree Chauhan Date: Mon, 8 Jul 2019 10:07:37 +0000 Subject: [PATCH] [IMP] stock: pass tests without demo data for file test_inventory. pass all test cases without any demo data. If a user has not installed any demo data, then also test cases must not be break. task-2024202 closes : https://github.com/odoo/odoo/pull/34258 --- addons/stock/tests/test_inventory.py | 7 +++++++ addons/stock/tests/test_quant_inventory_mode.py | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/stock/tests/test_inventory.py b/addons/stock/tests/test_inventory.py index f06e9f033ef..f93e388f09b 100644 --- a/addons/stock/tests/test_inventory.py +++ b/addons/stock/tests/test_inventory.py @@ -315,6 +315,13 @@ class TestInventory(SavepointCase): """ Check inventory lines product quantity is 0 when inventory is started with `prefill_counted_quantity` disable. """ + self.env['stock.quant'].create({ + 'product_id': self.product1.id, + 'product_uom_id': self.uom_unit.id, + 'location_id': self.stock_location.id, + 'quantity': 7, + 'reserved_quantity': 0, + }) inventory_form = Form(self.env['stock.inventory'].with_context( default_prefill_counted_quantity=False, ), view='stock.view_inventory_form') diff --git a/addons/stock/tests/test_quant_inventory_mode.py b/addons/stock/tests/test_quant_inventory_mode.py index 3cca7ba49e0..a189499a967 100644 --- a/addons/stock/tests/test_quant_inventory_mode.py +++ b/addons/stock/tests/test_quant_inventory_mode.py @@ -201,7 +201,6 @@ class TestEditableQuant(SavepointCase): 'name': 'Pauline Poivraisselle', 'login': 'pauline', 'email': 'p.p@example.com', - 'notification_type': 'inbox', 'groups_id': [(6, 0, [self.env.ref('base.group_user').id])] }) user_admin = self.env.ref('base.user_admin')