Compare commits
1 commit
tax_amount
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
01616c6c4b |
8 changed files with 10 additions and 46 deletions
|
@ -1,6 +1,5 @@
|
||||||
Copyright (C) 2015-2025 Cédric Krier.
|
Copyright (C) 2024-2025 martin-data services.
|
||||||
Copyright (C) 2015-2025 B2CK SPRL.
|
Copyright (C) 2025 Mathias Behrle <mathiasb@m9s.biz>
|
||||||
Copyright (C) 2021-2025 martin-data services.
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
17
README.rst
17
README.rst
|
@ -15,23 +15,6 @@ Requires
|
||||||
Changes
|
Changes
|
||||||
=======
|
=======
|
||||||
|
|
||||||
*7.0.4 - 29.01.2025*
|
|
||||||
|
|
||||||
- add: Round unit_price + quantity to match the decimal places of the fields.
|
|
||||||
|
|
||||||
*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*
|
*7.0.0 - 19.12.2024*
|
||||||
|
|
||||||
- init
|
- init
|
||||||
|
|
21
document.py
21
document.py
|
@ -101,15 +101,12 @@ class Incoming(metaclass=PoolMeta):
|
||||||
UserError: if calculated values dont match
|
UserError: if calculated values dont match
|
||||||
with xml-values
|
with xml-values
|
||||||
"""
|
"""
|
||||||
pool = Pool()
|
|
||||||
Configuration = pool.get('account.configuration.tax_rounding')
|
|
||||||
configuration = Configuration(1)
|
|
||||||
|
|
||||||
totals = self.parsed_data.get('total', None)
|
totals = self.parsed_data.get('total', None)
|
||||||
if not totals:
|
if not totals:
|
||||||
raise UserError(gettext(
|
raise UserError(gettext(
|
||||||
'msg_convert_error.msg_convert_error',
|
'msg_convert_error.msg_convert_error',
|
||||||
msg='no totals-section in xml-data'))
|
msg='no totals-section in xml-data'))
|
||||||
|
|
||||||
for xfield, inv_field in [
|
for xfield, inv_field in [
|
||||||
('taxbase', 'untaxed_amount'),
|
('taxbase', 'untaxed_amount'),
|
||||||
('taxtotal', 'tax_amount'),
|
('taxtotal', 'tax_amount'),
|
||||||
|
@ -118,25 +115,15 @@ class Incoming(metaclass=PoolMeta):
|
||||||
inv_val = getattr(invoice, inv_field)
|
inv_val = getattr(invoice, inv_field)
|
||||||
|
|
||||||
if xml_val != inv_val:
|
if xml_val != inv_val:
|
||||||
rounding = configuration.tax_rounding
|
raise UserError(gettext(
|
||||||
field_name = 'tax_rounding'
|
'document_incoming_invoice_xml.msg_convert_error',
|
||||||
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([
|
msg=' '.join([
|
||||||
inv_field + ' mismatch',
|
inv_field + ' mismatch',
|
||||||
'from-xml=' + Report.format_currency(
|
'from-xml=' + Report.format_currency(
|
||||||
xml_val, None, invoice.currency),
|
xml_val, None, invoice.currency),
|
||||||
'calculated=' + Report.format_currency(
|
'calculated=' + Report.format_currency(
|
||||||
inv_val, None, invoice.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):
|
def _readxml_xpath(self, tags):
|
||||||
""" generate xpath
|
""" generate xpath
|
||||||
|
|
|
@ -46,9 +46,6 @@ msgctxt "model:ir.message,text:msg_unused_linevalues"
|
||||||
msgid "The following data was not used to generate the invoice line:"
|
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:"
|
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 #
|
# document.incoming.configuration #
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
<record model="ir.message" id="msg_unused_linevalues">
|
<record model="ir.message" id="msg_unused_linevalues">
|
||||||
<field name="text">The following data was not used to generate the invoice line:</field>
|
<field name="text">The following data was not used to generate the invoice line:</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.message" id="msg_tax_amount_mismatch">
|
|
||||||
<field name="text">You have configured tax rounding method '%(rounding)s' in the account configuration. Maybe try with a different method</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
</data>
|
</data>
|
||||||
</tryton>
|
</tryton>
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -85,6 +85,8 @@ setup(
|
||||||
'Programming Language :: Python :: 3.8',
|
'Programming Language :: Python :: 3.8',
|
||||||
'Programming Language :: Python :: 3.9',
|
'Programming Language :: Python :: 3.9',
|
||||||
'Programming Language :: Python :: 3.10',
|
'Programming Language :: Python :: 3.10',
|
||||||
|
'Programming Language :: Python :: 3.11',
|
||||||
|
'Programming Language :: Python :: 3.12',
|
||||||
],
|
],
|
||||||
|
|
||||||
keywords='tryton account invoice xrechnung edocument incoming',
|
keywords='tryton account invoice xrechnung edocument incoming',
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=7.0.4
|
version=7.0.0
|
||||||
depends:
|
depends:
|
||||||
document_incoming_invoice
|
document_incoming_invoice
|
||||||
edocument_unece
|
edocument_unece
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
sale_point_invoice;7.0.15;7.0.999;mds
|
|
Loading…
Reference in a new issue