Skip to content

Commit

Permalink
[FIX] datev_export_xml: Add general check on invoice e.g. when multip…
Browse files Browse the repository at this point in the history
…le taxes exists
  • Loading branch information
fkantelberg committed Apr 10, 2024
1 parent 7ce50a8 commit 316c6ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datev_export_xml/models/datev_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ def _create_activity(self):
def action_validate(self):
generator = self.env["datev.xml.generator"]
for invoice in self.invoice_ids:
try:
generator._check_invoices(invoice)
except ValueError as e:
invoice.datev_validation = str(e)
continue

try:
generator.generate_xml_invoice(invoice)
except UserError:
Expand Down

0 comments on commit 316c6ce

Please sign in to comment.