[IMP]: Added Upstream patch for HR
This commit is contained in:
parent
c4123b8447
commit
db466a1d6a
@ -5,7 +5,7 @@ import logging
|
|||||||
|
|
||||||
from flectra import api, fields, models
|
from flectra import api, fields, models
|
||||||
from flectra import tools, _
|
from flectra import tools, _
|
||||||
from flectra.exceptions import ValidationError
|
from flectra.exceptions import ValidationError, AccessError
|
||||||
from flectra.modules.module import get_module_resource
|
from flectra.modules.module import get_module_resource
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
@ -14,7 +14,7 @@ class MailAlias(models.AbstractModel):
|
|||||||
_inherit = 'mail.alias.mixin'
|
_inherit = 'mail.alias.mixin'
|
||||||
|
|
||||||
def _alias_check_contact_on_record(self, record, message, message_dict, alias):
|
def _alias_check_contact_on_record(self, record, message, message_dict, alias):
|
||||||
if alias.alias_contact == 'employees' and record.ids:
|
if alias.alias_contact == 'employees':
|
||||||
email_from = tools.decode_message_header(message, 'From')
|
email_from = tools.decode_message_header(message, 'From')
|
||||||
email_address = tools.email_split(email_from)[0]
|
email_address = tools.email_split(email_from)[0]
|
||||||
employee = self.env['hr.employee'].search([('work_email', 'ilike', email_address)], limit=1)
|
employee = self.env['hr.employee'].search([('work_email', 'ilike', email_address)], limit=1)
|
||||||
|
Loading…
Reference in New Issue
Block a user