コード例 #1
0
 def _get_pain_def(self, country_code):
     ''' Get the right message definition based on country code
      of selected company bank (via payment mode)
      if no country is defined, take the company country
      - Here we could add a second level for bank definitions'''
     if country_code:
         class_name = 'pain.001' + '.' + country_code.lower()
         if MsgSEPAFactory.has_instance(class_name):
             return MsgSEPAFactory.get_instance(class_name)
     return MsgSEPAFactory.get_instance('pain.001')
コード例 #2
0
ファイル: wiz_pain_001.py プロジェクト: Cywaithaka/LibrERP
 def _get_pain_def(self, country_code):
     ''' Get the right message definition based on country code
      of selected company bank (via payment mode)
      if no country is defined, take the company country
      - Here we could add a second level for bank definitions'''
     if country_code:
         class_name = 'pain.001' + '.' + country_code.lower()
         if MsgSEPAFactory.has_instance(class_name):
             return MsgSEPAFactory.get_instance(class_name)
     return MsgSEPAFactory.get_instance('pain.001')