Skip to content

Commit

Permalink
l10n_fr_chorus_account: raise an error if the partner haven't be conf…
Browse files Browse the repository at this point in the history
…igured
  • Loading branch information
sebastienbeau committed Sep 29, 2024
1 parent 18a83ac commit 089580f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions l10n_fr_chorus_account/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,13 @@ def _chorus_check_validity(self):
)
% cpartner.display_name
)
if not cpartner.fr_chorus_required:
raise UserError(

Check warning on line 197 in l10n_fr_chorus_account/models/account_move.py

View check run for this annotation

Codecov / codecov/patch

l10n_fr_chorus_account/models/account_move.py#L197

Added line #L197 was not covered by tests
_(
"The field 'Info Required for Chorus' on the partner is empty "
"please fill as it's required for chorus"
)
)
if (
cpartner.fr_chorus_required in ("service", "service_and_engagement")
and not self.partner_id.chorus_service_ok()
Expand Down

0 comments on commit 089580f

Please sign in to comment.