Product UoM conversion error needs definition

Bug #716705 reported by Kyle Waid
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 2
6.0
Confirmed
Undecided
Unassigned

Bug Description

It is known that it is not possible to convert UoM PCE to ft. When you incorrectly make a BOM it will show this error

"Conversion from Product UoM m to Default UoM PCE is not possible as they both belong to different Category!."

Makes sense. However this error is not indicative of what actually happened. When this error is returned it is general and not what units of measure are actually being converted. If I have a manufacturing order for a product defined properly as ft, but I configure it incorrectly as PCE it will show this exact error but it should look like this
"Conversion from Product UoM ft to Default UoM PCE is not possible as they both belong to different Category!."
Correctly stating the error and showing the user their mistake. How could I possible know what the problem is when it does not properly state the error.

This case is especially true while running the manufacturing scheduler. This is not a normal scenario but consider I have 9,000 procurement exceptions and while the scheduler is processing them lets say it encounters just this exact problem. The scheduler gives no indication it is running at all but if it encounters this problem it will show this error in the server log.
"Conversion from Product UoM m to Default UoM PCE is not possible as they both belong to different Category!."
So consider not only does this not provide the correct UoM conversion error, it does not state which product is causing this issue which would force the person to manually sort through all 9,000 exceptions on an individual basis to find the problem. SO if this error happens it should say the error correctly,
"Conversion from Product UoM ft to Default UoM PCE is not possible as they both belong to different Category!."
PRODUCT ID :name of product MOVE ID: Relation to database.

Putting the error this way provides a much more solid experience and diagnosis, telling the user exactly what they did wrong and where to fix the problem. Consider again, the error and its context is too broad to be useful in almost any way.

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Rohan Nayani(Open ERP) (ron-tinyerp) wrote :

Hello,

Thanks for Reporting.
It has been fixed in lp:~openerp-dev/openobject-addons/ron-dev-addons2
Revision ID: <email address hidden>
Revision num:5142.

It will be available in trunk soon,

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Kyle Waid (midwest) wrote :

Hello, I tested this recently on the current trunk and the issue remains the same error, without definition

Revision history for this message
Kyle Waid (midwest) wrote :

ct/product.py", line 142, in _compute_qty_obj raise osv.except_osv(_('Error !'), _('Conversion from Product UoM m to Default UoM PCE is not possible as they both belong to d
ifferent Category!.'))

Changed in openobject-addons:
status: Fix Released → New
Revision history for this message
Kyle Waid (midwest) wrote :

The proposed code looks solid, can you verify that the 6.0 and trunk branch has this code, I do not believe it does and this is an important diagnosis fix.

Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

Hello Kyle,
I have checked the line you provided, the fix is already there in latest trunk branch,
Check http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/product/product.py, it is the latest trunk revision.
merged revision: http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/4493/product/product.py
So I set it fix released for trunk version,
Kindly update your code if you are using trunk,

Changed in openobject-addons:
status: New → Fix Released
Revision history for this message
Kyle Waid (midwest) wrote :

I meant the stable 6.0 Branch. I just pulled sources and it is not there. Please merge this fix with it, as is an important definition fix and will allow others to easily trace an issue with a conversion error. Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.