openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #17591
[Bug 1076961] [NEW] [6.1] Stock: Incorrect UOM calculation on Inventory Analysis
Public bug reported:
May be a dupe of #741457.
Looks like the calculation for UOM is wrong in the Inventory Analysis,
and will only work properly for the default UOM. It look like the lines:
sum(sm.product_qty * pu.factor / pu2.factor)
and:
sum(sm.product_qty * pu.factor / pu2.factor) * pt.standard_price
are actually dividing the same two numbers (pu.factor and pu2.factor)
and will always end up with 1.0 because of these joins:
LEFT JOIN product_uom pu ON (sm.product_uom=pu.id)
LEFT JOIN product_uom pu2 ON (sm.product_uom=pu2.id)
Which basically comes up with the same number. pu2 should actually be
the default UOM from the product template.
Attaching a patch to fix.
** Affects: openobject-addons
Importance: Undecided
Status: New
** Patch added: "inv_analysis_uom.patch"
https://bugs.launchpad.net/bugs/1076961/+attachment/3428695/+files/inv_analysis_uom.patch
--
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/1076961
Title:
[6.1] Stock: Incorrect UOM calculation on Inventory Analysis
Status in OpenERP Addons (modules):
New
Bug description:
May be a dupe of #741457.
Looks like the calculation for UOM is wrong in the Inventory Analysis,
and will only work properly for the default UOM. It look like the
lines:
sum(sm.product_qty * pu.factor / pu2.factor)
and:
sum(sm.product_qty * pu.factor / pu2.factor) * pt.standard_price
are actually dividing the same two numbers (pu.factor and pu2.factor)
and will always end up with 1.0 because of these joins:
LEFT JOIN product_uom pu ON (sm.product_uom=pu.id)
LEFT JOIN product_uom pu2 ON (sm.product_uom=pu2.id)
Which basically comes up with the same number. pu2 should actually be
the default UOM from the product template.
Attaching a patch to fix.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1076961/+subscriptions
Follow ups
References