diff --git a/README.rst b/README.rst index c95392e..2af1f47 100644 --- a/README.rst +++ b/README.rst @@ -15,6 +15,19 @@ Requires Changes ======= +*7.0.3 - 27.01.2025* + +- filter product-categories in configuration + +*7.0.2 - 24.01.2025* + +- fix: limit content-check to supplier-invoices + +*7.0.1 - 23.01.2025* + +- import of Factur-X (Basic, EN16931, Extended), CrossIndustryInvoice-D22 +- with/without PDF-Container + *7.0.0 - 19.12.2024* - init diff --git a/document.py b/document.py index 3445df8..75a2003 100644 --- a/document.py +++ b/document.py @@ -100,12 +100,15 @@ class Incoming(metaclass=PoolMeta): UserError: if calculated values dont match with xml-values """ + pool = Pool() + Configuration = pool.get('account.configuration.tax_rounding') + configuration = Configuration(1) + totals = self.parsed_data.get('total', None) if not totals: raise UserError(gettext( 'msg_convert_error.msg_convert_error', msg='no totals-section in xml-data')) - for xfield, inv_field in [ ('taxbase', 'untaxed_amount'), ('taxtotal', 'tax_amount'), @@ -114,15 +117,25 @@ class Incoming(metaclass=PoolMeta): inv_val = getattr(invoice, inv_field) if xml_val != inv_val: - raise UserError(gettext( - 'document_incoming_invoice_xml.msg_convert_error', - msg=' '.join([ + rounding = configuration.tax_rounding + field_name = 'tax_rounding' + selection_values = configuration.fields_get( + [field_name])[field_name]['selection'] + rounding_cfg = [ + i[1] for i in selection_values if i[0] == rounding][0] + msg = ' '.join([ inv_field + ' mismatch', 'from-xml=' + Report.format_currency( xml_val, None, invoice.currency), 'calculated=' + Report.format_currency( inv_val, None, invoice.currency) - ]))) + ]) + msg += '\n\n' + gettext( + 'document_incoming_invoice_xml.msg_tax_amount_mismatch', + rounding=rounding_cfg) + raise UserError(gettext( + 'document_incoming_invoice_xml.msg_convert_error', + msg=msg)) def _readxml_xpath(self, tags): """ generate xpath diff --git a/locale/de.po b/locale/de.po index 67a498c..84ba775 100644 --- a/locale/de.po +++ b/locale/de.po @@ -46,6 +46,9 @@ msgctxt "model:ir.message,text:msg_unused_linevalues" msgid "The following data was not used to generate the invoice line:" msgstr "Die folgenden Daten wurden für die Erzeugung der Rechnungszeile nicht verwendet:" +msgctxt "model:ir.message,text:msg_tax_amount_mismatch" +msgid "You have configured tax rounding method '%(rounding)s' in the account configuration. Maybe try with a different method" +msgstr "In Rechnungswesen/Einstellungen ist die Steuerrundungsmethode '%(rounding)s' eingetragen. Versuchen Sie es u.U. mit einer anderen Methode' ################################### # document.incoming.configuration # diff --git a/message.xml b/message.xml index e65f1a2..0b743d1 100644 --- a/message.xml +++ b/message.xml @@ -35,6 +35,9 @@ The following data was not used to generate the invoice line: + + You have configured tax rounding method '%(rounding)s' in the account configuration. Maybe try with a different method + diff --git a/tryton.cfg b/tryton.cfg index fde7a46..8dd8cc3 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -1,5 +1,5 @@ [tryton] -version=7.0.0 +version=7.0.3 depends: document_incoming_invoice edocument_unece diff --git a/versiondep.txt b/versiondep.txt index e69de29..fb5252c 100644 --- a/versiondep.txt +++ b/versiondep.txt @@ -0,0 +1 @@ +sale_point_invoice;7.0.15;7.0.999;mds