changeset b448c92b5b34 in modules/production:default
details:
https://hg.tryton.org/modules/production?cmd=changeset;node=b448c92b5b34
description:
Add test on context of company multivalue target fields
issue10067
review333851026
diffstat:
production.py | 6 +++++-
tests/test_production.py | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r e31b86f1daff -r b448c92b5b34 production.py
--- a/production.py Sat Feb 27 18:16:28 2021 +0100
+++ b/production.py Fri Mar 05 15:49:19 2021 +0100
@@ -81,7 +81,11 @@
],
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 -r e31b86f1daff -r b448c92b5b34 tests/test_production.py
--- a/tests/test_production.py Sat Feb 27 18:16:28 2021 +0100
+++ b/tests/test_production.py Fri Mar 05 15:49:19 2021 +0100
@@ -10,8 +10,10 @@
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'