Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7d03ec08ad |
13 changed files with 25 additions and 51 deletions
2
.env
2
.env
|
@ -1 +1 @@
|
||||||
PYTHONPATH=~/Projekte/tr50/lib/python3.10/site-packages
|
PYTHONPATH=~/Projekte/tr70/lib/python3.10/site-packages
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,4 +4,3 @@ dist/*
|
||||||
mds_account_invoice_xrechnung.egg-info/*
|
mds_account_invoice_xrechnung.egg-info/*
|
||||||
__pycache__/*
|
__pycache__/*
|
||||||
locale/convert_de2en.py
|
locale/convert_de2en.py
|
||||||
.env
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
Copyright (C) 2015-2025 Cédric Krier.
|
|
||||||
Copyright (C) 2015-2025 B2CK SPRL.
|
|
||||||
Copyright (C) 2021-2025 martin-data services.
|
Copyright (C) 2021-2025 martin-data services.
|
||||||
Copyright (C) 2025 Mathias Behrle <mathiasb@m9s.biz>
|
Copyright (C) 2025 Mathias Behrle <mathiasb@m9s.biz>
|
||||||
|
|
||||||
|
|
18
README.rst
18
README.rst
|
@ -9,23 +9,11 @@ pip install mds-account-invoice-xrechnung
|
||||||
|
|
||||||
Requires
|
Requires
|
||||||
========
|
========
|
||||||
- Tryton 5.0
|
- Tryton 7.0
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
=======
|
=======
|
||||||
|
|
||||||
*5.0.10 - 11.02.2025*
|
*7.0.0 - 22.12.2023*
|
||||||
|
|
||||||
- Allow the export of paid invoices. (Mathias Behrle <mathiasb@m9s.biz>)
|
- compatiblity to Tryton 7.0
|
||||||
|
|
||||||
*5.0.8 - 28.01.2025*
|
|
||||||
|
|
||||||
- fix: select 1st invoice-report (Mathias Behrle <mathiasb@m9s.biz>)
|
|
||||||
|
|
||||||
*5.0.7 - 17.12.2024*
|
|
||||||
|
|
||||||
- optimize pdf-generate
|
|
||||||
|
|
||||||
*5.0.6 - 11.12.2024*
|
|
||||||
|
|
||||||
- compatiblitiy to Tryton 5.0
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class InvoiceLine(metaclass=PoolMeta):
|
||||||
cls.unit.states['required'],
|
cls.unit.states['required'],
|
||||||
And(
|
And(
|
||||||
Eval('type') == 'line',
|
Eval('type') == 'line',
|
||||||
Bool(Eval('quantity', None))))
|
Bool(Eval('quantity'))))
|
||||||
cls.unit.depends.extend(['type', 'quantity'])
|
cls.unit.depends.update(['type', 'quantity'])
|
||||||
|
|
||||||
# end Invoice
|
# end Invoice
|
||||||
|
|
7
setup.py
7
setup.py
|
@ -13,7 +13,6 @@ here = path.abspath(path.dirname(__file__))
|
||||||
MODULE = 'account_invoice_xrechnung'
|
MODULE = 'account_invoice_xrechnung'
|
||||||
PREFIX = 'mds'
|
PREFIX = 'mds'
|
||||||
|
|
||||||
# Get the long description from the README file
|
|
||||||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
|
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
|
@ -35,7 +34,7 @@ with open(path.join(here, 'versiondep.txt'), encoding='utf-8') as f:
|
||||||
modversion[l2[0]] = {'min': l2[1], 'max': l2[2], 'prefix': l2[3]}
|
modversion[l2[0]] = {'min': l2[1], 'max': l2[2], 'prefix': l2[3]}
|
||||||
|
|
||||||
# tryton-version
|
# tryton-version
|
||||||
major_version = 5
|
major_version = 7
|
||||||
minor_version = 0
|
minor_version = 0
|
||||||
|
|
||||||
requires = ['python-slugify', 'pypdf', 'factur-x']
|
requires = ['python-slugify', 'pypdf', 'factur-x']
|
||||||
|
@ -83,11 +82,11 @@ setup(
|
||||||
'Natural Language :: English',
|
'Natural Language :: English',
|
||||||
'Operating System :: OS Independent',
|
'Operating System :: OS Independent',
|
||||||
'License :: OSI Approved :: GNU General Public License (GPL)',
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
||||||
'Programming Language :: Python :: 3.6',
|
|
||||||
'Programming Language :: Python :: 3.7',
|
|
||||||
'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',
|
keywords='tryton account invoice xrechnung edocument',
|
||||||
|
|
|
@ -2,18 +2,3 @@
|
||||||
# This file is part of the account-invoice-xrechnung-module
|
# This file is part of the account-invoice-xrechnung-module
|
||||||
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
import trytond.tests.test_tryton
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
from .test_invoice import InvoiceTestCase
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['suite']
|
|
||||||
|
|
||||||
|
|
||||||
def suite():
|
|
||||||
suite = trytond.tests.test_tryton.suite()
|
|
||||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
|
||||||
InvoiceTestCase))
|
|
||||||
return suite
|
|
||||||
|
|
|
@ -18,10 +18,16 @@ from .xml_data import xml_from_pdf
|
||||||
def set_invoice_sequences(fiscalyear):
|
def set_invoice_sequences(fiscalyear):
|
||||||
pool = Pool()
|
pool = Pool()
|
||||||
Sequence = pool.get('ir.sequence.strict')
|
Sequence = pool.get('ir.sequence.strict')
|
||||||
|
SequenceType = pool.get('ir.sequence.type')
|
||||||
InvoiceSequence = pool.get('account.fiscalyear.invoice_sequence')
|
InvoiceSequence = pool.get('account.fiscalyear.invoice_sequence')
|
||||||
|
ModelData = pool.get('ir.model.data')
|
||||||
|
|
||||||
sequence = Sequence(name=fiscalyear.name, code='account.invoice')
|
sequence = Sequence(
|
||||||
sequence.company = fiscalyear.company
|
name=fiscalyear.name,
|
||||||
|
sequence_type=SequenceType(ModelData.get_id(
|
||||||
|
'account_invoice', 'sequence_type_account_invoice')),
|
||||||
|
company=fiscalyear.company,
|
||||||
|
)
|
||||||
sequence.save()
|
sequence.save()
|
||||||
fiscalyear.invoice_sequences = []
|
fiscalyear.invoice_sequences = []
|
||||||
invoice_sequence = InvoiceSequence()
|
invoice_sequence = InvoiceSequence()
|
||||||
|
@ -126,7 +132,7 @@ class InvoiceTestCase(ModuleTestCase):
|
||||||
'addresses': [('create', [{
|
'addresses': [('create', [{
|
||||||
'invoice': True,
|
'invoice': True,
|
||||||
'street': 'Applicant Street 1',
|
'street': 'Applicant Street 1',
|
||||||
'zip': '12345',
|
'postal_code': '12345',
|
||||||
'city': 'Usertown',
|
'city': 'Usertown',
|
||||||
'country': country_de.id,
|
'country': country_de.id,
|
||||||
}])],
|
}])],
|
||||||
|
@ -193,7 +199,7 @@ class InvoiceTestCase(ModuleTestCase):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list(result['view']['defaults'].keys()), [
|
list(result['view']['defaults'].keys()), [
|
||||||
'as_zip', 'edocument', 'invoice', 'state',
|
'as_zip', 'edocument', 'invoice', 'state',
|
||||||
'invoice.rec_name'])
|
'invoice.'])
|
||||||
|
|
||||||
data = {}
|
data = {}
|
||||||
for x in result['view']['defaults'].keys():
|
for x in result['view']['defaults'].keys():
|
||||||
|
@ -219,6 +225,7 @@ class InvoiceTestCase(ModuleTestCase):
|
||||||
action['report_name'],
|
action['report_name'],
|
||||||
'account_invoice_xrechnung.export')
|
'account_invoice_xrechnung.export')
|
||||||
self.assertEqual(action['type'], 'ir.action.report')
|
self.assertEqual(action['type'], 'ir.action.report')
|
||||||
|
self.assertEqual(action['records'], 'selected')
|
||||||
|
|
||||||
# 2nd step, wizard told us which report we must execute
|
# 2nd step, wizard told us which report we must execute
|
||||||
ReportExport = pool.get(
|
ReportExport = pool.get(
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=5.0.9
|
version=7.0.0
|
||||||
depends:
|
depends:
|
||||||
account_invoice
|
account_invoice
|
||||||
bank
|
bank
|
||||||
edocument_xrechnung
|
edocument_xrechnung
|
||||||
tryton6_backport
|
|
||||||
xml:
|
xml:
|
||||||
message.xml
|
message.xml
|
||||||
configuration.xml
|
configuration.xml
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
edocument_xrechnung;5.0.13;5.0.999;mds
|
edocument_xrechnung;7.0.5;7.0.999;mds
|
||||||
tryton6_backport;5.0.3;5.0.999;mds
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
full copyright notices and license terms. -->
|
full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<xpath expr="/form/separator[@id='invoice']" position="before">
|
<xpath expr="/form/separator[@id='currency_exchange']" position="before">
|
||||||
|
|
||||||
<separator id="xrechnung" colspan="4" string="ZUGFeRD - e-Invoice"/>
|
<separator id="xrechnung" colspan="4" string="ZUGFeRD - e-Invoice"/>
|
||||||
<label name="xrechn_zugferd_report"/>
|
<label name="xrechn_zugferd_report"/>
|
||||||
|
|
|
@ -7,8 +7,8 @@ from trytond.model import ModelView, fields
|
||||||
from trytond.wizard import Wizard, StateView, StateReport, Button
|
from trytond.wizard import Wizard, StateView, StateReport, Button
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from trytond.exceptions import UserError
|
from trytond.exceptions import UserError
|
||||||
|
from trytond.i18n import gettext
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.modules.tryton6_backport import gettext
|
|
||||||
|
|
||||||
|
|
||||||
sel_edocument = [
|
sel_edocument = [
|
||||||
|
|
|
@ -10,7 +10,7 @@ from slugify import slugify
|
||||||
from trytond.report import Report
|
from trytond.report import Report
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from trytond.exceptions import UserError
|
from trytond.exceptions import UserError
|
||||||
from trytond.modules.tryton6_backport import gettext
|
from trytond.i18n import gettext
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from .wizard_runreport import edoc_versions
|
from .wizard_runreport import edoc_versions
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue