← Back to team overview

openerp-india team mailing list archive

[Bug 1280463] Re: product uom conversion should use ceiling instead of rounding

 

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

** Changed in: openobject-addons
       Status: New => Fix Released

-- 
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/1280463

Title:
  product uom conversion should use ceiling instead of rounding

Status in OpenERP Addons (modules):
  Fix Released

Bug description:
  Warranty #M120914764-zcaevxmq

  By default, OpenERP 7.0's product uom conversion rounds to specified
  precision using standard rounding.

  This causes a problem in the following scenario:
  1) Create a product with UoM single piece, and Purchase UoM 10-pack (bigger than reference, factor = 10, rounding = 1.0)
  2) Create a make-to-order Sale Order for 4 of this product.
  3) Confirm sale order, and view resulting Purchase Order.

  We only want to buy the product in 10-packs, so the PO will be rounded
  to the nearest whole number of 4/10 = .4 = 0.

  Obviously a PO for zero 10-packs will not fulfill the original sale
  order.

  The solution would be as simple as modifying product.uom's
  _compute_qty_obj() function to use math.ceil() instead of round().

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


References