average price not updating when packing is cancelled or deleted.

Bug #495363 reported by Joel Cabral
18
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.

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

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
https://code.launchpad.net/~openerp-commiter/openobject-addons/chricar_price_unit

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.

Changed in openobject-addons:
assignee: nobody → aag(OpenERP) (aag-openerp)
Changed in openobject-addons:
status: New → In Progress
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Experts,

Would you please share your views?

Thanks.

Changed in openobject-addons:
importance: Undecided → Wishlist
assignee: aag(OpenERP) (aag-openerp) → nobody
Revision history for this message
Ferdinand (office-chricar) wrote :

I just want to add that not being able to revert workflow steps (with some exceptions) is one of the biggest issues in day to day business.

Especially errors in "done" pickings are often discovered very shortly after accomplishing the step - (reading printed output)

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Hello hephaestus,

We definitely cannot update average price based on invoices, as the unit price can change greatly before the actual arrival of the products (transportation costs, customs taxes etc.).

A related topic would be to revert the update of the average price in case you return the incoming products coming from your supplier. However this may not be allowed according to all accounting rules. For this specific part please refer to bug 610738.

As for reverting workflow transitions, this is not allowed as there are many situations where this won't be cleanly possible (think sequence number consumed, etc.) When it is often necessary to revert an operation, a proper workflow path must be specifically foreseen. For other cases it might be easier to do some customization to the screens to make mistakes less frequent in your specific case (for example putting a print button on the left of the Done button if that helps some users)

Also note that in v5.0 the suggested unit price was 0 on the reception wizard until recently, which could lead to annoying effect on the average price if the user is not careful. In v6 the suggested price is taken from the purchase order line when there is one, which gives a much smaller error if the user forgets to correct it.

Thank you for bringing up this topic!

Changed in openobject-addons:
status: In Progress → Invalid
Revision history for this message
Nhomar - Vauxoo (nhomar) wrote : Re: [Bug 495363] Re: average price not updating when packing is cancelled or deleted.

Hello Oliver.

I'm agree that it can not be possible, but IMHO, the "cancel button" can not
be possible, to "cancel" a picking you must to "return" the picking, not
cancel it, this button should not be showed anyway, it should be done with
the "return " wizard, this procedure has a math related.......

Regards.

2010/10/13 Olivier Dony (OpenERP) <email address hidden>

> Hello hephaestus,
>
> We definitely cannot update average price based on invoices, as the unit
> price can change greatly before the actual arrival of the products
> (transportation costs, customs taxes etc.).
>
> A related topic would be to revert the update of the average price in
> case you return the incoming products coming from your supplier. However
> this may not be allowed according to all accounting rules. For this
> specific part please refer to bug 610738.
>
> As for reverting workflow transitions, this is not allowed as there are
> many situations where this won't be cleanly possible (think sequence
> number consumed, etc.) When it is often necessary to revert an
> operation, a proper workflow path must be specifically foreseen. For
> other cases it might be easier to do some customization to the screens
> to make mistakes less frequent in your specific case (for example
> putting a print button on the left of the Done button if that helps some
> users)
>
> Also note that in v5.0 the suggested unit price was 0 on the reception
> wizard until recently, which could lead to annoying effect on the
> average price if the user is not careful. In v6 the suggested price is
> taken from the purchase order line when there is one, which gives a much
> smaller error if the user forgets to correct it.
>
> Thank you for bringing up this topic!
>
> ** Changed in: openobject-addons
> Status: In Progress => Invalid
>
> --
> average price not updating when packing is cancelled or deleted.
> https://bugs.launchpad.net/bugs/495363
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenObject Addons.
>
> Status in OpenObject Addons Modules: Invalid
>
> 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.
>
>
>

--

Revision history for this message
Ferdinand (office-chricar) wrote : Re: [Openerp-expert-production] [Bug 495363] Re: average price not updating when packing is cancelled or deleted.

On Wednesday 13 October 2010 Olivier Dony (OpenERP) wrote:
> Hello hephaestus,
>
> We definitely cannot update average price based on invoices, as the unit
> price can change greatly before the actual arrival of the products
> (transportation costs, customs taxes etc.).
in a previous sysem we have developed a method to pre-caculate the price of
incoming products taking into account
* the purchase price itself
* discounts
* custom taxes
* freight
* others
and beeing able to match these price components with incoming invoices from
different partners.
this is the only way to set up an accurate cost accounting system based on the
estimated final price of the goods.
the usual small differences between estimated and actual prices are posted to
special accounts to avoid unnecessary and usually not relevant reevaluation of
stock moves.

(of course people have explained to us that this will not work accurate
enough, but after a few month it did - a question of discipline ...)

just let me know if you need more info

-
regards
Ferdinand Gassauer
ChriCar Beteiligungs- und Beratungs- GmbH
Official OpenERP Partner

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.