[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
This commit is contained in:
Hetashree Chauhan
2019-07-11 13:12:09 +00:00
parent 9bf453acb8
commit 49fb56a8d3
2 changed files with 7 additions and 1 deletions
+7
View File
@@ -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')
@@ -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')