49 lines
1.6 KiB
Python
49 lines
1.6 KiB
Python
![]() |
# -*- 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.
|
||
|
|
||
|
|
||
|
from trytond.pool import PoolMeta, Pool
|
||
|
from trytond.model import ModelSQL, fields
|
||
|
from trytond.modules.company.model import CompanyValueMixin
|
||
|
|
||
|
|
||
|
class Configuration(metaclass=PoolMeta):
|
||
|
__name__ = 'account.configuration'
|
||
|
|
||
|
xrechn_zugferd_report = fields.MultiValue(fields.Many2One(
|
||
|
model_name='ir.action.report',
|
||
|
domain=[
|
||
|
('model', '=', 'account.invoice'),
|
||
|
('extension', '=', 'pdf')],
|
||
|
string='ZUGFeRD-Report',
|
||
|
help='Report that is to be used to generate the ZUGFeRD PDF.'))
|
||
|
|
||
|
@classmethod
|
||
|
def multivalue_model(cls, field):
|
||
|
""" select table
|
||
|
"""
|
||
|
pool = Pool()
|
||
|
if field in {
|
||
|
'xrechn_zugferd_report'}:
|
||
|
return pool.get('account_invoice_xrechnung.configuration')
|
||
|
return super(Configuration, cls).multivalue_model(field)
|
||
|
|
||
|
# end Configuration
|
||
|
|
||
|
|
||
|
class ConfigurationXRechnungexport(ModelSQL, CompanyValueMixin):
|
||
|
"Account Configuration XRechnung Export"
|
||
|
__name__ = 'account_invoice_xrechnung.configuration'
|
||
|
|
||
|
xrechn_zugferd_report = fields.Many2One(
|
||
|
model_name='ir.action.report',
|
||
|
string='ZUGFeRD-Report',
|
||
|
domain=[
|
||
|
('model', '=', 'account.invoice'),
|
||
|
('extension', '=', 'pdf')],
|
||
|
help='Report that is to be used to generate the ZUGFeRD PDF.')
|
||
|
|
||
|
# end ConfigurationXRechnungexport
|