Skip to Content
Menu
This question has been flagged
2 Replies
604 Views

I've just created a new Odoo database. In the sales app, I created a new quotation for a client (who has an email associated). I try clicking the button "Send by email", but I get the following error. What am I doing wrong or how can I resolve this?

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 683, in dispatch
    result = self._call_function(**self.params)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 1389, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/14.0/addons/web/controllers/main.py", line 1381, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/api.py", line 396, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/api.py", line 383, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 6230, in onchange
    record._onchange_eval(name, field_onchange[name], result)
  File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5986, in _onchange_eval
    method_res = method(self)
  File "/home/odoo/src/odoo/14.0/addons/mail/wizard/mail_compose_message.py", line 360, in onchange_template_id_wrapper
    values = self.onchange_template_id(self.template_id.id, self.composition_mode, self.model, self.res_id)['value']
  File "/home/odoo/src/odoo/14.0/addons/mail/wizard/mail_compose_message.py", line 378, in onchange_template_id
    values = self.generate_email_for_composer(
  File "/home/odoo/src/odoo/14.0/addons/mail/wizard/mail_compose_message.py", line 512, in generate_email_for_composer
    template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields)
  File "/home/odoo/src/odoo/14.0/addons/account_edi/models/mail_template.py", line 10, in generate_email
    res = super().generate_email(res_ids, fields)
  File "/home/odoo/src/odoo/14.0/addons/mail/models/mail_template.py", line 199, in generate_email
    result, format = report._render_qweb_pdf([res_id])
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_actions_report.py", line 815, in _render_qweb_pdf
    pdf_content = self._run_wkhtmltopdf(
  File "/home/odoo/src/odoo/14.0/odoo/addons/base/models/ir_actions_report.py", line 438, in _run_wkhtmltopdf
    head_file_fd, head_file_path = tempfile.mkstemp(suffix='.html', prefix='report.header.tmp.')
  File "/usr/lib/python3.8/tempfile.py", line 471, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
  File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
    fd = _os.open(file, flags, 0o600)
Exception

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

Traceback (most recent call last):
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 639, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/odoo/src/odoo/14.0/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/report.header.tmp.wixa4uaa.html'
Avatar
Discard
Best Answer

hi,

the error is inside report.header.tmp

change the header

'/tmp/report.header.tmp.wixa4uaa.html'
'/tmp/report.header.tmp.wixa4uaa.html'

'/tmp/report.header.tmp.wixa4uaa.html'
'/tmp/report.header.tmp.wixa4uaa.html'


'/tmp/report.header.tmp.wixa4uaa.html'


Avatar
Discard
Best Answer

The Problem is that your wkhtmltopdf Python Library is not installed or doesent have Patched QT

How to solve this:

- try to uninstall wkhtmltopdf and install the version 0.12.6 with Patched QT

if that didnt solve your Problem. you sould go to Settings\document Layout wizard and fix the header of the Standard layout 

Avatar
Discard