xml erzeugen bei 40%

This commit is contained in:
Frederik Jaeckel 2022-10-17 17:20:25 +02:00
parent baf871e506
commit 265e38c24f
12 changed files with 357 additions and 1 deletions

26
edocument.py Normal file
View file

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# This file is part of the edcoment-module for Tryton.
# The COPYRIGHT file at the top level of this repository contains the
# full copyright notices and license terms.
import genshi.template
import os
from trytond.modules.edocument_uncefact.edocument import Invoice
class Invoice(Invoice):
'EDocument XRechnung'
__name__ = 'edocument.xrechnung.invoice'
def _get_template(self, version):
""" load our own template if 'version' is ours
"""
if version == 'XRechnung-2.2':
loader = genshi.template.TemplateLoader(
os.path.join(os.path.dirname(__file__), 'template'),
auto_reload=True)
return loader.load(os.path.join(version, 'XRechnung.xml'))
else :
return super(Invoice, self)._get_template(version)
# end Invoice