Comment 5 for bug 749976

Revision history for this message
Graeme Gellatly (gdgellatly) wrote : Re: [Bug 749976] Re: Wrong Unit Price Computed When UoM is Changed in the Sale Order of OpenERP 6.0.2

I decided to try and replicate with latest sources and track this bug down
and it didn''t happen, worked fine although maybe it is just my modules.
However I did notice that there is a precision related bug in converting uom
to smaller amounts.

Take this scenario.

Default UOM is 1kg and the net price is 4.99 / kg on a pricelist. Change it
to 1000 grams and you will see the net price is $0.00. One would expect
1000g = 1kg = $4.99

Extreme example I know, but lets say it was $14.99 per kilo, how much is
1000 grams

To my mind it should be $14.99 but OpenERP says it is $10.00 if I change the
price to $15.00 / kg then 1000 grams is $20.00.

What about a much more realistic $44.99/kg and the guy wants 800 grams.
Enter 0.8 kg and you charge $35.99. Enter 800 grams and it is $32.00

IMO net total price should be based on the default UOM or else calculations
done on the raw, rather than truncated float.

Will report seperately

On Tue, May 10, 2011 at 8:14 PM, Graeme Gellatly <email address hidden>wrote:

> Hmm just looking at the numbers it is the double calculation problem -
> seems it gets reported / updated every week but obviously not fixed.
>
> so basically you have 50 * 10 * 10 and
> 50 /2 /2
>
> A quick search of bugs will probably find the duplicates.
>
>
> On Tue, May 10, 2011 at 5:57 PM, snook <email address hidden> wrote:
>
>> Looks like is related to https://bugs.launchpad.net/bugs/716289
>>
>> A bug related to financial calculations is a critical bug from my point
>> of view, but then I am not an accountant.
>>
>> --
>> You received this bug notification because you are subscribed to OpenERP
>> Addons.
>> https://bugs.launchpad.net/bugs/749976
>>
>> Title:
>> Wrong Unit Price Computed When UoM is Changed in the Sale Order of
>> OpenERP 6.0.2
>>
>> Status in OpenERP Modules (addons):
>> Confirmed
>>
>> Bug description:
>> I'm testing the OpenERP 6.0.2 with the demo data.
>> I just encountered a problem regarding the wrong unit price in the sale
>> order if the UoM is changed.
>> For example,
>>
>> UNITS OF MEASURE:
>> PCE: with ratio = 1
>> PACK: bigger than the reference with ratio 10
>> PART: smaller than the reference with ratio 2
>>
>> SALE ORDER:
>> product: HDD1
>> qty: 1
>> UoM: PCE
>> price unit: 50
>>
>> if I change the UoM to PACK
>> then the price unit is 5000.
>> (WRONG! The correct price unit is 500 only)
>> if I change the UoM to PART
>> the the price unit is 12.50.
>> (WRONG! The correct price unit is 25)
>>
>
>