[Erp5-dev] Dates divergency, even if dates are exact...

Łukasz Nowak lukasz.nowak at ventis.com.pl
Wed Mar 19 11:50:02 CET 2008


Hello,

On 2008-03-17, 11:14:20
Jean-Paul Smets <jp at nexedi.com> wrote:

> Hi,
> 
> Although this does not answer your exact question, I recommend for
> divergency testing (ie. rules) to include some tolerance, both for
> quantity and other values. I am not sure whether this is fully
> implemented yet.

We've got such issues - as we are using price as divergence property,
and in our system, price is calculated from many simulation movements
to one delivery line. It is working "enough" good for us.

I'm attaching patch, which is passing our unit test suite - float
rounding on calculated prices tests are passed, and rest of test suite
is still not destroyed (this do not prove anything, I'm just proud ;) ).

Any comments, ideas, usage welcome. 6 is enough for us. Someone might
use less/more precision.

As you said - it might be quite nice to have configurable precision on
property divergence in rule definition.

Regards,
Luke

-- 
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PropertyDivergenceTester.py-almost-equality.patch
Type: text/x-patch
Size: 1157 bytes
Desc: not available
URL: <http://mail.tiolive.com/pipermail/erp5-dev/attachments/20080319/57371e5f/attachment.bin>


More information about the Erp5-dev mailing list