Add test on context of company multivalue target fields
issue10067 review333851026
This commit is contained in:
1 parent
1ce7a9eca5
commit
e7307c41d1
2 files changed
+18
-5
No files matched your search
+13
-3
@@ -60,22 +60,32 @@ class Subscription(Workflow, ModelSQL, ModelView):
|
||||
'readonly': ((Eval('state') != 'draft')
|
||||
| (Eval('lines', [0]) & Eval('party'))),
|
||||
},
|
||||
depends=['state'],
|
||||
context={
|
||||
'company': Eval('company', -1),
|
||||
},
|
||||
depends=['state', 'company'],
|
||||
help="The party who subscribes.")
|
||||
contact = fields.Many2One(
|
||||
'party.contact_mechanism', "Contact",
|
||||
context={
|
||||
'company': Eval('company', -1),
|
||||
},
|
||||
search_context={
|
||||
'related_party': Eval('party'),
|
||||
})
|
||||
},
|
||||
depends=['company', 'party'])
|
||||
invoice_party = fields.Many2One('party.party', "Invoice Party",
|
||||
states={
|
||||
'readonly': ((Eval('state') != 'draft')
|
||||
| Eval('lines', [0])),
|
||||
},
|
||||
context={
|
||||
'company': Eval('company', -1),
|
||||
},
|
||||
search_context={
|
||||
'related_party': Eval('party'),
|
||||
},
|
||||
depends=['state', 'party'])
|
||||
depends=['state', 'company', 'party'])
|
||||
invoice_address = fields.Many2One(
|
||||
'party.address', "Invoice Address",
|
||||
domain=[
|
||||
|
||||
@@ -10,10 +10,13 @@ from trytond.tests.test_tryton import suite as test_suite
|
||||
from trytond.tests.test_tryton import doctest_teardown
|
||||
from trytond.tests.test_tryton import doctest_checker
|
||||
|
||||
from trytond.modules.company.tests import PartyCompanyCheckEraseMixin
|
||||
from trytond.modules.company.tests import (
|
||||
PartyCompanyCheckEraseMixin, CompanyMultiValueTestMixin)
|
||||
|
||||
|
||||
class SaleSubscriptionTestCase(PartyCompanyCheckEraseMixin, ModuleTestCase):
|
||||
class SaleSubscriptionTestCase(
|
||||
PartyCompanyCheckEraseMixin, CompanyMultiValueTestMixin,
|
||||
ModuleTestCase):
|
||||
'Test Sale Subscription module'
|
||||
module = 'sale_subscription'
|
||||
|
||||
|
||||
Reference in new issue
Block a user