Skip to content

Commit

Permalink
[FIX] l10n_fr_pos_cert: raise error when there is no order
Browse files Browse the repository at this point in the history
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#117337

X-original-commit: 9cc56fc
Signed-off-by: Trinh Jacky (trj) <[email protected]>
Signed-off-by: Pedram Bi Ria (pebr) <[email protected]>
  • Loading branch information
pedrambiria committed Apr 3, 2023
1 parent da108e2 commit d572315
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addons/l10n_fr_pos_cert/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def build_order_info(order):

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 = []
Expand Down

0 comments on commit d572315

Please sign in to comment.