diff --git a/production.py b/production.py index a27588147d..cbb1c8f0ee 100644 --- a/production.py +++ b/production.py @@ -81,7 +81,11 @@ class Production(ShipmentAssignMixin, Workflow, ModelSQL, ModelView): ], states={ 'readonly': ~Eval('state').in_(['request', 'draft']), - }) + }, + context={ + 'company': Eval('company', -1), + }, + depends=['company']) bom = fields.Many2One('production.bom', 'BOM', domain=[ ('output_products', '=', Eval('product', 0)), diff --git a/tests/test_production.py b/tests/test_production.py index 4e7af79f3d..6b0d7d07ee 100644 --- a/tests/test_production.py +++ b/tests/test_production.py @@ -10,8 +10,10 @@ from trytond.tests.test_tryton import doctest_teardown from trytond.tests.test_tryton import doctest_checker from trytond.pool import Pool +from trytond.modules.company.tests import CompanyMultiValueTestMixin -class ProductionTestCase(ModuleTestCase): + +class ProductionTestCase(CompanyMultiValueTestMixin, ModuleTestCase): 'Test Production module' module = 'production'