Open codefuturist opened 6 days ago
Hi @codefuturist,
I'm sorry but the bitnami/odoo image does not include the python module 'rlPyCairo', which is required to use the invoice addon.
We will need to study if it is viable to include it in the image or not.
Meanwhile, you could workaround this issue by building your own image using the following Dockerfile:
FROM bitnami/odoo:17.0.20240905-debian-12-r0
RUN install_packages pkg-config build-essential libcairo2-dev && \
dpkg -r --force-depends python3.11 && \
/opt/bitnami/odoo/venv/bin/pip install rlPyCairo
Please give it a try and let us know if after installing the missing module, the invoice addon works.
I have created an internal task to add the module to the bitnami/odoo
image if possible.
Hi @codefuturist,
I'm sorry but the bitnami/odoo image does not include the python module 'rlPyCairo', which is required to use the invoice addon.
We will need to study if it is viable to include it in the image or not.
Meanwhile, you could workaround this issue by building your own image using the following Dockerfile:
FROM bitnami/odoo:17.0.20240905-debian-12-r0 RUN install_packages pkg-config build-essential libcairo2-dev && \ dpkg -r --force-depends python3.11 && \ /opt/bitnami/odoo/venv/bin/pip install rlPyCairo
Please give it a try and let us know if after installing the missing module, the invoice addon works.
I have created an internal task to add the module to the
bitnami/odoo
image if possible.
Hello @migruiz4,
I appreciate your efforts and will test your suggestion as soon as possible.
The strange thing is that it once did work in builds 3 Months ago and now I'm unable to downgrade (container refuses to start with attached volume). Also I tried to manually add rlPyCairo in the virtual env of Python, but it seemed like rlPyCairo has other dependencies that could not be resolved or we're missing in some way. Maybe this is due to the new major version of the library. I'm not a real professional in Python and just trying to provide some context.
Thanks a lot for your expertise!
Name and Version
bitnami/odoo 26.2.17
What architecture are you using?
amd64
What steps will reproduce the bug?
Are you using any custom parameters or values?
My helm config. I have redacted certain login fields. This should not be affect the error from being reproduced:
What is the expected behavior?
Invoice gets generated as a pdf. (Note that the preview works, just not the actual PDF)
What do you see instead?
RPC_ERROR Odoo Server Error Traceback (most recent call last): File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 43, in _getPMBackend import rlPyCairo as M ModuleNotFoundError: No module named 'rlPyCairo'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 46, in _getPMBackend import _rl_renderPM as M ModuleNotFoundError: No module named '_rl_renderPM'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/http.py", line 1783, in _serve_db return service_model.retrying(self._serve_ir_http, self.env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/service/model.py", line 133, in retrying result = func() ^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/http.py", line 1810, in _serve_ir_http response = self.dispatcher.dispatch(rule.endpoint, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/http.py", line 2014, in dispatch result = self.request.registry['ir.http']._dispatch(endpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/base/models/ir_http.py", line 222, in _dispatch result = endpoint(request.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/http.py", line 759, in route_wrapper result = endpoint(self, *args, *params_ok) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/web/controllers/dataset.py", line 28, in call_button action = self._call_kw(model, method, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw return call_kw(request.env[model], method, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/api.py", line 468, in call_kw result = _call_kw_multi(method, model, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/api.py", line 453, in _call_kw_multi result = method(recs, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/wizard/account_move_send.py", line 732, in action_send_and_print return self._process_send_and_print( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/wizard/account_move_send.py", line 666, in _process_send_and_print self._generate_invoice_documents(moves_data, allow_fallback_pdf=allow_fallback_pdf) File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/wizard/account_move_send.py", line 592, in _generate_invoice_documents self._prepare_invoice_pdf_report(invoice, invoice_data) File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/wizard/account_move_send.py", line 380, in _prepare_invoice_pdf_report content, _report_format = self.env['ir.actions.report'].with_company(invoice.company_id)._render('account.account_invoices', invoice.ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/base/models/ir_actions_report.py", line 1011, in _render return render_func(report_ref, res_ids, data=data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/models/ir_actions_report.py", line 61, in _render_qweb_pdf return super()._render_qweb_pdf(report_ref, res_ids=res_ids, data=data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/base/models/ir_actions_report.py", line 904, in _render_qweb_pdf collected_streams = self._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/l10n_ch/models/ir_actions_report.py", line 32, in _render_qweb_pdf_prepare_streams res = super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/models/ir_actions_report.py", line 20, in _render_qweb_pdf_prepare_streams return super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/base/models/ir_actions_report.py", line 754, in _render_qweb_pdf_prepare_streams html = self.with_context(additional_context)._render_qweb_html(report_ref, all_res_ids_wo_stream, data=data)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/base/models/ir_actions_report.py", line 978, in _render_qweb_html data = self._get_rendering_context(report, docids, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/stock/models/ir_actions_report.py", line 8, in _get_rendering_context data = super()._get_rendering_context(report, docids, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/models/ir_actions_report.py", line 80, in _get_rendering_context data = super()._get_rendering_context(report, docids, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/base/models/ir_actions_report.py", line 993, in _get_rendering_context data.update(report_model._get_report_values(docids, data=data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/report/account_invoice_report.py", line 179, in _get_report_values rslt = super()._get_report_values(docids, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/report/account_invoice_report.py", line 161, in _get_report_values new_code_url = invoice._generate_qr_code(silent_errors=data['report_type'] == 'html') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/models/account_move.py", line 4507, in _generate_qr_code rslt = self.partner_bank_id.build_qr_code_base64(self.amount_residual, unstruct_ref, self.payment_reference, self.currency_id, self.partner_id, qr_code_method, silent_errors=silent_errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/models/res_partner_bank.py", line 161, in build_qr_code_base64 return self._get_qr_code_base64(vals) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/account/models/res_partner_bank.py", line 201, in _get_qr_code_base64 barcode = self.env['ir.actions.report'].barcode(**params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/lib/odoo-17.0.post20240905-py3.12.egg/odoo/addons/base/models/ir_actions_report.py", line 627, in barcode return barcode.asString('png') ^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/shapes.py", line 803, in asString return renderPM.drawToString(self, fmt=format,showBoundary=getattr(self,'showBorder', ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 721, in drawToString drawToFile(d,s,fmt=fmt, dpi=dpi, bg=bg, configPIL=configPIL,backend=backend) File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 716, in drawToFile c = drawToPMCanvas(d, dpi=dpi, bg=bg, configPIL=configPIL, showBoundary=showBoundary,backend=backend) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 701, in drawToPMCanvas c = PMCanvas(d.width, d.height, dpi=dpi, bg=bg, configPIL=configPIL, backend=backend) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 304, in init self.dict['_gs'] = self._getGState(w,h,bg,backend) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 317, in _getGState mod = _getPMBackend(backend) ^^^^^^^^^^^^^^^^^^^^^^ File "/opt/bitnami/odoo/venv/lib/python3.12/site-packages/reportlab/graphics/renderPM.py", line 48, in _getPMBackend raise RenderPMError(f"""cannot import desired renderPM backend {backend} reportlab.graphics.utils.RenderPMError: cannot import desired renderPM backend rlPyCairo Seek advice at the users list see https://pairlist2.pair.net/mailman/listinfo/reportlab-users
The above server error caused the following client error: RPC_ERROR: Odoo Server Error RPC_ERROR at makeErrorFromResponse (https://odoo.pandia.io/web/assets/2a9f350/web.assets_web.min.js:2888:163) at XMLHttpRequest. (https://odoo.pandia.io/web/assets/2a9f350/web.assets_web.min.js:2892:13)
Additional information
I was unable to fix the error myself for multiple hours. Seems some library or program is missing inside the container. Tried older containers, did not seem to help. Breaks the usability application pretty hard! Any help appreciated! Thanks for contributing.