Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fa87f3d263 | ||
![]() |
69fea338af | ||
![]() |
22ed73302e | ||
![]() |
ae839a892b | ||
![]() |
766118ac3e | ||
![]() |
4736bd6f18 | ||
![]() |
22a0fb9a14 | ||
![]() |
e1695cd944 |
13 changed files with 82 additions and 91 deletions
|
@ -9,11 +9,15 @@ pip install mds-account-invoice-xrechnung
|
||||||
|
|
||||||
Requires
|
Requires
|
||||||
========
|
========
|
||||||
- Tryton 6.0
|
- Tryton 6.6
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
=======
|
=======
|
||||||
|
|
||||||
*6.0.0 - 18.10.2022*
|
*6.6.3 - 30.06.2023*
|
||||||
|
|
||||||
|
- add: credit-note
|
||||||
|
|
||||||
|
*6.6.2 - 04.04.2023*
|
||||||
|
|
||||||
- init
|
- init
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# This file is part of Tryton.
|
# This file is part of the account-invoice-xrechnung-module
|
||||||
# The COPYRIGHT file at the top level of this repository contains the
|
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
# full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
from .wizard_runreport import RunXRechnungReport, RunXRechnungReportStart
|
from .wizard_runreport import RunXRechnungReport, RunXRechnungReportStart
|
||||||
from .invoice import InvoiceLine
|
from .invoice import InvoiceLine
|
||||||
from .xreport import XReport
|
from .xreport import XReport
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
Pool.register(
|
Pool.register(
|
||||||
InvoiceLine,
|
InvoiceLine,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# This file is part of the cashbook-module from m-ds for Tryton.
|
# This file is part of the account-invoice-xrechnung-module
|
||||||
# The COPYRIGHT file at the top level of this repository contains the
|
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
# full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
from trytond.pyson import Eval, And, Or
|
from trytond.pyson import Eval, And, Or
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
<!-- This file is part of the account-invoice-xrechnung-module
|
||||||
The COPYRIGHT file at the top level of this repository contains the
|
from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<tryton>
|
<tryton>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
|
64
setup.py
64
setup.py
|
@ -2,7 +2,7 @@
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Always prefer setuptools over distutils
|
# Always prefer setuptools over distutils
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup
|
||||||
# To use a consistent encoding
|
# To use a consistent encoding
|
||||||
from codecs import open
|
from codecs import open
|
||||||
from os import path
|
from os import path
|
||||||
|
@ -36,11 +36,11 @@ with open(path.join(here, 'versiondep.txt'), encoding='utf-8') as f:
|
||||||
l2 = i.strip().split(';')
|
l2 = i.strip().split(';')
|
||||||
if len(l2) < 4:
|
if len(l2) < 4:
|
||||||
continue
|
continue
|
||||||
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 = 6
|
major_version = 6
|
||||||
minor_version = 0
|
minor_version = 6
|
||||||
|
|
||||||
requires = ['python-slugify']
|
requires = ['python-slugify']
|
||||||
for dep in info.get('depends', []):
|
for dep in info.get('depends', []):
|
||||||
|
@ -51,19 +51,21 @@ for dep in info.get('depends', []):
|
||||||
prefix = modversion[dep]['prefix']
|
prefix = modversion[dep]['prefix']
|
||||||
|
|
||||||
if len(modversion[dep]['max']) > 0:
|
if len(modversion[dep]['max']) > 0:
|
||||||
requires.append('%s_%s >= %s, <= %s' %
|
requires.append('%s_%s >= %s, <= %s' % (
|
||||||
(prefix, dep, modversion[dep]['min'], modversion[dep]['max']))
|
prefix, dep, modversion[dep]['min'],
|
||||||
else :
|
modversion[dep]['max']))
|
||||||
requires.append('%s_%s >= %s' %
|
else:
|
||||||
(prefix, dep, modversion[dep]['min']))
|
requires.append('%s_%s >= %s' % (
|
||||||
else :
|
prefix, dep, modversion[dep]['min']))
|
||||||
requires.append('%s_%s >= %s.%s, < %s.%s' %
|
else:
|
||||||
('trytond', dep, major_version, minor_version,
|
requires.append('%s_%s >= %s.%s, < %s.%s' % (
|
||||||
|
'trytond', dep, major_version, minor_version,
|
||||||
major_version, minor_version + 1))
|
major_version, minor_version + 1))
|
||||||
requires.append('trytond >= %s.%s, < %s.%s' %
|
requires.append('trytond >= %s.%s, < %s.%s' % (
|
||||||
(major_version, minor_version, major_version, minor_version + 1))
|
major_version, minor_version, major_version, minor_version + 1))
|
||||||
|
|
||||||
setup(name='%s_%s' % (PREFIX, MODULE),
|
setup(
|
||||||
|
name='%s_%s' % (PREFIX, MODULE),
|
||||||
version=info.get('version', '0.0.1'),
|
version=info.get('version', '0.0.1'),
|
||||||
description='Tryton module to add xrechnung-export to invoice.',
|
description='Tryton module to add xrechnung-export to invoice.',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
|
@ -72,21 +74,22 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
||||||
author_email='service@m-ds.de',
|
author_email='service@m-ds.de',
|
||||||
license='GPL-3',
|
license='GPL-3',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 5 - Production/Stable',
|
'Development Status :: 5 - Production/Stable',
|
||||||
'Environment :: Plugins',
|
'Environment :: Plugins',
|
||||||
'Framework :: Tryton',
|
'Framework :: Tryton',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'Intended Audience :: Customer Service',
|
'Intended Audience :: Customer Service',
|
||||||
'Intended Audience :: Information Technology',
|
'Intended Audience :: Information Technology',
|
||||||
'Intended Audience :: Financial and Insurance Industry',
|
'Intended Audience :: Financial and Insurance Industry',
|
||||||
'Topic :: Office/Business',
|
'Topic :: Office/Business',
|
||||||
'Topic :: Office/Business :: Financial :: Accounting',
|
'Topic :: Office/Business :: Financial :: Accounting',
|
||||||
'Natural Language :: German',
|
'Natural Language :: German',
|
||||||
'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.7',
|
'Programming Language :: Python :: 3.7',
|
||||||
'Programming Language :: Python :: 3.8',
|
'Programming Language :: Python :: 3.8',
|
||||||
|
'Programming Language :: Python :: 3.9',
|
||||||
],
|
],
|
||||||
|
|
||||||
keywords='tryton account invoice xrechnung edocument',
|
keywords='tryton account invoice xrechnung edocument',
|
||||||
|
@ -95,7 +98,8 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
||||||
'trytond.modules.%s' % MODULE,
|
'trytond.modules.%s' % MODULE,
|
||||||
],
|
],
|
||||||
package_data={
|
package_data={
|
||||||
'trytond.modules.%s' % MODULE: (info.get('xml', [])
|
'trytond.modules.%s' % MODULE: (
|
||||||
|
info.get('xml', [])
|
||||||
+ ['tryton.cfg', 'locale/*.po', 'tests/*.py',
|
+ ['tryton.cfg', 'locale/*.po', 'tests/*.py',
|
||||||
'view/*.xml',
|
'view/*.xml',
|
||||||
'report/*.fodt', 'versiondep.txt', 'README.rst']),
|
'report/*.fodt', 'versiondep.txt', 'README.rst']),
|
||||||
|
|
|
@ -1,24 +1,4 @@
|
||||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
# -*- coding: utf-8 -*-
|
||||||
|
# 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.
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
import trytond.tests.test_tryton
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
from trytond.modules.account_invoice_xrechnung.tests.test_invoice import InvoiceTestCase
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['suite']
|
|
||||||
|
|
||||||
|
|
||||||
class XRechnungTestCase(\
|
|
||||||
InvoiceTestCase,\
|
|
||||||
):
|
|
||||||
'Test xrechnung module'
|
|
||||||
module = 'account_invoice_xrechnung'
|
|
||||||
|
|
||||||
# end XRechnungTestCase
|
|
||||||
|
|
||||||
def suite():
|
|
||||||
suite = trytond.tests.test_tryton.suite()
|
|
||||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(XRechnungTestCase))
|
|
||||||
return suite
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# This file is part of the cashbook-module from m-ds for Tryton.
|
# This file is part of the account-invoice-xrechnung-module
|
||||||
# The COPYRIGHT file at the top level of this repository contains the
|
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
# full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||||
|
|
||||||
|
@ -18,4 +18,5 @@ class InvoiceTestCase(ModuleTestCase):
|
||||||
|
|
||||||
# end InvoiceTestCase
|
# end InvoiceTestCase
|
||||||
|
|
||||||
|
|
||||||
del ModuleTestCase
|
del ModuleTestCase
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=6.0.0
|
version=6.6.3
|
||||||
depends:
|
depends:
|
||||||
account_invoice
|
account_invoice
|
||||||
bank
|
bank
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
<!-- This file is part of the account-invoice-xrechnung-module
|
||||||
The COPYRIGHT file at the top level of this repository contains the
|
from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<form col="4">
|
<form col="4">
|
||||||
<label name="invoice"/>
|
<label name="invoice"/>
|
||||||
<field name="invoice"/>
|
<field name="invoice"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# This file is part of the cashbook-module from m-ds for Tryton.
|
# This file is part of the account-invoice-xrechnung-module
|
||||||
# The COPYRIGHT file at the top level of this repository contains the
|
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
# full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
from trytond.model import ModelView, fields
|
from trytond.model import ModelView, fields
|
||||||
from trytond.wizard import Wizard, StateView, StateReport, Button
|
from trytond.wizard import Wizard, StateView, StateReport, Button
|
||||||
|
@ -26,12 +26,13 @@ class RunXRechnungReportStart(ModelView):
|
||||||
'eDocument Export'
|
'eDocument Export'
|
||||||
__name__ = 'account_invoice_xrechnung.runrep.start'
|
__name__ = 'account_invoice_xrechnung.runrep.start'
|
||||||
|
|
||||||
invoice = fields.Many2One(string='Invoice', readonly=True,
|
invoice = fields.Many2One(
|
||||||
|
string='Invoice', readonly=True,
|
||||||
model_name='account.invoice', required=True)
|
model_name='account.invoice', required=True)
|
||||||
state = fields.Char(string='State', readonly=True,
|
state = fields.Char(
|
||||||
states={'invisible': True})
|
string='State', readonly=True, states={'invisible': True})
|
||||||
edocument = fields.Selection(string='Type', required=True,
|
edocument = fields.Selection(
|
||||||
selection=sel_edocument)
|
string='Type', required=True, selection=sel_edocument)
|
||||||
as_zip = fields.Boolean(string='ZIP-File')
|
as_zip = fields.Boolean(string='ZIP-File')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -84,7 +85,7 @@ class RunXRechnungReport(Wizard):
|
||||||
if self.start.state != 'posted':
|
if self.start.state != 'posted':
|
||||||
raise UserError(gettext(
|
raise UserError(gettext(
|
||||||
'account_invoice_xrechnung.msg_invoice_must_posted',
|
'account_invoice_xrechnung.msg_invoice_must_posted',
|
||||||
invname = self.start.invoice.rec_name,
|
invname=self.start.invoice.rec_name,
|
||||||
))
|
))
|
||||||
return action, {
|
return action, {
|
||||||
'invoice': self.start.invoice.id,
|
'invoice': self.start.invoice.id,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
<!-- This file is part of the account-invoice-xrechnung-module
|
||||||
The COPYRIGHT file at the top level of this repository contains the
|
from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<tryton>
|
<tryton>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
|
10
xreport.py
10
xreport.py
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# This file is part of the cashbook-module from m-ds for Tryton.
|
# This file is part of the account-invoice-xrechnung-module
|
||||||
# The COPYRIGHT file at the top level of this repository contains the
|
# from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
# full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
import zipfile
|
import zipfile
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
@ -43,7 +43,7 @@ class XReport(Report):
|
||||||
},
|
},
|
||||||
max_length=100, word_boundary=True, save_order=True)
|
max_length=100, word_boundary=True, save_order=True)
|
||||||
|
|
||||||
if data['as_zip'] == True:
|
if data['as_zip'] is True:
|
||||||
return (
|
return (
|
||||||
'zip',
|
'zip',
|
||||||
cls.compress_as_zip('%(fname)s.%(ext)s' % {
|
cls.compress_as_zip('%(fname)s.%(ext)s' % {
|
||||||
|
@ -52,7 +52,7 @@ class XReport(Report):
|
||||||
}, invoice_string),
|
}, invoice_string),
|
||||||
False,
|
False,
|
||||||
file_name)
|
file_name)
|
||||||
else :
|
else:
|
||||||
return ('xml', invoice_string, False, file_name)
|
return ('xml', invoice_string, False, file_name)
|
||||||
|
|
||||||
# end XReport
|
# end XReport
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- This file is part of the cashbook-module from m-ds for Tryton.
|
<!-- This file is part of the account-invoice-xrechnung-module
|
||||||
The COPYRIGHT file at the top level of this repository contains the
|
from m-ds for Tryton. The COPYRIGHT file at the top level of
|
||||||
full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<tryton>
|
<tryton>
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue