diff options
| author | Hetashree Chauhan <hch@odoo.com> | 2019-06-19 05:10:39 +0000 |
|---|---|---|
| committer | Hetashree Chauhan <hch@odoo.com> | 2019-07-11 13:12:09 +0000 |
| commit | 0ff7d7840dd01acfe95ee3b7c4ca05cae2bd61b8 (patch) | |
| tree | a7d5c927012807f4b0619017208117ca26e19de9 | |
| parent | 58bfeb6f3629abc502019bfd614647f2a60596f8 (diff) | |
[IMP] stock: pass tests without demo data for file test_move2.
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
| -rw-r--r-- | addons/stock/tests/test_move2.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/stock/tests/test_move2.py b/addons/stock/tests/test_move2.py index 93d73faa16f..d0dcae56666 100644 --- a/addons/stock/tests/test_move2.py +++ b/addons/stock/tests/test_move2.py @@ -1892,6 +1892,7 @@ class TestRoutes(TestStockCommon): 'categ_id': self.env.ref('product.product_category_all').id, }) self.uom_unit = self.env.ref('uom.product_uom_unit') + self.partner = self.env['res.partner'].create({'name': 'Partner'}) def _enable_pick_ship(self): self.wh = self.env['stock.warehouse'].search([('company_id', '=', self.env.user.id)], limit=1) @@ -2040,7 +2041,7 @@ class TestRoutes(TestStockCommon): """ warehouse = self.env['stock.warehouse'].search([('company_id', '=', self.env.user.id)], limit=1) warehouse.delivery_steps = 'pick_pack_ship' - partner_demo_customer = self.env.ref('base.res_partner_1') + partner_demo_customer = self.partner final_location = partner_demo_customer.property_stock_customer product_a = self.env['product.product'].create({ 'name': 'ProductA', @@ -2098,7 +2099,7 @@ class TestRoutes(TestStockCommon): """ warehouse = self.env['stock.warehouse'].search([('company_id', '=', self.env.user.id)], limit=1) warehouse.delivery_steps = 'pick_pack_ship' - partner_demo_customer = self.env.ref('base.res_partner_1') + partner_demo_customer = self.partner final_location = partner_demo_customer.property_stock_customer product_a = self.env['product.product'].create({ 'name': 'ProductA', @@ -2144,7 +2145,7 @@ class TestRoutes(TestStockCommon): """ warehouse = self.env['stock.warehouse'].search([('company_id', '=', self.env.user.id)], limit=1) warehouse.delivery_steps = 'pick_pack_ship' - partner_demo_customer = self.env.ref('base.res_partner_1') + partner_demo_customer = self.partner final_location = partner_demo_customer.property_stock_customer product_a = self.env['product.product'].create({ 'name': 'ProductA', @@ -2237,7 +2238,7 @@ class TestRoutes(TestStockCommon): """ warehouse = self.env['stock.warehouse'].search([('company_id', '=', self.env.company.id)], limit=1) warehouse.delivery_steps = 'pick_pack_ship' - partner_demo_customer = self.env.ref('base.res_partner_1') + partner_demo_customer = self.partner final_location = partner_demo_customer.property_stock_customer product_a = self.env['product.product'].create({ 'name': 'ProductA', |
