Wrong Unit Price Computed When UoM is Changed in the Sale Order of OpenERP 6.0.2

Bug #749976 reported by Michael Aldrin Villamar (FS3)
34
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

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)

security vulnerability: yes → no
visibility: private → public
Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Pieter van der Merwe (pietercvdm) wrote :

Also ran into the bug in 6.0.2. We regard it as a show stopper. Manually calculating the unit price would not be feasible. Requesting to raise the importance to critical/high?

Revision history for this message
Steve Atkins (Multibase) (stevea-mbase) wrote :

I agree with Pieter, any bug that impacts on costing or pricing is by definition, critical.

Revision history for this message
snook (snook) 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.

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

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)
>

Revision history for this message
Graeme Gellatly (gdgellatly) wrote :

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)
>>
>
>

Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote :

Hello Guys,

There is a update here that the bug has already been fixed by revision http://bazaar.launchpad.net/~openerp/openobject-addons/6.0/revision/4538#product/pricelist.py due to the red-eye of the bug https://bugs.launchpad.net/openobject-addons/+bug/728092.

Hence, I would opt to set this bug as the duplicate of https://bugs.launchpad.net/openobject-addons/+bug/728092.

Have an update of the code or a wait for version 6.0.3 will be worth.

Thanks for your participation and discussion here,it really helps.

Revision history for this message
Pieter van der Merwe (pietercvdm) wrote :

Thanks Amit. Implemented the fix in pricelist.py in our 6.0.2 installation and that fixed the issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.