← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 847867] Re: [trunk][purchase]Seller quantity for procurements uses default UOM

 

I'm a little confused - your SO was for 2 PCE, as was your procurement.
But your PO was for 20 boxes of 10? That's 200 PCE.

Also, I should have specified - you need to set the supplier minimum quantity (1.0 is fine). Otherwise, seller_qty will be 0.0 and the problematic line in make_po():
   if seller_qty:
        qty = max(qty,seller_qty)
Will always return qty rather than seller_qty. If you set the supplier minimum, seller_qty will be returned as 20 in. 

To simplify the test case (since the scenario is happening on
orderpoints) you only need to create the Procurement Order for 2 PCE
once you've set the minimum quantity on the supplier.

Hope that makes sense.

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

Title:
  [trunk][purchase]Seller quantity for procurements uses default UOM

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  It appears that seller_qty is calculated using the default UOM rather
  than the purchase UOM. This might not be an issue for most things, but
  if the purchase UOM and default UOM are different, the quantity for
  PO's from procurements may be wrong.

  For a test case, create a product 'XYZ' with a default UOM of 'each'
  and a purchase UOM of 'each x 10'. Now add a procurement order for
  quantity 2 of XYZ. When the purchase order is created, the quantity
  will be 10.

  make_po() sets the qty to the supplier minimum (which uses the default
  UOM) or the procurement, whichever is higher. In this case it's the
  incorrect supplier minimum calc'd to be 10.

  I'm not sure the seller_qty should be using the default UOM, it might
  make more sense for it to use the Purchase UOM, but the attached patch
  updates make_po() to do the conversion on seller_qty instead. The
  alternative would be to update _calc_qty() and change the UOM used.

  Patch attached for latest trunk.

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


References