← Back to team overview

openerp-community-reviewer team mailing list archive

[Bug 1271912] [NEW] Bug in module stock

 

Public bug reported:

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
.

** Affects: ocb-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Community Backports Team, which is subscribed to OpenERP Community
Backports (Addons).
https://bugs.launchpad.net/bugs/1271912

Title:
  Bug in module stock

Status in OpenERP Community Backports (Addons):
  New

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 .

To manage notifications about this bug go to:
https://bugs.launchpad.net/ocb-addons/+bug/1271912/+subscriptions


Follow ups

References