From 82ea30d1bd4f538b20a7c3dce495a60c909b37d8 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 23 Jan 2023 19:12:23 +0100 Subject: [PATCH] intrastat_product: Improve warning message on intrastat transaction --- .../models/intrastat_product_declaration.py | 12 +++++++++--- intrastat_product/views/account_fiscal_position.xml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/intrastat_product/models/intrastat_product_declaration.py b/intrastat_product/models/intrastat_product_declaration.py index 63b1397..88fce22 100644 --- a/intrastat_product/models/intrastat_product_declaration.py +++ b/intrastat_product/models/intrastat_product_declaration.py @@ -323,10 +323,16 @@ class IntrastatProductDeclaration(models.Model): if not transaction: line_notes = [ _( - "No Intrastat Transaction Type on invoice '%s', " - "nor on the fiscal position of the invoice (%s)." + "No Intrastat Transaction Type on invoice '%s'. " + "No Default Intrastat Transaction Type on " + "the fiscal position of the invoice (%s), " + "nor on the accounting configuration page of the company '%s'. " + ) + % ( + invoice.name, + invoice.fiscal_position_id.display_name, + invoice.company_id.display_name, ) - % (invoice.name, invoice.fiscal_position_id.display_name) ] self._format_line_note(inv_line, notedict, line_notes) return transaction diff --git a/intrastat_product/views/account_fiscal_position.xml b/intrastat_product/views/account_fiscal_position.xml index c9360d7..bdc0ae1 100644 --- a/intrastat_product/views/account_fiscal_position.xml +++ b/intrastat_product/views/account_fiscal_position.xml @@ -18,7 +18,7 @@ >