Commit 4af02a86 authored by Alexandre Boeglin's avatar Alexandre Boeglin

set base_unit_quantity of the resource, and use it to round the amount of

invoice transaction lines before checking them


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13905 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent df403d61
......@@ -162,8 +162,10 @@ class TestInvoice(TestPackingListMixin,
currency_module = self.getCurrencyModule()
if len(currency_module.objectValues(id='EUR'))==0:
currency = self.getCurrencyModule().newContent(
portal_type = 'Currency',
id = "EUR" )
portal_type='Currency',
id="EUR",
base_unit_quantity=0.01,
)
currency = currency_module.objectValues(id='EUR')[0]
sequence.edit(currency = currency)
......@@ -588,7 +590,9 @@ class TestInvoice(TestPackingListMixin,
break
else:
self.fail('No line found that matches %s' % line_id)
self.assertEquals(line.getQuantity(), expected_price * line_ratio)
resource_precision = line.getResourceValue().getQuantityPrecision()
self.assertEquals(round(line.getQuantity(), resource_precision),
round(expected_price * line_ratio, resource_precision))
def stepCheckDeliveryRuleForDeferred(
self, sequence=None, sequence_list=None, **kw):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment