【Ubuntu20.04】odoo打印控件报错 FileNotFoundError: [Errno 2] No such file or directory: ‘libreoffice‘

报错日志:

Traceback (most recent call last):
  File "/odoo16/gooderp16/report_docx/controllers/main.py", line 95, in report_download
    response = self.report_routes(
  File "/odoo16/src/odoo/http.py", line 697, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/odoo16/gooderp16/report_docx/controllers/main.py", line 59, in report_routes
    res, filetype = action_docx_report.render_docx(docids, data)
  File "/odoo16/gooderp16/report_docx/models/ir_actions.py", line 43, in render_docx
    return docx.create_report(res_ids, data)
  File "/odoo16/gooderp16/report_docx/report/report_docx.py", line 186, in create_report
    temp_file = self.render_to_pdf(temp_out_file)
  File "/odoo16/gooderp16/report_docx/report/report_docx.py", line 204, in render_to_pdf
    process = subprocess.run(
  File "/usr/local/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/local/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'libreoffice'

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    at makeErrorFromResponse (http://121.40.85.37:8069/web/assets/610-1194550/web.assets_backend.min.js:985:163)
    at decoder.onload (http://121.40.85.37:8069/web/assets/610-1194550/web.assets_backend.min.js:973:7)

报错问题:

== FileNotFoundError: [Errno 2] No such file or directory: ‘libreoffice’ ==

ubuntu18安装libreoffice

sudo apt-get install libreoffice  

你可能感兴趣的:(Odoo,Odoo16,python,ubuntu)