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/*
|
||||
__pycache__/*
|
||||
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) 2025 Mathias Behrle <mathiasb@m9s.biz>
|
||||
|
||||
|
|
18
README.rst
18
README.rst
|
@ -9,23 +9,11 @@ pip install mds-account-invoice-xrechnung
|
|||
|
||||
Requires
|
||||
========
|
||||
- Tryton 5.0
|
||||
- Tryton 7.0
|
||||
|
||||
Changes
|
||||
=======
|
||||
|
||||
*5.0.10 - 11.02.2025*
|
||||
*7.0.0 - 22.12.2023*
|
||||
|
||||
- Allow the export of paid invoices. (Mathias Behrle <mathiasb@m9s.biz>)
|
||||
|
||||
*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
|
||||
- compatiblity to Tryton 7.0
|
||||
|
|
|
@ -17,7 +17,7 @@ class InvoiceLine(metaclass=PoolMeta):
|
|||
cls.unit.states['required'],
|
||||
And(
|
||||
Eval('type') == 'line',
|
||||
Bool(Eval('quantity', None))))
|
||||
cls.unit.depends.extend(['type', 'quantity'])
|
||||
Bool(Eval('quantity'))))
|
||||
cls.unit.depends.update(['type', 'quantity'])
|
||||
|
||||
# end Invoice
|
||||
|
|
7
setup.py
7
setup.py
|
@ -13,7 +13,6 @@ here = path.abspath(path.dirname(__file__))
|
|||
MODULE = 'account_invoice_xrechnung'
|
||||
PREFIX = 'mds'
|
||||
|
||||
# Get the long description from the README file
|
||||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
|
||||
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]}
|
||||
|
||||
# tryton-version
|
||||
major_version = 5
|
||||
major_version = 7
|
||||
minor_version = 0
|
||||
|
||||
requires = ['python-slugify', 'pypdf', 'factur-x']
|
||||
|
@ -83,11 +82,11 @@ setup(
|
|||
'Natural Language :: English',
|
||||
'Operating System :: OS Independent',
|
||||
'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.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
'Programming Language :: Python :: 3.12',
|
||||
],
|
||||
|
||||
keywords='tryton account invoice xrechnung edocument',
|
||||
|
|
|
@ -2,18 +2,3 @@
|
|||
# This file is part of the account-invoice-xrechnung-module
|
||||
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||
# 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):
|
||||
pool = Pool()
|
||||
Sequence = pool.get('ir.sequence.strict')
|
||||
SequenceType = pool.get('ir.sequence.type')
|
||||
InvoiceSequence = pool.get('account.fiscalyear.invoice_sequence')
|
||||
ModelData = pool.get('ir.model.data')
|
||||
|
||||
sequence = Sequence(name=fiscalyear.name, code='account.invoice')
|
||||
sequence.company = fiscalyear.company
|
||||
sequence = Sequence(
|
||||
name=fiscalyear.name,
|
||||
sequence_type=SequenceType(ModelData.get_id(
|
||||
'account_invoice', 'sequence_type_account_invoice')),
|
||||
company=fiscalyear.company,
|
||||
)
|
||||
sequence.save()
|
||||
fiscalyear.invoice_sequences = []
|
||||
invoice_sequence = InvoiceSequence()
|
||||
|
@ -126,7 +132,7 @@ class InvoiceTestCase(ModuleTestCase):
|
|||
'addresses': [('create', [{
|
||||
'invoice': True,
|
||||
'street': 'Applicant Street 1',
|
||||
'zip': '12345',
|
||||
'postal_code': '12345',
|
||||
'city': 'Usertown',
|
||||
'country': country_de.id,
|
||||
}])],
|
||||
|
@ -193,7 +199,7 @@ class InvoiceTestCase(ModuleTestCase):
|
|||
self.assertEqual(
|
||||
list(result['view']['defaults'].keys()), [
|
||||
'as_zip', 'edocument', 'invoice', 'state',
|
||||
'invoice.rec_name'])
|
||||
'invoice.'])
|
||||
|
||||
data = {}
|
||||
for x in result['view']['defaults'].keys():
|
||||
|
@ -219,6 +225,7 @@ class InvoiceTestCase(ModuleTestCase):
|
|||
action['report_name'],
|
||||
'account_invoice_xrechnung.export')
|
||||
self.assertEqual(action['type'], 'ir.action.report')
|
||||
self.assertEqual(action['records'], 'selected')
|
||||
|
||||
# 2nd step, wizard told us which report we must execute
|
||||
ReportExport = pool.get(
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
[tryton]
|
||||
version=5.0.9
|
||||
version=7.0.0
|
||||
depends:
|
||||
account_invoice
|
||||
bank
|
||||
edocument_xrechnung
|
||||
tryton6_backport
|
||||
xml:
|
||||
message.xml
|
||||
configuration.xml
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
edocument_xrechnung;5.0.13;5.0.999;mds
|
||||
tryton6_backport;5.0.3;5.0.999;mds
|
||||
edocument_xrechnung;7.0.5;7.0.999;mds
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
full copyright notices and license terms. -->
|
||||
<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"/>
|
||||
<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.pool import Pool
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.i18n import gettext
|
||||
from trytond.transaction import Transaction
|
||||
from trytond.modules.tryton6_backport import gettext
|
||||
|
||||
|
||||
sel_edocument = [
|
||||
|
|
|
@ -10,7 +10,7 @@ from slugify import slugify
|
|||
from trytond.report import Report
|
||||
from trytond.pool import Pool
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.modules.tryton6_backport import gettext
|
||||
from trytond.i18n import gettext
|
||||
from trytond.transaction import Transaction
|
||||
from .wizard_runreport import edoc_versions
|
||||
|
||||
|
|
Loading…
Reference in a new issue