erp5_pdm: do not round calculated average unit_price in slice case.
otherwise it loses too much precision.
Showing
-
Owner
@kazuhiko @Nicolas , it seems tests also needs to be adjusted,
testResources
started to fail with this change.====================================================================== FAIL: testGetPriceWithBasePriceDefinedPerSlice (testResource.TestResource) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/slapgrid/slappart0/srv/testnode/aai/soft/ebc3bdb8c4511188df375d0f7981e02c/parts/erp5/Products/ERP5/tests/testResource.py", line 1230, in testGetPriceWithBasePriceDefinedPerSlice _test(**case) File "/srv/slapgrid/slappart0/srv/testnode/aai/soft/ebc3bdb8c4511188df375d0f7981e02c/parts/erp5/Products/ERP5/tests/testResource.py", line 1217, in _test self.assertEqual(price, sale_order_line.getPrice()) AssertionError: 9.90909 != 9.909090909090908
Please register or sign in to comment