Skip to content

Commit

Permalink
Merge PR #3535 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by rvalyi
  • Loading branch information
OCA-git-bot committed Dec 9, 2024
2 parents 839a87a + 3a58da2 commit 1d37239
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions l10n_br_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,12 @@ def _create_invoices(self, grouped=False, final=False, date=None):
moves |= super()._create_invoices(
grouped=grouped, final=final, date=date
)
except UserError:
# TODO: Avoid only when it is "nothing to invoice error"
pass
except UserError as e:
if "There is nothing to invoice!" in str(e):
# Skip for now, will review later
pass
else:
raise

if not moves and self._context.get("raise_if_nothing_to_invoice", True):
raise UserError(self._nothing_to_invoice_error_message())
Expand Down

0 comments on commit 1d37239

Please sign in to comment.