5.0: changes for Tryton 5.0

This commit is contained in:
Frederik Jaeckel 2024-12-11 10:31:19 +01:00
parent 569b4e2fc8
commit 504aab41a1
14 changed files with 34 additions and 33 deletions

View file

@ -6,7 +6,7 @@
from trytond.pool import Pool from trytond.pool import Pool
from .edocument import XRechnung, FacturX from .edocument import XRechnung, FacturX
from .bank import AccountNumber from .bank import AccountNumber
from .party import PartyConfiguration, Party from .party import Party, PartyIdentifier
from .configuration import Configuration, BankEdocumentRel from .configuration import Configuration, BankEdocumentRel
@ -18,5 +18,5 @@ def register():
BankEdocumentRel, BankEdocumentRel,
FacturX, FacturX,
Party, Party,
PartyConfiguration, PartyIdentifier,
module='edocument_xrechnung', type_='model') module='edocument_xrechnung', type_='model')

View file

@ -46,7 +46,7 @@ msgstr "Für die Adresse der Partei '%(party)s' ist kein Land festgelegt."
####################### #######################
# party.configuration # # party.configuration #
####################### #######################
msgctxt "selection:party.configuration,identifier_types:" msgctxt "selection:party.identifier,type:"
msgid "X-Rechnung Route-ID" msgid "X-Rechnung Route-ID"
msgstr "X-Rechnung Leitweg-ID" msgstr "X-Rechnung Leitweg-ID"

View file

@ -38,7 +38,7 @@ msgctxt "model:ir.message,text:msg_no_address_country"
msgid "No country is specified for the address of the party '%(party)s'." msgid "No country is specified for the address of the party '%(party)s'."
msgstr "No country is specified for the address of the party '%(party)s'." msgstr "No country is specified for the address of the party '%(party)s'."
msgctxt "selection:party.configuration,identifier_types:" msgctxt "selection:party.identifier,type:"
msgid "X-Rechnung Route-ID" msgid "X-Rechnung Route-ID"
msgstr "X-Rechnung Route-ID" msgstr "X-Rechnung Route-ID"

View file

@ -7,8 +7,8 @@
from decimal import Decimal from decimal import Decimal
import html import html
from trytond.exceptions import UserError from trytond.exceptions import UserError
from trytond.i18n import gettext from trytond.modules.tryton6_backport.i18n import gettext
from trytond.tools import cached_property from cached_property import cached_property
from trytond.pool import Pool from trytond.pool import Pool

View file

@ -5,10 +5,22 @@
from trytond.pool import PoolMeta from trytond.pool import PoolMeta
from trytond.exceptions import UserError from trytond.exceptions import UserError
from trytond.i18n import gettext from trytond.modules.tryton6_backport.i18n import gettext
from trytond.model import fields from trytond.model import fields
class PartyIdentifier(metaclass=PoolMeta):
__name__ = 'party.identifier'
@classmethod
def __setup__(cls):
super(PartyIdentifier, cls).__setup__()
cls.type.selection.append(
('edoc_route_id', 'X-Rechnung Route-ID'))
# end PartyIdentifier
class Party(metaclass=PoolMeta): class Party(metaclass=PoolMeta):
__name__ = 'party.party' __name__ = 'party.party'
@ -50,15 +62,3 @@ class Party(metaclass=PoolMeta):
record.get_xrechnung_route_id() record.get_xrechnung_route_id()
# end Party # 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

View file

@ -24,7 +24,7 @@ this repository contains the full copyright notices and license terms. -->
</ram:SpecifiedTaxRegistration> </ram:SpecifiedTaxRegistration>
</py:def> </py:def>
<py:def function="TradeAddress(address)"> <py:def function="TradeAddress(address)">
<ram:PostcodeCode py:if="address.postal_code">${address.postal_code}</ram:PostcodeCode> <ram:PostcodeCode py:if="address.zip">${address.zip}</ram:PostcodeCode>
<py:with vars="lines = (address.street or '').splitlines()"> <py:with vars="lines = (address.street or '').splitlines()">
<ram:LineOne py:if="len(lines) > 0">${this.quote_text(lines[0])}</ram:LineOne> <ram:LineOne py:if="len(lines) > 0">${this.quote_text(lines[0])}</ram:LineOne>
<ram:LineTwo py:if="len(lines) > 1">${this.quote_text(lines[1])}</ram:LineTwo> <ram:LineTwo py:if="len(lines) > 1">${this.quote_text(lines[1])}</ram:LineTwo>

View file

@ -59,8 +59,8 @@
<py:def function="TaxSubTotal(value)"> <py:def function="TaxSubTotal(value)">
<cac:TaxSubtotal> <cac:TaxSubtotal>
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount> <cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount>
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount> <cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount>
<cac:TaxCategory> <cac:TaxCategory>
${TaxCategory(value.tax, True)} ${TaxCategory(value.tax, True)}
</cac:TaxCategory> </cac:TaxCategory>

View file

@ -59,8 +59,8 @@
<py:def function="TaxSubTotal(value)"> <py:def function="TaxSubTotal(value)">
<cac:TaxSubtotal> <cac:TaxSubtotal>
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${value.base}</cbc:TaxableAmount> <cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.base}</cbc:TaxableAmount>
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${value.amount}</cbc:TaxAmount> <cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.amount}</cbc:TaxAmount>
<cac:TaxCategory> <cac:TaxCategory>
${TaxCategory(value.tax, True)} ${TaxCategory(value.tax, True)}
</cac:TaxCategory> </cac:TaxCategory>

View file

@ -59,8 +59,8 @@
<py:def function="TaxSubTotal(value)"> <py:def function="TaxSubTotal(value)">
<cac:TaxSubtotal> <cac:TaxSubtotal>
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount> <cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount>
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount> <cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount>
<cac:TaxCategory> <cac:TaxCategory>
${TaxCategory(value.tax, True)} ${TaxCategory(value.tax, True)}
</cac:TaxCategory> </cac:TaxCategory>

View file

@ -59,8 +59,8 @@
<py:def function="TaxSubTotal(value)"> <py:def function="TaxSubTotal(value)">
<cac:TaxSubtotal> <cac:TaxSubtotal>
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${value.base}</cbc:TaxableAmount> <cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.base}</cbc:TaxableAmount>
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${value.amount}</cbc:TaxAmount> <cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.amount}</cbc:TaxAmount>
<cac:TaxCategory> <cac:TaxCategory>
${TaxCategory(value.tax, True)} ${TaxCategory(value.tax, True)}
</cac:TaxCategory> </cac:TaxCategory>

View file

@ -59,8 +59,8 @@
<py:def function="TaxSubTotal(value)"> <py:def function="TaxSubTotal(value)">
<cac:TaxSubtotal> <cac:TaxSubtotal>
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount> <cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount>
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount> <cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount>
<cac:TaxCategory> <cac:TaxCategory>
${TaxCategory(value.tax, True)} ${TaxCategory(value.tax, True)}
</cac:TaxCategory> </cac:TaxCategory>

View file

@ -59,8 +59,8 @@
<py:def function="TaxSubTotal(value)"> <py:def function="TaxSubTotal(value)">
<cac:TaxSubtotal> <cac:TaxSubtotal>
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${value.base}</cbc:TaxableAmount> <cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.base}</cbc:TaxableAmount>
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${value.amount}</cbc:TaxAmount> <cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.amount}</cbc:TaxAmount>
<cac:TaxCategory> <cac:TaxCategory>
${TaxCategory(value.tax, True)} ${TaxCategory(value.tax, True)}
</cac:TaxCategory> </cac:TaxCategory>

View file

@ -5,6 +5,7 @@ depends:
party party
bank bank
account_invoice account_invoice
tryton6_backport
xml: xml:
message.xml message.xml
configuration.xml configuration.xml

View file

@ -4,7 +4,7 @@
full copyright notices and license terms. --> full copyright notices and license terms. -->
<data> <data>
<xpath expr="/form/separator[@id='move']" position="after"> <xpath expr="/form/separator[@id='invoice']" position="before">
<separator id="edocument" colspan="4" string="eDocument"/> <separator id="edocument" colspan="4" string="eDocument"/>
<field name="edocument_bank" colspan="2" height="200"/> <field name="edocument_bank" colspan="2" height="200"/>