Try ERPNext Buy Support Partners Foundation Foundation Members

Error when sending email [V12] PermissionError: Email Account

Hi ,

Trying to send an email from the erp after upgrading to V12 gives the following error:

Traceback (most recent call last):

  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 60, in application

    response = frappe.api.handle()

  File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle

    return frappe.handler.handle()

  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle

    data = execute_cmd(cmd)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 61, in execute_cmd

    return frappe.call(method, **frappe.form_dict)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1038, in call

    return fn(*args, **newargs)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py", line 73, in make

    }).insert(ignore_permissions=True)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 229, in insert

    self.run_before_save_methods()

  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 888, in run_before_save_methods

    self.run_method("validate")

  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 787, in run_method

    out = Document.hook(fn)(self, *args, **kwargs)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1058, in composer

    return composed(self, method, *args, **kwargs)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1041, in runner

    add_to_return_value(self, fn(self, *args, **kwargs))

  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 781, in <lambda>

    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)

  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py", line 64, in validate

    self.parse_email_for_timeline_links()

  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py", line 257, in parse_email_for_timeline_links

    parse_email(self, [self.recipients, self.cc, self.bcc])

  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py", line 384, in parse_email

    if not frappe.get_list("Email Account", filters={"enable_automatic_linking": 1}):

  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1274, in get_list

    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)

 File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 43, in execute

    raise frappe.PermissionError(self.doctype)

frappe.exceptions.PermissionError: Email Account

Are we supposed to grant all users permission to read Email Account before they can send email? That doesn’t sound right

Any assistance will be much appreciated

Thanks

Anyone have any ideas how to get around this pls?

Kind regards,

Anyone else experiencing this? I don’t think it’s right for everyone to be able to view Email Account. It wasn’t like this previously!