Compare commits
3 commits
ver-6.8.12
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a5bf930e55 | ||
![]() |
ea5a83d7c1 | ||
![]() |
02221601e7 |
4 changed files with 19 additions and 7 deletions
|
@ -1,7 +1,5 @@
|
|||
Copyright (C) 2015-2023 Cédric Krier.
|
||||
Copyright (C) 2015-2023 B2CK SPRL.
|
||||
Copyright (C) 2021-2024 martin-data services.
|
||||
Copyright (C) 2024 Mathias Behrle
|
||||
Copyright (C) 2021-2025 martin-data services.
|
||||
Copyright (C) 2024-2025 Mathias Behrle
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
14
mixin.py
14
mixin.py
|
@ -10,6 +10,7 @@ from trytond.exceptions import UserError
|
|||
from trytond.i18n import gettext
|
||||
from trytond.tools import cached_property
|
||||
from trytond.pool import Pool
|
||||
from trytond.modules.product import round_price
|
||||
|
||||
|
||||
class EdocumentMixin(object):
|
||||
|
@ -183,6 +184,19 @@ class EdocumentMixin(object):
|
|||
taxname=tax.rec_name))
|
||||
return unece_category_code
|
||||
|
||||
def round_unitprice(self, value):
|
||||
""" round value by digits in unit_price of account.invoice.line
|
||||
|
||||
Args:
|
||||
value (Decimal): unit-price
|
||||
|
||||
Returns:
|
||||
Decimal: rounded value
|
||||
"""
|
||||
if value is not None:
|
||||
return round_price(value)
|
||||
return value
|
||||
|
||||
def quote_text(self, text):
|
||||
""" replace critical chars
|
||||
"""
|
||||
|
|
4
setup.py
4
setup.py
|
@ -13,11 +13,9 @@ here = path.abspath(path.dirname(__file__))
|
|||
MODULE = 'edocument_xrechnung'
|
||||
PREFIX = 'mds'
|
||||
|
||||
# Get the long description from the README file
|
||||
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
|
||||
long_description = f.read()
|
||||
|
||||
# tryton.cfg einlesen
|
||||
config = ConfigParser()
|
||||
config.readfp(open('tryton.cfg'))
|
||||
info = dict(config.items('tryton'))
|
||||
|
@ -87,6 +85,8 @@ setup(
|
|||
'Programming Language :: Python :: 3.8',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
'Programming Language :: Python :: 3.12',
|
||||
],
|
||||
|
||||
keywords='tryton xrechnung edcoument',
|
||||
|
|
|
@ -76,7 +76,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</ram:SpecifiedTradeProduct>
|
||||
<ram:SpecifiedLineTradeAgreement>
|
||||
<ram:NetPriceProductTradePrice>
|
||||
<ram:ChargeAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.invoice.currency.round(line.unit_price)}</ram:ChargeAmount>
|
||||
<ram:ChargeAmount py:attrs="{'currencyID': this.invoice.currency.code}">${this.round_unitprice(line.unit_price)}</ram:ChargeAmount>
|
||||
</ram:NetPriceProductTradePrice>
|
||||
</ram:SpecifiedLineTradeAgreement>
|
||||
<ram:SpecifiedLineTradeDelivery>
|
||||
|
|
Loading…
Reference in a new issue