Merge branch 'various_fixes'
This commit is contained in:
commit
6c47581745
3 changed files with 20 additions and 7 deletions
11
locale/de.po
11
locale/de.po
|
@ -16,7 +16,7 @@ msgstr "Für die Steuer '%(taxname)s' ist die UNECE-Steuerkategorie nicht konfig
|
||||||
|
|
||||||
msgctxt "model:ir.message,text:msg_tax_code_missing"
|
msgctxt "model:ir.message,text:msg_tax_code_missing"
|
||||||
msgid "The UNECE tax code is not configured for tax '%(taxname)s'."
|
msgid "The UNECE tax code is not configured for tax '%(taxname)s'."
|
||||||
msgstr "Für die Steuer '%(taxname)s' ist der UNECE-Einheitencode nicht konfiguriert."
|
msgstr "Für die Steuer '%(taxname)s' ist der UNECE Steuercode nicht konfiguriert."
|
||||||
|
|
||||||
msgctxt "model:ir.message,text:msg_uom_code_missing"
|
msgctxt "model:ir.message,text:msg_uom_code_missing"
|
||||||
msgid "The UNECE uom code is not configured for unit '%(uomname)s'."
|
msgid "The UNECE uom code is not configured for unit '%(uomname)s'."
|
||||||
|
@ -63,9 +63,12 @@ msgid "X-Rechnung Route-ID"
|
||||||
msgstr "X-Rechnung Leitweg-ID"
|
msgstr "X-Rechnung Leitweg-ID"
|
||||||
|
|
||||||
msgctxt "help:party.party,xrechnung_routeid:"
|
msgctxt "help:party.party,xrechnung_routeid:"
|
||||||
msgid "Enables the need for an XRechnung route ID at the party for exporting the XRechnung."
|
msgid ""
|
||||||
msgstr "Aktiviert die Notwendigkeit einer XRechnung-Leitweg-ID an der Partei für den Export der XRechnung."
|
"When activated an XRechnung route ID must be used for this party for X-Rechnung exports.\n"
|
||||||
|
"The route ID must be defined as identifier of type \"X-Rechnung Route-ID\"."
|
||||||
|
msgstr ""
|
||||||
|
"Bei Aktivierung muss eine XRechnung-Leitweg-ID bei Rechnungsexporten für diese Partei benutzt werden.\n"
|
||||||
|
"Die Leitweg-ID muss als Identifikator mit Typ \"X-Rechnung Route-ID\" angelegt werden."
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# account.tax #
|
# account.tax #
|
||||||
|
|
10
mixin.py
10
mixin.py
|
@ -144,12 +144,20 @@ class EdocumentMixin(object):
|
||||||
def tax_unece_code(self, tax):
|
def tax_unece_code(self, tax):
|
||||||
""" 'tax': invoice.line
|
""" 'tax': invoice.line
|
||||||
"""
|
"""
|
||||||
if not (tax.unece_code or ''):
|
unece_code = self.get_tax_unece_code(tax)
|
||||||
|
if not unece_code:
|
||||||
raise UserError(gettext(
|
raise UserError(gettext(
|
||||||
'edocument_xrechnung.msg_tax_code_missing',
|
'edocument_xrechnung.msg_tax_code_missing',
|
||||||
taxname=tax.rec_name))
|
taxname=tax.rec_name))
|
||||||
return tax.unece_code
|
return tax.unece_code
|
||||||
|
|
||||||
|
def get_tax_unece_code(self, tax):
|
||||||
|
while tax:
|
||||||
|
if tax.unece_code:
|
||||||
|
return tax.unece_code
|
||||||
|
break
|
||||||
|
tax = tax.parent
|
||||||
|
|
||||||
def get_category_code(self, tax):
|
def get_category_code(self, tax):
|
||||||
while tax:
|
while tax:
|
||||||
if tax.unece_category_code:
|
if tax.unece_category_code:
|
||||||
|
|
6
party.py
6
party.py
|
@ -14,8 +14,10 @@ class Party(metaclass=PoolMeta):
|
||||||
|
|
||||||
xrechnung_routeid = fields.Boolean(
|
xrechnung_routeid = fields.Boolean(
|
||||||
string='X-Rechnung Route-ID',
|
string='X-Rechnung Route-ID',
|
||||||
help='Enables the need for an XRechnung route ID at the party ' +
|
help='When activated an XRechnung route ID must be used '
|
||||||
'for exporting the XRechnung.')
|
'for this party for X-Rechnung exports.\n'
|
||||||
|
'The route ID must be defined as identifier of type '
|
||||||
|
'"X-Rechnung Route-ID".')
|
||||||
|
|
||||||
def get_xrechnung_route_id(self):
|
def get_xrechnung_route_id(self):
|
||||||
""" search for route-id at party, fire-exception if missing
|
""" search for route-id at party, fire-exception if missing
|
||||||
|
|
Loading…
Reference in a new issue