← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 779064] Re: incorrect invoice price - average price + real time missing code

 

Hello,

Thanks for Reporting.
It has been fixed in lp:~openerp-dev/openobject-addons/trunk-bug-779064-ron
Revision ID: ron@xxxxxxxxxxx-20110517084337-f39957zqveqpa2u4 
Revision num:4698.
Thanks for your contribution,

It will be available in trunk soon.

** Changed in: openobject-addons
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/779064

Title:
  incorrect invoice price - average price + real time missing code

Status in OpenERP Modules (addons):
  Fix Committed

Bug description:
  to reproduce

  product with
  * costing method: average price
  * inventory valuation: real time
  * stockable

  PO: 
  * Invoice control from picking

  create some PO , process picking, validate invoice
  etc

  the problem
  create PO , price= 10
  process picking AND modify price = 11
  * create stock move - 
  ** with modified and correct price_unit = 11

  * create invoice from picking
  invoice line takes price from product

  def _get_price_unit_invoice:
  takes standard (= average) price from product

  IMHO in this case the invoice should take the (modified) price from
  stock move.

  because:
  ./stock.py:1213: 
                          # used for inventory valuation if real-time valuation is enabled.
                          move_obj.write(cr, uid, [move.id],
                                  {'price_unit': product_price,
                                   'price_currency_id': product_currency})

  if the invoice is created from the picking (which is very often the
  case in small companies where no pricelists and standard price exists
  for purchased products) it does not make much sense to use/propose a
  different price in the invoice.

  the users has to correct the price during "process picking" AND on the
  invoice line again. - a source of errors.


References