summaryrefslogtreecommitdiff
path: root/addons/mrp_subcontracting/tests/test_subcontracting.py
diff options
context:
space:
mode:
authorArnold Moyaux <arm@odoo.com>2019-07-31 12:32:38 +0000
committerArnold Moyaux <arm@odoo.com>2019-08-19 15:03:59 +0000
commit37200abfc5684935f932bf42923add145f5dfd1e (patch)
tree812735514479f38ccf8c5428875cca911fa876fe /addons/mrp_subcontracting/tests/test_subcontracting.py
parent6c09ffb63409b0897aefe083f1b7f64a281063e1 (diff)
[REF] mrp_subcontracting: lot produced/consumed management
Currently, the subcontract picking present multiple difficulties: - The user has to introduce multiple time the lot produced. In register components button and then create a new move line with the show details operation button. - Same problem with the correction system. The user has to modify the lot in details operation and then go on the subcontract production and unlock and edit it. In order to facilitate those behavior. A move line will be automaticaly created during the register components process. Also the subcontract moves for components will be available in the detail operations tab.
Diffstat (limited to 'addons/mrp_subcontracting/tests/test_subcontracting.py')
-rw-r--r--addons/mrp_subcontracting/tests/test_subcontracting.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/addons/mrp_subcontracting/tests/test_subcontracting.py b/addons/mrp_subcontracting/tests/test_subcontracting.py
index f715f1466e6..58ad3928d44 100644
--- a/addons/mrp_subcontracting/tests/test_subcontracting.py
+++ b/addons/mrp_subcontracting/tests/test_subcontracting.py
@@ -188,7 +188,6 @@ class TestSubcontractingFlows(SavepointCase):
# Nothing should be tracked
self.assertFalse(picking_receipt.display_action_record_components)
- self.assertFalse(picking_receipt.display_view_subcontracted_move_lines)
# Check the created manufacturing order
mo = self.env['mrp.production'].search([('bom_id', '=', self.bom.id)])
@@ -218,9 +217,6 @@ class TestSubcontractingFlows(SavepointCase):
picking_receipt.button_validate()
self.assertEquals(mo.state, 'done')
- # Now that the picking is done, the details stat button should be visible
- self.assertTrue(picking_receipt.display_view_subcontracted_move_lines)
-
# Available quantities should be negative at the subcontracting location for each components
avail_qty_comp1 = self.env['stock.quant']._get_available_quantity(self.comp1, self.subcontractor_partner1.property_stock_supplier, allow_negative=True)
avail_qty_comp2 = self.env['stock.quant']._get_available_quantity(self.comp2, self.subcontractor_partner1.property_stock_supplier, allow_negative=True)
@@ -250,7 +246,6 @@ class TestSubcontractingFlows(SavepointCase):
# Nothing should be tracked
self.assertFalse(picking_receipt.display_action_record_components)
- self.assertFalse(picking_receipt.display_view_subcontracted_move_lines)
# Pickings should directly be created
mo = self.env['mrp.production'].search([('bom_id', '=', self.bom.id)])
@@ -275,9 +270,6 @@ class TestSubcontractingFlows(SavepointCase):
picking_receipt.button_validate()
self.assertEquals(mo.state, 'done')
- # Now that the picking is done, the details stat button should be visible
- self.assertTrue(picking_receipt.display_view_subcontracted_move_lines)
-
# Available quantities should be negative at the subcontracting location for each components
avail_qty_comp1 = self.env['stock.quant']._get_available_quantity(self.comp1, self.subcontractor_partner1.property_stock_supplier, allow_negative=True)
avail_qty_comp2 = self.env['stock.quant']._get_available_quantity(self.comp2, self.subcontractor_partner1.property_stock_supplier, allow_negative=True)
@@ -314,7 +306,6 @@ class TestSubcontractingFlows(SavepointCase):
# Nothing should be tracked
self.assertFalse(picking_receipt.display_action_record_components)
- self.assertFalse(picking_receipt.display_view_subcontracted_move_lines)
# Pickings should directly be created
mo = self.env['mrp.production'].search([('bom_id', '=', self.bom.id)])
@@ -336,9 +327,6 @@ class TestSubcontractingFlows(SavepointCase):
picking_receipt.button_validate()
self.assertEquals(mo.state, 'done')
- # Now that the picking is done, the details stat button should be visible
- self.assertTrue(picking_receipt.display_view_subcontracted_move_lines)
-
# Available quantities should be negative at the subcontracting location for each components
avail_qty_comp1 = self.env['stock.quant']._get_available_quantity(self.comp1, self.subcontractor_partner1.property_stock_supplier, allow_negative=True)
avail_qty_comp2 = self.env['stock.quant']._get_available_quantity(self.comp2, self.subcontractor_partner1.property_stock_supplier, allow_negative=True)
@@ -524,7 +512,6 @@ class TestSubcontractingTracking(TransactionCase):
# We should be able to call the 'record_components' button
self.assertTrue(picking_receipt.display_action_record_components)
- self.assertFalse(picking_receipt.display_view_subcontracted_move_lines)
# Check the created manufacturing order
mo = self.env['mrp.production'].search([('bom_id', '=', self.bom_tracked.id)])
@@ -571,8 +558,6 @@ class TestSubcontractingTracking(TransactionCase):
# We should not be able to call the 'record_components' button
self.assertFalse(picking_receipt.display_action_record_components)
- # We should see the move lines stat button
- self.assertTrue(picking_receipt.display_view_subcontracted_move_lines)
picking_receipt.move_lines.quantity_done = 1
picking_receipt.move_lines.move_line_ids.lot_name = 'lot00001test'