OpenERP Addons (modules)

wrong virtual stock based on purchase orders

Reported by TeMPO on 2009-05-20
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Addons
Medium
Unassigned

Bug Description

Version 5.0.0-3.1

Problem#1:
If the minimum stock rule of some product generates a purchase order, then the virtual stock of this product is immediately
updated, even if the purchase order has not yet been confirmed. The virtual stock should only be updated after confirmation.

Problem#2:
If the purchase order is cancelled, the virtual stock is NOT updated.

In fact, the management of virtual stocks is correct for sale orders. The same mechanism should be applied on purchase orders.

Fabien (Open ERP) (fp-tinyerp) wrote :

Tested on stable and it works fine.
I invalidate the bug, please download latests versions from LP

Changed in openobject-addons:
status: New → Invalid
TeMPO (info-tempo-consulting) wrote :

I have tested on 5.0.0-3, installed from openerp-server-setup-5.0.0-3.exe
Is there a newer version?

Hello,

We will release a newer version soon for windows.

Or,If you can work download latest revisions from launchpad,you will get latest resources to work on .

Thanks.

Hi,

I see two parts in this bug:
1) Virtual Stocks are (or were, not checked) increased before PO validation
2) If PO are invalidated, virtual stocks remains too optimistic.

The 2) part of the bug is a duplicate of that one I think:
https://bugs.launchpad.net/openobject-addons/+bug/356697

Hope the two bugs will be fixed together.

Fabien (Open ERP) (fp-tinyerp) wrote :

I confirm it works fine on branch/5

TeMPO (info-tempo-consulting) wrote :

Dear all,

I confirm that on 5.0.11 the bug is still there

Put a minimal stock on a product, sell it, call the scheduler, it will create a PO in state "Request for Confirmation" but the virtual stock is already increased.

When you issue a manual PO when it goes into "request for Confirlmation" the virtual stock is not increased.

Two was of handling the PO is not acceptable.

Maurice

Changed in openobject-addons:
status: Invalid → Confirmed
Changed in openobject-addons:
importance: Undecided → Medium
milestone: none → 5.0.12

If you accept both TeMPO points you can destroy current concept.

When scheduler finds that virtual stock is under minimum it creates (1.) Procurement order and (2.) stock move (from virtual Procurement location to some real location) and then scheduler creates (3.) PO assigned to this procurement order and stock move. Virtual stock is increased because of confirmed stock move 2. So in reality it is not from PO but from procurement. It must work this way because if virtual stock is not increased the next scheduler will not "see" that this purchase is "under way" and next scheduler run would create another PO. And such creation will be endless.

Current concept (AFAIK) is that when you create PO from procurement system has to know that "intention" of buying something already exists. PO cannot be confirmed because you don't know from which supplier you eventually buy but information that system is going to buy must be already reflected in virtual stock.

Above concept (AFAIK) is a basis of OpenERP mrp cycle. I know that at least stock_planning module will stop work when you change something with that.

So I rather suggest to think if issue from second part of TeMPO request could be fixed only. I mean when manual PO is confirmed system should know that it is "intention of purchase". Otherwise such manual confirmed PO will not be taken under consideration in MRP and in MPS. In my opinion it should be taken in consideration.

If you accept first TeMPO problem as bug you will probably have to change whole OpenERP mrp concept. If so a lot of OpenERP production experts want to learn it.

Dear Grzegorz,

your inputs are very interesting and I guess you are right when saying
that this stuff should go thru the mrp expert list.

What I pointed out in my bug report was that the same object (a PO) would
trigger a different behaviour regarding the virtual stock if it is done
manually
or coming from a procurement.

Maybe you are right when you say that what should be changed is the
behaviour
of the manual PO (increase the virtual stock as soon as the PO is
confirmed and
before it is approved by the supplier. We just need to check that the PO
can be
canceled in the case the supplier will not be able to deliver it.

By the way we also noticed two other strange things :

   1. the scheduler will not take in account anay date when issuing
      procurements
      with the stock rules : if you seel P1 and expects it for
      01/01/2011 for example
      the scheduler will make a PO today .... (bug 599806)
   2. if there is a PO pending for P1 (we made the purchase and are
      waiting for the goods)
      the scheduler will not issue a new PO (bug 599300)

I guess there are many issues to be adressed here

> If you accept both TeMPO points you can destroy current concept.
>
> When scheduler finds that virtual stock is under minimum it creates (1.)
> Procurement order and (2.) stock move (from virtual Procurement
> location to some real location) and then scheduler creates (3.) PO
> assigned to this procurement order and stock move. Virtual stock is
> increased because of confirmed stock move 2. So in reality it is not
> from PO but from procurement. It must work this way because if virtual
> stock is not increased the next scheduler will not "see" that this
> purchase is "under way" and next scheduler run would create another PO.
> And such creation will be endless.
>
> Current concept (AFAIK) is that when you create PO from procurement
> system has to know that "intention" of buying something already exists.
> PO cannot be confirmed because you don't know from which supplier you
> eventually buy but information that system is going to buy must be
> already reflected in virtual stock.
>
> Above concept (AFAIK) is a basis of OpenERP mrp cycle. I know that at
> least stock_planning module will stop work when you change something
> with that.
>
> So I rather suggest to think if issue from second part of TeMPO request
> could be fixed only. I mean when manual PO is confirmed system should
> know that it is "intention of purchase". Otherwise such manual confirmed
> PO will not be taken under consideration in MRP and in MPS. In my
> opinion it should be taken in consideration.
>
> If you accept first TeMPO problem as bug you will probably have to
> change whole OpenERP mrp concept. If so a lot of OpenERP production
> experts want to learn it.
>
>

--
Très cordialement

Maurice MORETTI

_________________________________________________________________________
TeMPO CONSULTING Valparc 9, rue du Parc 67205 Oberhausbergen FRANCE

Web : http://www.tempo-consulting.fr
email : <email address hidden>

Tel : 33 (0)3 88 56 82 10
Fax : 33 (0)3 88 56 46 64
Mobile : 33 (0)6 08 61 85 02

TeMPO (info-tempo-consulting) wrote :

Dear Grzegorz,

I don't know for the whole explanation abut at least this sentence is incorrect

It must work this way because if virtual stock is not increased the next scheduler will not "see" that this purchase is "under way" and next scheduler run would create another PO. And such creation will be endless.

Look at mrp/schedulers.py function_procure_orderpoint_confirm : if the PO is in draft or Confirmed state the scheduler will not issue a new PO

Regards

Maurice

You are right. Sorry for bad advice. I explained it from general knowledge not from code.

However we have another two ways of creation procurement:
- Manual in Product form and
- another manual in stock_planning module.

Both method are based on observation of virtual stock. So worker using these tools should see if there are incoming shipments "under way" even arising from minimal stock rules.

I agree that creation of manual Purchase Order shouldn't behaviour other than automatic Purchase order. In my opinion when manual purchase order is confirmed we should know somehow that Purchase order is "in progress". Natural way for current concept by now is to reflect it in increasing of virtual stock.

Generally I am not happy with current procurement concept. But immediate virtual stock reflection of all intentions is rather correct in my opinion.
All the best

Fabien (Open ERP) (fp-tinyerp) wrote :

Hello,

It's normal to increase the virtual stock directly when it's a procurement that triggered the PO.
The procurement is confirmed, so you will procure these products.

Changed in openobject-addons:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers