Add language to contact mechanism
issue10223 review349611002
This commit is contained in:
1 parent
34fabe65fe
commit
83fa72fda6
2 files changed
+12
No files matched your search
@@ -31,6 +31,7 @@ def register():
|
||||
party.Party,
|
||||
party.PartyLang,
|
||||
party.ContactMechanism,
|
||||
party.ContactMechanismLanguage,
|
||||
module='company', type_='model')
|
||||
Pool.register(
|
||||
company.CompanyConfig,
|
||||
|
||||
@@ -116,6 +116,17 @@ class ContactMechanism(CompanyMultiValueMixin, metaclass=PoolMeta):
|
||||
yield address.country.code
|
||||
|
||||
|
||||
class ContactMechanismLanguage(CompanyValueMixin, metaclass=PoolMeta):
|
||||
__name__ = 'party.contact_mechanism.language'
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls.contact_mechanism.context['company'] = Eval('company', -1)
|
||||
if 'company' not in cls.contact_mechanism.depends:
|
||||
cls.contact_mechanism.depends.append('company')
|
||||
|
||||
|
||||
class LetterReport(CompanyReport):
|
||||
__name__ = 'party.letter'
|
||||
|
||||
|
||||
Reference in new issue
Block a user