configuration - add erechnung default report
This commit is contained in:
parent
34f3922a44
commit
26388d3816
4 changed files with 146 additions and 3 deletions
|
@ -7,11 +7,15 @@
|
|||
from trytond.pool import PoolMeta, Pool
|
||||
from trytond.model import ModelSQL, fields
|
||||
from trytond.modules.company.model import CompanyValueMixin
|
||||
from .wizard_runreport import sel_edocument
|
||||
|
||||
|
||||
class Configuration(metaclass=PoolMeta):
|
||||
__name__ = 'account.configuration'
|
||||
|
||||
xrechn_default = fields.MultiValue(fields.Selection(
|
||||
string='Export mode', selection=sel_edocument,
|
||||
help='Pre-set export format for e-invoices.'))
|
||||
xrechn_zugferd_report = fields.MultiValue(fields.Many2One(
|
||||
model_name='ir.action.report',
|
||||
domain=[
|
||||
|
@ -25,11 +29,14 @@ class Configuration(metaclass=PoolMeta):
|
|||
""" select table
|
||||
"""
|
||||
pool = Pool()
|
||||
if field in {
|
||||
'xrechn_zugferd_report'}:
|
||||
if field in {'xrechn_zugferd_report', 'xrechn_default'}:
|
||||
return pool.get('account_invoice_xrechnung.configuration')
|
||||
return super(Configuration, cls).multivalue_model(field)
|
||||
|
||||
@classmethod
|
||||
def default_xrechn_default(cls, **pattern):
|
||||
return cls.multivalue_model('xrechn_default').default_xrechn_default()
|
||||
|
||||
# end Configuration
|
||||
|
||||
|
||||
|
@ -37,6 +44,9 @@ class ConfigurationXRechnungexport(ModelSQL, CompanyValueMixin):
|
|||
"Account Configuration XRechnung Export"
|
||||
__name__ = 'account_invoice_xrechnung.configuration'
|
||||
|
||||
xrechn_default = fields.Selection(
|
||||
string='Export mode', selection=sel_edocument,
|
||||
help='Pre-set export format for e-invoices.')
|
||||
xrechn_zugferd_report = fields.Many2One(
|
||||
model_name='ir.action.report',
|
||||
string='ZUGFeRD-Report',
|
||||
|
@ -45,4 +55,8 @@ class ConfigurationXRechnungexport(ModelSQL, CompanyValueMixin):
|
|||
('extension', '=', 'pdf')],
|
||||
help='Report that is to be used to generate the ZUGFeRD PDF.')
|
||||
|
||||
@classmethod
|
||||
def default_xrechn_default(cls, **pattern):
|
||||
return 'edocument.facturxext.invoice-ferd'
|
||||
|
||||
# end ConfigurationXRechnungexport
|
||||
|
|
64
locale/de.po
64
locale/de.po
|
@ -98,6 +98,38 @@ msgctxt "help:account.configuration,xrechn_zugferd_report:"
|
|||
msgid "Report that is to be used to generate the ZUGFeRD PDF."
|
||||
msgstr "Report, welcher zum erzeugen der ZUGFeRD-PDF verwendet werden soll."
|
||||
|
||||
msgctxt "field:account.configuration,xrechn_default:"
|
||||
msgid "Export mode"
|
||||
msgstr "Exportformat"
|
||||
|
||||
msgctxt "help:account.configuration,xrechn_default:"
|
||||
msgid "Pre-set export format for e-invoices."
|
||||
msgstr "Voreingstelltes Exportformat für die eRechnung."
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.2"
|
||||
msgstr "XRechnung UBL Invoice 2.2"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.3"
|
||||
msgstr "XRechnung UBL Invoice 2.3"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 3.0"
|
||||
msgstr "XRechnung UBL Invoice 3.0"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "Factur-X Extended"
|
||||
msgstr "Factur-X Extended"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "ZUGFeRD 2.3.2"
|
||||
msgstr "ZUGFeRD 2.3.2"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "CII CrossIndustryInvoice D16B"
|
||||
msgstr "CII CrossIndustryInvoice D16B"
|
||||
|
||||
|
||||
###########################################
|
||||
# account_invoice_xrechnung.configuration #
|
||||
|
@ -113,3 +145,35 @@ msgstr "ZUGFeRD-Report"
|
|||
msgctxt "help:account_invoice_xrechnung.configuration,xrechn_zugferd_report:"
|
||||
msgid "Report that is to be used to generate the ZUGFeRD PDF."
|
||||
msgstr "Report, welcher zum erzeugen der ZUGFeRD-PDF verwendet werden soll."
|
||||
|
||||
msgctxt "field:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "Export mode"
|
||||
msgstr "Exportformat"
|
||||
|
||||
msgctxt "help:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "Pre-set export format for e-invoices."
|
||||
msgstr "Voreingstelltes Exportformat für die eRechnung."
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.2"
|
||||
msgstr "XRechnung UBL Invoice 2.2"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.3"
|
||||
msgstr "XRechnung UBL Invoice 2.3"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 3.0"
|
||||
msgstr "XRechnung UBL Invoice 3.0"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "Factur-X Extended"
|
||||
msgstr "Factur-X Extended"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "ZUGFeRD 2.3.2"
|
||||
msgstr "ZUGFeRD 2.3.2"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "CII CrossIndustryInvoice D16B"
|
||||
msgstr "CII CrossIndustryInvoice D16B"
|
||||
|
|
64
locale/en.po
64
locale/en.po
|
@ -78,6 +78,38 @@ msgctxt "help:account.configuration,xrechn_zugferd_report:"
|
|||
msgid "Report that is to be used to generate the ZUGFeRD PDF."
|
||||
msgstr "Report that is to be used to generate the ZUGFeRD PDF."
|
||||
|
||||
msgctxt "field:account.configuration,xrechn_default:"
|
||||
msgid "Export mode"
|
||||
msgstr "Export mode"
|
||||
|
||||
msgctxt "help:account.configuration,xrechn_default:"
|
||||
msgid "Pre-set export format for e-invoices."
|
||||
msgstr "Pre-set export format for e-invoices."
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.2"
|
||||
msgstr "XRechnung UBL Invoice 2.2"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.3"
|
||||
msgstr "XRechnung UBL Invoice 2.3"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 3.0"
|
||||
msgstr "XRechnung UBL Invoice 3.0"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "Factur-X Extended"
|
||||
msgstr "Factur-X Extended"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "ZUGFeRD 2.3.2"
|
||||
msgstr "ZUGFeRD 2.3.2"
|
||||
|
||||
msgctxt "selection:account.configuration,xrechn_default:"
|
||||
msgid "CII CrossIndustryInvoice D16B"
|
||||
msgstr "CII CrossIndustryInvoice D16B"
|
||||
|
||||
msgctxt "model:account_invoice_xrechnung.configuration:"
|
||||
msgid "Account Configuration XRechnung Export"
|
||||
msgstr "Account Configuration XRechnung Export"
|
||||
|
@ -89,3 +121,35 @@ msgstr "ZUGFeRD-Report"
|
|||
msgctxt "help:account_invoice_xrechnung.configuration,xrechn_zugferd_report:"
|
||||
msgid "Report that is to be used to generate the ZUGFeRD PDF."
|
||||
msgstr "Report that is to be used to generate the ZUGFeRD PDF."
|
||||
|
||||
msgctxt "field:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "Export mode"
|
||||
msgstr "Export mode"
|
||||
|
||||
msgctxt "help:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "Pre-set export format for e-invoices."
|
||||
msgstr "Pre-set export format for e-invoices."
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.2"
|
||||
msgstr "XRechnung UBL Invoice 2.2"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 2.3"
|
||||
msgstr "XRechnung UBL Invoice 2.3"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "XRechnung UBL Invoice 3.0"
|
||||
msgstr "XRechnung UBL Invoice 3.0"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "Factur-X Extended"
|
||||
msgstr "Factur-X Extended"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "ZUGFeRD 2.3.2"
|
||||
msgstr "ZUGFeRD 2.3.2"
|
||||
|
||||
msgctxt "selection:account_invoice_xrechnung.configuration,xrechn_default:"
|
||||
msgid "CII CrossIndustryInvoice D16B"
|
||||
msgstr "CII CrossIndustryInvoice D16B"
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
<separator id="xrechnung" colspan="4" string="ZUGFeRD - e-Invoice"/>
|
||||
<label name="xrechn_zugferd_report"/>
|
||||
<field name="xrechn_zugferd_report"/>
|
||||
<newline/>
|
||||
<label name="xrechn_default"/>
|
||||
<field name="xrechn_default"/>
|
||||
|
||||
</xpath>
|
||||
|
||||
|
|
Loading…
Reference in a new issue