Contributors mailing list archives
contributors@odoo-community.org
Browse archives
Bug on l10n_fr_pos_cert | 14.0
by "Lanto Razafindrabe" <lanto.razafindrabe@numigi.com> - 16/05/2023 06:55:08Dear contributors of OCA,
We encounter a bug on the version 14.0 CE and EE when using the module l10n_fr_pos_cert. It was tested on runbot, locally.
We have the following error when clicking on "POS Inalterability Check" submenu of POS > Reporting, and clicking on "Save" button :
The full error when copying it :
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2109, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2040, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 50, in _render_qweb_pdf
return super()._render_qweb_pdf(res_ids=res_ids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 889, in _render_qweb_pdf
html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 929, in _render_qweb_html
data = self._get_rendering_context(docids, data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 55, in _get_rendering_context
return super()._get_rendering_context(docids=docids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 946, in _get_rendering_context
data.update(report_model._get_report_values(docids, data=data))
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/report/pos_hash_integrity.py", line 14, in _get_report_values
data.update(self.env.company._check_pos_hash_integrity())
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/models/res_company.py", line 77, in _check_pos_hash_integrity
start_order_info = build_order_info(orders_sorted_date[0])
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/models.py", line 5707, in __getitem__
return self.browse((self._ids[key],))
IndexError: tuple index out of range
Odoo Server Error
Traceback (most recent call last):
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2109, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2040, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 50, in _render_qweb_pdf
return super()._render_qweb_pdf(res_ids=res_ids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 889, in _render_qweb_pdf
html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 929, in _render_qweb_html
data = self._get_rendering_context(docids, data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 55, in _get_rendering_context
return super()._get_rendering_context(docids=docids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 946, in _get_rendering_context
data.update(report_model._get_report_values(docids, data=data))
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/report/pos_hash_integrity.py", line 14, in _get_report_values
data.update(self.env.company._check_pos_hash_integrity())
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/models/res_company.py", line 77, in _check_pos_hash_integrity
start_order_info = build_order_info(orders_sorted_date[0])
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/models.py", line 5707, in __getitem__
return self.browse((self._ids[key],))
IndexError: tuple index out of range
When this error is displayed for the first time, we can not access to the wizard of the menu "POS Inalterability Check" anymore. The traceback :
Error:
Odoo Server Error
Traceback (most recent call last):
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2109, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2040, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 50, in _render_qweb_pdf
return super()._render_qweb_pdf(res_ids=res_ids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 889, in _render_qweb_pdf
html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 929, in _render_qweb_html
data = self._get_rendering_context(docids, data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 55, in _get_rendering_context
return super()._get_rendering_context(docids=docids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 946, in _get_rendering_context
data.update(report_model._get_report_values(docids, data=data))
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/report/pos_hash_integrity.py", line 14, in _get_report_values
data.update(self.env.company._check_pos_hash_integrity())
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/models/res_company.py", line 77, in _check_pos_hash_integrity
start_order_info = build_order_info(orders_sorted_date[0])
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/models.py", line 5707, in __getitem__
return self.browse((self._ids[key],))
IndexError: tuple index out of range
Odoo Server Error
Traceback (most recent call last):
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2109, in report_download
response = self.report_routes(reportname, docids=docids, converter=converter, context=context)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/http.py", line 533, in response_wrap
response = f(*args, **kw)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/web/controllers/main.py", line 2040, in report_routes
pdf = report.with_context(context)._render_qweb_pdf(docids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 50, in _render_qweb_pdf
return super()._render_qweb_pdf(res_ids=res_ids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 889, in _render_qweb_pdf
html = self_sudo.with_context(context)._render_qweb_html(res_ids, data=data)[0]
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 929, in _render_qweb_html
data = self._get_rendering_context(docids, data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/account/models/ir_actions_report.py", line 55, in _get_rendering_context
return super()._get_rendering_context(docids=docids, data=data)
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/addons/base/models/ir_actions_report.py", line 946, in _get_rendering_context
data.update(report_model._get_report_values(docids, data=data))
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/report/pos_hash_integrity.py", line 14, in _get_report_values
data.update(self.env.company._check_pos_hash_integrity())
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/addons/l10n_fr_pos_cert/models/res_company.py", line 77, in _check_pos_hash_integrity
start_order_info = build_order_info(orders_sorted_date[0])
File "/home/lanto/Documents/OCA Repos & Sources/Odoo Community Source/odoo_14c/odoo/models.py", line 5707, in __getitem__
return self.browse((self._ids[key],))
IndexError: tuple index out of range
Have you an idea why this occurred ?
Hope there is a solution for this bug.
I am still available if you need further information.
(sorry if there are mistakes with my English)
Thank you !
-- Bonne journée | |||||||||||
| |||||||||||
Billet 5 ANS des Numigiens 🎂🎂🎂🎂🎂 | Voir >> |