Skip to content
Snippets Groups Projects
Commit d5723152 authored by pedrambiria's avatar pedrambiria
Browse files

[FIX] l10n_fr_pos_cert: raise error when there is no order


Before this commit: if the user wanted to generate a
POS Inalterability Check statement, an IndexError was raised.
This commit raises a more understandable error.

opw-3237383

closes odoo/odoo#117337

X-original-commit: 9cc56fc3
Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
Signed-off-by: default avatarPedram Bi Ria (pebr) <pebr@odoo.com>
parent da108e2e
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,7 @@ class ResCompany(models.Model):
if not orders:
msg_alert = (_('There isn\'t any order flagged for data inalterability yet for the company %s. This mechanism only runs for point of sale orders generated after the installation of the module France - Certification CGI 286 I-3 bis. - POS', self.env.company.name))
raise UserError(msg_alert)
previous_hash = u''
corrupted_orders = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment