5.0: changes for Tryton 5.0
This commit is contained in:
parent
569b4e2fc8
commit
504aab41a1
14 changed files with 34 additions and 33 deletions
|
@ -6,7 +6,7 @@
|
|||
from trytond.pool import Pool
|
||||
from .edocument import XRechnung, FacturX
|
||||
from .bank import AccountNumber
|
||||
from .party import PartyConfiguration, Party
|
||||
from .party import Party, PartyIdentifier
|
||||
from .configuration import Configuration, BankEdocumentRel
|
||||
|
||||
|
||||
|
@ -18,5 +18,5 @@ def register():
|
|||
BankEdocumentRel,
|
||||
FacturX,
|
||||
Party,
|
||||
PartyConfiguration,
|
||||
PartyIdentifier,
|
||||
module='edocument_xrechnung', type_='model')
|
||||
|
|
|
@ -46,7 +46,7 @@ msgstr "Für die Adresse der Partei '%(party)s' ist kein Land festgelegt."
|
|||
#######################
|
||||
# party.configuration #
|
||||
#######################
|
||||
msgctxt "selection:party.configuration,identifier_types:"
|
||||
msgctxt "selection:party.identifier,type:"
|
||||
msgid "X-Rechnung Route-ID"
|
||||
msgstr "X-Rechnung Leitweg-ID"
|
||||
|
||||
|
|
|
@ -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'."
|
||||
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"
|
||||
msgstr "X-Rechnung Route-ID"
|
||||
|
||||
|
|
4
mixin.py
4
mixin.py
|
@ -7,8 +7,8 @@
|
|||
from decimal import Decimal
|
||||
import html
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.i18n import gettext
|
||||
from trytond.tools import cached_property
|
||||
from trytond.modules.tryton6_backport.i18n import gettext
|
||||
from cached_property import cached_property
|
||||
from trytond.pool import Pool
|
||||
|
||||
|
||||
|
|
26
party.py
26
party.py
|
@ -5,10 +5,22 @@
|
|||
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.exceptions import UserError
|
||||
from trytond.i18n import gettext
|
||||
from trytond.modules.tryton6_backport.i18n import gettext
|
||||
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):
|
||||
__name__ = 'party.party'
|
||||
|
||||
|
@ -50,15 +62,3 @@ class Party(metaclass=PoolMeta):
|
|||
record.get_xrechnung_route_id()
|
||||
|
||||
# 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
|
||||
|
|
|
@ -24,7 +24,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</ram:SpecifiedTaxRegistration>
|
||||
</py:def>
|
||||
<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()">
|
||||
<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>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
|
||||
<py:def function="TaxSubTotal(value)">
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.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:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
${TaxCategory(value.tax, True)}
|
||||
</cac:TaxCategory>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
|
||||
<py:def function="TaxSubTotal(value)">
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${value.base}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${value.amount}</cbc:TaxAmount>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.base}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.amount}</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
${TaxCategory(value.tax, True)}
|
||||
</cac:TaxCategory>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
|
||||
<py:def function="TaxSubTotal(value)">
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.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:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
${TaxCategory(value.tax, True)}
|
||||
</cac:TaxCategory>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
|
||||
<py:def function="TaxSubTotal(value)">
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${value.base}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${value.amount}</cbc:TaxAmount>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.base}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.amount}</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
${TaxCategory(value.tax, True)}
|
||||
</cac:TaxCategory>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
|
||||
<py:def function="TaxSubTotal(value)">
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.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:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.base)}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${this.negate_amount(value.amount)}</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
${TaxCategory(value.tax, True)}
|
||||
</cac:TaxCategory>
|
||||
|
|
|
@ -59,8 +59,8 @@
|
|||
|
||||
<py:def function="TaxSubTotal(value)">
|
||||
<cac:TaxSubtotal>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.currency.code}">${value.base}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.currency.code}">${value.amount}</cbc:TaxAmount>
|
||||
<cbc:TaxableAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.base}</cbc:TaxableAmount>
|
||||
<cbc:TaxAmount py:attrs="{'currencyID': value.invoice.currency.code}">${value.amount}</cbc:TaxAmount>
|
||||
<cac:TaxCategory>
|
||||
${TaxCategory(value.tax, True)}
|
||||
</cac:TaxCategory>
|
||||
|
|
|
@ -5,6 +5,7 @@ depends:
|
|||
party
|
||||
bank
|
||||
account_invoice
|
||||
tryton6_backport
|
||||
xml:
|
||||
message.xml
|
||||
configuration.xml
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
full copyright notices and license terms. -->
|
||||
<data>
|
||||
|
||||
<xpath expr="/form/separator[@id='move']" position="after">
|
||||
<xpath expr="/form/separator[@id='invoice']" position="before">
|
||||
|
||||
<separator id="edocument" colspan="4" string="eDocument"/>
|
||||
<field name="edocument_bank" colspan="2" height="200"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue