summaryrefslogtreecommitdiff
path: root/addons/mrp_subcontracting/tests
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2019-08-26 15:37:16 +0000
committerSimon Lejeune <sle@openerp.com>2019-09-03 15:05:03 +0000
commit9d4a5526906e20a8628d3f52674c466a0625bad7 (patch)
treeb6b87392100f49167872239c29b758ad483e72ec /addons/mrp_subcontracting/tests
parent96406dc2a9e06595961f6d4bec6b66f27b94e2ff (diff)
[REF] mrp_subcontracting: multi company
Ensure proper domains are applied and enforced on relation fields thanks to the `check_company` attributes. task-1985992
Diffstat (limited to 'addons/mrp_subcontracting/tests')
-rw-r--r--addons/mrp_subcontracting/tests/test_subcontracting.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/addons/mrp_subcontracting/tests/test_subcontracting.py b/addons/mrp_subcontracting/tests/test_subcontracting.py
index 448eda56547..029d9e3a71f 100644
--- a/addons/mrp_subcontracting/tests/test_subcontracting.py
+++ b/addons/mrp_subcontracting/tests/test_subcontracting.py
@@ -429,15 +429,18 @@ class TestSubcontractingFlows(TestMrpSubcontractingCommon):
lot_c1 = self.env['stock.production.lot'].create({
'name': 'LOT C1',
- 'product_id': self.comp1.id
+ 'product_id': self.comp1.id,
+ 'company_id': self.env.company.id,
})
lot_c2 = self.env['stock.production.lot'].create({
'name': 'LOT C2',
- 'product_id': self.comp2.id
+ 'product_id': self.comp2.id,
+ 'company_id': self.env.company.id,
})
lot_f1 = self.env['stock.production.lot'].create({
'name': 'LOT F1',
- 'product_id': self.finished.id
+ 'product_id': self.finished.id,
+ 'company_id': self.env.company.id,
})
register_form = Form(self.env['mrp.product.produce'].with_context(
@@ -476,7 +479,8 @@ class TestSubcontractingFlows(TestMrpSubcontractingCommon):
corrected_final_lot = self.env['stock.production.lot'].create({
'name': 'LOT F2',
- 'product_id': self.finished.id
+ 'product_id': self.finished.id,
+ 'company_id': self.env.company.id,
})
details_operation_form = Form(picking_receipt.move_lines, view=self.env.ref('stock.view_stock_move_operations'))
@@ -594,11 +598,13 @@ class TestSubcontractingTracking(TransactionCase):
lot_id = self.env['stock.production.lot'].create({
'name': 'lot1',
- 'product_id': self.finished_lot.id
+ 'product_id': self.finished_lot.id,
+ 'company_id': self.env.company.id,
})
serial_id = self.env['stock.production.lot'].create({
'name': 'lot1',
- 'product_id': self.comp1_sn.id
+ 'product_id': self.comp1_sn.id,
+ 'company_id': self.env.company.id,
})
produce_form = Form(self.env['mrp.product.produce'].with_context({
'active_id': mo.id,