[IMP] stock_inventory_exclude_sublocation: No create new user for tests, only assign rights to demo user

This commit is contained in:
Sergio Teruel
2019-11-06 17:18:01 +01:00
committed by joan
parent 12a1e56bfd
commit 8baf2b0ac3

View File

@@ -23,12 +23,8 @@ class TestStockInventoryExcludeSublocation(TransactionCase):
self.grp_production_lot = self.env.ref('stock.group_production_lot') self.grp_production_lot = self.env.ref('stock.group_production_lot')
self.grp_tracking_lot = self.env.ref('stock.group_tracking_lot') self.grp_tracking_lot = self.env.ref('stock.group_tracking_lot')
self.user = self.res_users_model.create({ self.user = self.env.ref('base.user_demo')
'name': 'Test Account User', self.user.write({
'login': 'user_1',
'password': 'demo',
'email': 'example@yourcompany.com',
'company_id': self.company.id,
'company_ids': [(4, self.company.id)], 'company_ids': [(4, self.company.id)],
'groups_id': [(6, 0, [ 'groups_id': [(6, 0, [
self.grp_stock_manager.id, self.grp_stock_manager.id,