← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 507694] Re: [mrp] deleting a purchase order originating from procurement should cancel the procurement order

 

** Changed in: openobject-addons/trunk
   Importance: Medium => Undecided

** Changed in: openobject-addons/trunk
       Status: In Progress => Fix Released

** Changed in: openobject-addons/trunk
    Milestone: 6.0 => None

** Changed in: openobject-addons/trunk
     Assignee: Olivier Dony (OpenERP) (odo) => (unassigned)

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/507694

Title:
  [mrp] deleting a purchase order originating from procurement should cancel the procurement order

Status in OpenObject Addons Modules:
  Fix Released
Status in OpenObject Addons 5.0 series:
  Fix Released
Status in OpenObject Addons trunk series:
  Fix Released

Bug description:
  Unless it's been fixed in the mean time (currently reproduced on addons 5.0.6 @ revno 2432), the following steps seem incorrect:
 1. configure a stockable product as MTO + buy
 2. create a procurement order 'on order' for this product, and confirm it (similar to what an order point would do)
 3. go to the list of draft purchase orders and delete the corresponding PO. No warning, the PO is deleted.
 4. go back to the procurement order, it's now stuck in the workflow as you can't delete it or cancel it. The only thing you can do to fix the incorrect virtual stock due to the temporary reservation is to manually cancel the reservation of this procurement. But you can't delete it anyway.

If at step 3 you first cancel the purchase order you get the expected result, because the subflow.cancel signal is propagated and the procurement is indeed cancelled, so you can delete both.

We need to either prevent deleting a purchase order that originates from a running procurement, unless that purchase order is properly cancelled first, or we must automatically send a subflow.cancel signal to the procurement workflow when deleting it.

There's also the issue of the 'cancel' button that stays visible on a running procurement but is not connected to the workflow, but I think this is already fixed by rev 2468 for bug 492211.

Thanks!