incorrect invoice price - average price + real time missing code

Bug #779064 reported by Ferdinand
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 2

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.

Related branches

Revision history for this message
Ferdinand (office-chricar) wrote :

patch uses (modified) price from stock move for invoice lines if purchase-invoices are created from pickings

for real time settings this will create identical amounts for
* stock moves
* invoice lines
if invoice = picking.price

to resume,
if OpenERP allows to modify the price for the stock move, this price should be taken also for the invoice.
in real life
* if a price is printed on the supplier picking, the same price will usually be on the invoice.

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Rohan Nayani(Open ERP) (ron-tinyerp) wrote :

Hello,

Thanks for Reporting.
It has been fixed in lp:~openerp-dev/openobject-addons/trunk-bug-779064-ron
Revision ID: <email address hidden>
Revision num:4698.
Thanks for your contribution,

It will be available in trunk soon.

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

The corresponding fix was merged in trunk at revision 5042 revid:<email address hidden>
Thanks for reporting!

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.