← Back to team overview

openerp-india team mailing list archive

[Bug 921866] Re: Scheduler created PO's affects virtual stock

 

Hello,

I have been developing this feature myself and I have it nearly ready. I
added a new filter called Planned Orders. I added a new workflow state
and made it the beginning or equal to draft. Planned orders can be
confirmed  but not converted into draft.

By default, purchase orders created will be in 'state': draft. I passed
an extra line for 'state': 'planned' in create_po. Now purchase orders
generated exclusively by the scheduler will be in planned state. I also
had to make other minor tweaks and I added the new state selection.

I also added an if, else, statement to update existing purchase orders
in planned state (thanks to code by others). So instead of creating one
purchase order per product, it creates one purchase order per supplier.

The two things I have yet to do and I could use some guidance, I am not
sure the proper way to call a delete before the make_po is called. I
also am not sure where the purchase confirm method is being called,
(whats adding to virtual stock). If everyone can comment on the design
so far and the things I need help with, I would be happy to publish this
back to the community when it is ready. Thanks

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/921866

Title:
  Scheduler created PO's affects virtual stock

Status in OpenERP Addons (modules):
  Confirmed

Bug description:
  I have min/max rules setup. When the scheduler runs nightly it auto-
  generates purchase orders. It generates them correctly. They are in
  quotation state.

  The problem is that they affect virtual stock. If I have 5 parts left
  in stock. A minimum rule of 10. It creates a purchase order for 5 in
  quotation. Now it says I have 10 in virtual stock, but this is not
  right. It should never ever effect virtual stock unless it is
  confirmed. A quotation has no value.

  Does it do this behavior intentionally to avoid creating the same
  purchase order again the next night? If so thats a bad work around.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/921866/+subscriptions


References