xml erzeugen bei 40%
This commit is contained in:
parent
baf871e506
commit
265e38c24f
12 changed files with 357 additions and 1 deletions
37
party.py
Normal file
37
party.py
Normal file
|
@ -0,0 +1,37 @@
|
|||
# -*- 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.
|
||||
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.i18n import gettext
|
||||
|
||||
|
||||
class Party(metaclass=PoolMeta):
|
||||
__name__ = 'party.party'
|
||||
|
||||
def get_xrechnung_route_id(self):
|
||||
""" search for route-id at party, fire-exception if missing
|
||||
"""
|
||||
for ident in self.identifiers:
|
||||
if ident.type == 'edoc_route_id':
|
||||
return ident.code
|
||||
raise UserError(gettext(
|
||||
'edocument_xrechnung.msg_missing_xrechnung_route_id',
|
||||
partyname = self.rec_name,
|
||||
))
|
||||
# end Party
|
||||
|
||||
|
||||
class PartyConfiguration(metaclass=PoolMeta):
|
||||
__name__ = 'party.configuration'
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(PartyConfiguration, cls).__setup__()
|
||||
cls.identifier_types.selection.append(
|
||||
('edoc_route_id', 'X-Rechnung Route-ID')
|
||||
)
|
||||
|
||||
# end Configuration
|
Loading…
Add table
Add a link
Reference in a new issue