summaryrefslogtreecommitdiff
path: root/addons/mrp/tests/test_order.py
diff options
context:
space:
mode:
authorsvs-odoo <svs@odoo.com>2019-03-12 12:22:41 +0000
committersvs-odoo <svs@odoo.com>2019-05-29 14:03:29 +0000
commitcc9324f74084760da3e49f069e3ef62f0d4280d7 (patch)
tree5f40efdd92de7cddb73c91a06f8a0de4ffe08dc4 /addons/mrp/tests/test_order.py
parentda33eb36b80d1b2a0004c28cf20d6b0263bcb643 (diff)
[IMP] *: usability of Inventory Adjustment
Change the use of Inventory Adjustment, notable changes are: - Removed filter field: When user creates a new inventory adjustment, he can set one or multiple locations and/or products. An inventory adjustment will worry only about defined locations/products, but if neither product or location was set, it'll manage all stock. - Inventory Adjustment Lines have their own view instead of be listed on the Inventory Adjustment form view. Inventory adjustment lines have new color legend: - Red: The quantity is outdated. - Blue: There is difference between the on hand quantity and the counted quantity. New inventory lines created by the user are written in bold. - User can't modify already existing inventory lines, except for the counted quantity. - When an inventory line is outdated, the user has the possibility to select and update it, that'll recompute the on hand quantity. - When an inventory adjustment is validated, it will take in account only the difference between the theoretical quantity ('On Hand Quantity') and the counted quantity to adjust the quants. - When an inventory adjustment is canceled, it will keep its inventory lines and won't regenerate them when re-started. - When an Inventory Adjustment generates Account Moves, user can now find them in a stat button in the Inventory Adjustment form view. Also, made some changes in demo data to match new requirement. Task #1935921
Diffstat (limited to 'addons/mrp/tests/test_order.py')
-rw-r--r--addons/mrp/tests/test_order.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mrp/tests/test_order.py b/addons/mrp/tests/test_order.py
index 233d0bf4354..2736da29ee1 100644
--- a/addons/mrp/tests/test_order.py
+++ b/addons/mrp/tests/test_order.py
@@ -46,7 +46,6 @@ class TestMrpOrder(TestMrpCommon):
self.product_2.type = 'product'
inventory = self.env['stock.inventory'].create({
'name': 'Initial inventory',
- 'filter': 'partial',
'line_ids': [(0, 0, {
'product_id': self.product_1.id,
'product_uom_id': self.product_1.uom_id.id,
@@ -59,6 +58,7 @@ class TestMrpOrder(TestMrpCommon):
'location_id': self.warehouse_1.lot_stock_id.id
})]
})
+ inventory.action_start()
inventory.action_validate()
test_date_planned = Dt.now() - timedelta(days=1)
@@ -195,7 +195,6 @@ class TestMrpOrder(TestMrpCommon):
quant_before = custom_laptop.qty_available
inventory = self.env['stock.inventory'].create({
'name': 'Inventory Product Table',
- 'filter': 'partial',
'line_ids': [(0, 0, {
'product_id': product_charger.id,
'product_uom_id': product_charger.uom_id.id,
@@ -208,6 +207,7 @@ class TestMrpOrder(TestMrpCommon):
'location_id': source_location_id
})]
})
+ inventory.action_start()
inventory.action_validate()
# create a mo for this bom