From a9d7453e42c3a7dd328dbe2f661d2d8303607e08 Mon Sep 17 00:00:00 2001 From: Sergio Teruel Date: Wed, 6 Nov 2019 17:18:01 +0100 Subject: [PATCH] [IMP] stock_inventory_exclude_sublocation: No create new user for tests, only assign rights to demo user --- .../tests/test_exclude_sublocation.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/stock_inventory_exclude_sublocation/tests/test_exclude_sublocation.py b/stock_inventory_exclude_sublocation/tests/test_exclude_sublocation.py index 3c20eefad..db37ee53e 100644 --- a/stock_inventory_exclude_sublocation/tests/test_exclude_sublocation.py +++ b/stock_inventory_exclude_sublocation/tests/test_exclude_sublocation.py @@ -23,12 +23,8 @@ class TestStockInventoryExcludeSublocation(TransactionCase): self.grp_production_lot = self.env.ref('stock.group_production_lot') self.grp_tracking_lot = self.env.ref('stock.group_tracking_lot') - self.user = self.res_users_model.create({ - 'name': 'Test Account User', - 'login': 'user_1', - 'password': 'demo', - 'email': 'example@yourcompany.com', - 'company_id': self.company.id, + self.user = self.env.ref('base.user_demo') + self.user.write({ 'company_ids': [(4, self.company.id)], 'groups_id': [(6, 0, [ self.grp_stock_manager.id,