web/views/emailaddress.py
changeset 4045 f4a52abb6f4f
parent 4023 eae23c40627a
child 4252 6c4f109c2b03
equal deleted inserted replaced
4044:3876c894e018 4045:f4a52abb6f4f
    36             self.field(display_name(self._cw, 'primary_email', 'object'), emailof.view('oneline'))
    36             self.field(display_name(self._cw, 'primary_email', 'object'), emailof.view('oneline'))
    37             pemaileid = emailof.eid
    37             pemaileid = emailof.eid
    38         else:
    38         else:
    39             pemaileid = None
    39             pemaileid = None
    40         try:
    40         try:
    41             emailof = 'use_email' in self._cw.schema and entity.reverse_use_email or ()
    41             emailof = 'use_email' in self._cw.vreg.schema and entity.reverse_use_email or ()
    42             emailof = [e for e in emailof if not e.eid == pemaileid]
    42             emailof = [e for e in emailof if not e.eid == pemaileid]
    43         except Unauthorized:
    43         except Unauthorized:
    44             emailof = []
    44             emailof = []
    45         if emailof:
    45         if emailof:
    46             emailofstr = ', '.join(e.view('oneline') for e in emailof)
    46             emailofstr = ', '.join(e.view('oneline') for e in emailof)