← Back to team overview

openerp-india team mailing list archive

[Bug 985619] [NEW] mrp.production consume&produce gives moves with quantity 0

 

Public bug reported:

Hi,

In a mrp.production, when you produce&consume, in some cases, the
stock.moves in the consumed products will have a quantity of 0.

It seems to come from a rounding error (eg. a textual representation of
9 could be 8.9839847893 in memory).

In openobject-addons/stock/stock.py in action_consume :

quantity_rest -= quantity

should be :

quantity_rest = round(quantity_rest - quantity, 3)

** Affects: openobject-addons
     Importance: Undecided
         Status: New

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

Title:
  mrp.production consume&produce gives moves with quantity 0

Status in OpenERP Addons (modules):
  New

Bug description:
  Hi,

  In a mrp.production, when you produce&consume, in some cases, the
  stock.moves in the consumed products will have a quantity of 0.

  It seems to come from a rounding error (eg. a textual representation
  of 9 could be 8.9839847893 in memory).

  In openobject-addons/stock/stock.py in action_consume :

  quantity_rest -= quantity

  should be :

  quantity_rest = round(quantity_rest - quantity, 3)

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


Follow ups

References