| 1 | from odoo.tests.common import HttpCase, tagged |
| 2 | |
| 3 | |
| 4 | @tagged("-at_install", "post_install") |
| 5 | class TestStockWarehouseOrderpoint(HttpCase): |
| 6 | |
| 7 | def test_product_replenishment(self): |
| 8 | product = self.env['product.product'].create({ |
| 9 | 'name': 'Book Shelf', |
| 10 | 'lst_price': 1750.00, |
| 11 | 'is_storable': True, |
| 12 | 'purchase_ok': True, |
| 13 | }) |
| 14 | self.assertFalse(product.orderpoint_ids) |
| 15 | |
| 16 | self.start_tour("/odoo/replenishment", "test_product_replenishment", login='admin') |
| 17 | |
| 18 | self.assertEqual(len(product.orderpoint_ids), 1) |
| 19 | self.assertEqual(product.orderpoint_ids[0].route_id.name, 'Buy') |