Bug in module stock

Bug #1271912 reported by Luis M. Gómez / Lanestic
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Community Backports (Addons)
New
Undecided
Unassigned

Bug Description

I have encountered a problem in the module stock in the branch ocb 6.1 file stock.py

The problem that occurs is that when I put an order for a product that your UoM is
Units , if I make the purchase in thousands eg , to generate the accounting entries me
I find that putting the value is 1000 times the real.

For example :

Buy 2 thousands labels to 89.30 euros thousand.

Me to increase my stock 2000 units increases . perfect.
The cost price puts me well . 0.0893 Euros.

But accounting generates me an accounting of inventory increased to a value of 178600 euros when it should be 178.60 .

I have retouched the module file stock.py stock as follows :

Line 2156, said:

qty = product_uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, default_uom)

I added :

precio = product_uom_obj._compute_price(cr, uid, move.product_uom.id, move.price_unit, default_uom)

Line 2161, said :

reference_amount = qty * move.price_unit

I have replaced :

reference_amount = qty * precio

and so says the accounting entry generated 178,60 instead of EUR 178600 .

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Luis,

thank you for reporting your findings. I noticed that you only speak about OCB. Does that mean that this bug only present in OCB and not in OpenERP?

Revision history for this message
Luis M. Gómez / Lanestic (gomezluism) wrote : Re: [Bug 1271912] Re: Bug in module stock

I think the bug is present in openERP too, because the code lines are the
same,
but I don't tested this.

Thank you.

2014/1/23 Stefan Rijnhart (Therp) <email address hidden>

> Hi Luis,
>
> thank you for reporting your findings. I noticed that you only speak
> about OCB. Does that mean that this bug only present in OCB and not in
> OpenERP?
>
>

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.