← Back to team overview

openerp-india team mailing list archive

[Bug 923191] Re: [trunk] incorrect stock accounting valuations using standard cost

 

** Changed in: openobject-addons
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/923191

Title:
  [trunk] incorrect stock accounting valuations using standard cost

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  in purchase module stock.py the method
  _get_reference_accounting_values_for_valuation is incorrectly
  overridden.

  to reproduce.
  Set a product as standard cost of $1.00
  Raise a purchase order for this product at $1.50 * 10

  Expected entries
  Stock dr $10
  Stock Input cr $10

  Results
  $15 in each.

  if using standard cost the correct valuation at receipting time is the
  products standard cost * quantity.  this is the whole point of using
  standard cost in the first place.  However this override cause the
  stock valuation calculation to become po line price * qty.  When
  products are sold downstream this will cause an error in stock
  valuation.

  The line 
  if move.product_id.cost_method != 'average' or not move.price_unit:

  should be changed, probably to

  if move.product_id.cost_method == 'average' and not move.price_unit:

  but in truth, this function could just be deleted entirely as there is
  no condition where this should evaluate to true, and even if it did,
  it is safer to take the standard_price which already occurs than just
  assume that the po_line is the correct price as the scale of potential
  errors is significantly smaller with the former and po's have no
  accounting entries.

  In any case, with standard accounting it makes no difference, and with
  anglosaxon the price difference is picked up at invoice.  Note that
  this bug is a root cause of the symptons of bug 922077

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


References