Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0] mail_debrand raises error on mass mailing #915

Closed
Highcooley opened this issue May 31, 2022 · 1 comment
Closed

[14.0] mail_debrand raises error on mass mailing #915

Highcooley opened this issue May 31, 2022 · 1 comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@Highcooley
Copy link
Contributor

Module

mail_debrand

Describe the bug

When trying to send a mass mailing email (either as test or as a real mass mail) with mail_debrand installed, the following error is raised:

Error:
Odoo Server Error

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/odoo/src/odoo/odoo/http.py", line 683, in dispatch
result = self._call_function(**self.params)
File "/home/odoo/src/odoo/odoo/http.py", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/odoo/src/odoo/odoo/http.py", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 912, in call
return self.method(*args, **kw)
File "/home/odoo/src/odoo/odoo/http.py", line 531, in response_wrap
response = f(*args, **kw)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1398, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/odoo/src/odoo/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/home/odoo/src/odoo/addons/mass_mailing/wizard/mailing_mailing_test.py", line 34, in send_mail_test
body = self.env['mail.render.mixin']._render_template(body, mailing.mailing_model_real, record.ids, post_process=True)[record.id]
File "/home/odoo/src/user/OCA/social/mail_debrand/models/mail_render_mixin.py", line 88, in _render_template
orginal_rendered[key] = self.remove_href_odoo(orginal_rendered[key])
File "/home/odoo/src/user/OCA/social/mail_debrand/models/mail_render_mixin.py", line 38, in remove_href_odoo
if remove_parent and len(parent.getparent()):
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/odoo/src/odoo/odoo/http.py", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/odoo/src/odoo/odoo/http.py", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause
TypeError: object of type 'NoneType' has no len()

To Reproduce

Affected versions: 14.0.2.2.1

Steps to reproduce the behaviour:

  1. install mail_debrand
  2. create mass email
  3. test send or send to recipients

Expected behaviour
The email should be debranded if needed and sent without raising an error.

Additional context
Odoo 14.0 on Odoo.sh

@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 27, 2022
@github-actions github-actions bot closed this as completed Jan 1, 2023
SiesslPhillip pushed a commit to grueneerde/OCA-social that referenced this issue Nov 20, 2024
Syncing from upstream OCA/social (12.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

1 participant