average price not updating when packing is cancelled or deleted.
Bug #495363 reported by
Joel Cabral
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
I am aware that the average price is computed when receiving items or packing. When I received the Item I didn't notice that my unit price is wrong, but since I already clicked the make packing button there is no way for me to cancel that packing. just wondering it would be better if the average price is computed when invoiced not when receiving the packing.
Changed in openobject-addons: | |
assignee: | nobody → aag(OpenERP) (aag-openerp) |
Changed in openobject-addons: | |
status: | New → In Progress |
To post a comment you must log in.
IMHO the concept of avg price stored at product level as several drawbacks.
the avg price should always be calculated as amount/quantity in respect to
* stock location
* reference date
for that it is necessary to store the amount in addition to the quantity in stock moves as already done in /code.launchpad .net/~openerp- commiter/ openobject- addons/ chricar_ price_unit
https:/
2 reason:
* if stock is moved to external location it has a certain value - if taken from there it has to be taken with the same price as it was shipped to reach amount = 0 if qty becomes 0
* if stock is query and evaluated for a certain reference date (year or period end) the quantity must absolutely NOT multiplied with the current average price to compute the stock value, but with the historical avg price which per definition can only be sum(amount) /sum(qty) .
in respect of cancel or delete a stock move - things get complex.
* obviously the canceled quantity and value must be identical to the original qty and value
* all stock moves AFTER this date will have WRONG avg price (if the avg price was changed by this very stock_move)
** either all stock moves have to be reevaluated - which is a MAJOR organisational problem because these might have been used already in other programs.
** the value of the remaining stock has to be altered creating a stock_move with qty=0 and amount=DIFF
IMHO this should be discussed in expert group.