Melya PO
This commit is contained in:
@@ -2,9 +2,4 @@
|
|||||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="//page[@id='costs']" position="inside">
|
|
||||||
<field name="before_carriages" colspan="4"/>
|
|
||||||
|
|
||||||
<field name="after_carriages" colspan="4"/>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -2,14 +2,4 @@
|
|||||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="//page[@id='other']" position="before">
|
|
||||||
<page id="costs" string="Costs">
|
|
||||||
<label name="cost_used"/>
|
|
||||||
<group id="cost_used" col="-1" colspan="3">
|
|
||||||
<field name="cost_used" xexpand="0"/>
|
|
||||||
<field name="cost_currency_used"/>
|
|
||||||
<field name="cost_edit" xexpand="0" xalign="0"/>
|
|
||||||
</group>
|
|
||||||
</page>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -541,10 +541,11 @@ class Sale(metaclass=PoolMeta):
|
|||||||
return lines[0]
|
return lines[0]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _format_report_number(value, digits='0.0000', keep_trailing_decimal=False,
|
def _format_report_number(value, digits='0.0000',
|
||||||
strip_trailing_zeros=True):
|
keep_trailing_decimal=False, strip_trailing_zeros=True,
|
||||||
|
use_grouping=False):
|
||||||
value = Decimal(str(value or 0)).quantize(Decimal(digits))
|
value = Decimal(str(value or 0)).quantize(Decimal(digits))
|
||||||
text = format(value, 'f')
|
text = format(value, ',f' if use_grouping else 'f')
|
||||||
if strip_trailing_zeros:
|
if strip_trailing_zeros:
|
||||||
text = text.rstrip('0').rstrip('.')
|
text = text.rstrip('0').rstrip('.')
|
||||||
if keep_trailing_decimal and '.' not in text:
|
if keep_trailing_decimal and '.' not in text:
|
||||||
@@ -1268,7 +1269,8 @@ class Sale(metaclass=PoolMeta):
|
|||||||
'amount': amount,
|
'amount': amount,
|
||||||
'amount_text': self._format_report_number(
|
'amount_text': self._format_report_number(
|
||||||
amount, digits='0.01',
|
amount, digits='0.01',
|
||||||
strip_trailing_zeros=False),
|
strip_trailing_zeros=False,
|
||||||
|
use_grouping=True),
|
||||||
})
|
})
|
||||||
return lines
|
return lines
|
||||||
|
|
||||||
|
|||||||
@@ -5072,12 +5072,12 @@ class PurchaseTradeTestCase(ModuleTestCase):
|
|||||||
{
|
{
|
||||||
'label': 'FOB value in EUR',
|
'label': 'FOB value in EUR',
|
||||||
'amount': Decimal('2500'),
|
'amount': Decimal('2500'),
|
||||||
'amount_text': '2500.00',
|
'amount_text': '2,500.00',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'label': 'FREIGHT value in EUR',
|
'label': 'FREIGHT value in EUR',
|
||||||
'amount': Decimal('59993.75'),
|
'amount': Decimal('59993.75'),
|
||||||
'amount_text': '59993.75',
|
'amount_text': '59,993.75',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,4 @@
|
|||||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
this repository contains the full copyright notices and license terms. -->
|
this repository contains the full copyright notices and license terms. -->
|
||||||
<data>
|
<data>
|
||||||
<xpath expr="//group[@id='cost_used']" position="after">
|
|
||||||
<label name="cost_sale_used"/>
|
|
||||||
<group id="cost_sale_used" col="-1" colspan="3">
|
|
||||||
<field name="cost_sale_used" xexpand="0"/>
|
|
||||||
<field name="cost_sale_currency_used"/>
|
|
||||||
</group>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -6,14 +6,4 @@ this repository contains the full copyright notices and license terms. -->
|
|||||||
<label name="carrier"/>
|
<label name="carrier"/>
|
||||||
<field name="carrier"/>
|
<field name="carrier"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//page[@id='other']" position="before">
|
|
||||||
<page id="costs" string="Costs">
|
|
||||||
<label name="cost_used"/>
|
|
||||||
<group id="cost_used" col="-1" colspan="3">
|
|
||||||
<field name="cost_used" xexpand="0"/>
|
|
||||||
<field name="cost_currency_used"/>
|
|
||||||
<field name="cost_edit" xexpand="0" xalign="0"/>
|
|
||||||
</group>
|
|
||||||
</page>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
Reference in New Issue
Block a user