Add test on context of company multivalue target fields

issue10067
review333851026
This commit is contained in:
Cédric Krier committed 2021-03-05 15:49:20 +01:00
1 parent dea1a50c33
commit 8edb8d7675
2 files changed
+8 -2

No files matched your search

+5 -1
View File
@@ -36,7 +36,11 @@ class PartySalePriceList(ModelSQL, CompanyValueMixin):
"Party Sale Price List"
__name__ = 'party.party.sale_price_list'
party = fields.Many2One(
'party.party', "Party", ondelete='CASCADE', select=True)
'party.party', "Party", ondelete='CASCADE', select=True,
context={
'company': Eval('company', -1),
},
depends=['company'])
sale_price_list = fields.Many2One(
'product.price_list', "Sale Price List",
domain=[
+3 -1
View File
@@ -7,8 +7,10 @@ from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import doctest_teardown
from trytond.tests.test_tryton import doctest_checker
from trytond.modules.company.tests import CompanyMultiValueTestMixin
class SalePriceListTestCase(ModuleTestCase):
class SalePriceListTestCase(CompanyMultiValueTestMixin, ModuleTestCase):
'Test SalePriceList module'
module = 'sale_price_list'