c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #18649
[Bug 731035] [NEW] Reference UoM for category should be checked for uniqueness
Public bug reported:
Currently any UoM can be set as a reference for a given category which
seems to be wrong (meaning one category can have several UoM
references). By conception it is dubious and actually it makes some
reports crashes like account_invoice_report with the following error
message:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 1735, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 3981, in _search
cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 1735, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 3981, in _search
cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 131, in execute
res = self._obj.execute(query, params)
ProgrammingError: more than one row returned by a subquery used as an expression
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 131, in execute
res = self._obj.execute(query, params)
ProgrammingError: more than one row returned by a subquery used as an expression
Uniqueness should be checked when the UoM is created/modified. Even more, you should not be able to delete the reference of a category if other UoM depend on it.
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/731035
Title:
Reference UoM for category should be checked for uniqueness
Status in OpenERP Modules (addons):
New
Bug description:
Currently any UoM can be set as a reference for a given category which
seems to be wrong (meaning one category can have several UoM
references). By conception it is dubious and actually it makes some
reports crashes like account_invoice_report with the following error
message:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 1735, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 3981, in _search
cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/netsvc.py", line 489, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/service/web_services.py", line 599, in dispatch
res = fn(db, uid, *params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 1735, in search
return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/osv/orm.py", line 3981, in _search
cr.execute('SELECT "%s".id FROM ' % self._table + from_clause + where_str + order_by + limit_str + offset_str, where_clause_params)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 131, in execute
res = self._obj.execute(query, params)
ProgrammingError: more than one row returned by a subquery used as an expression
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 78, in wrapper
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/openerp-server_9000/sql_db.py", line 131, in execute
res = self._obj.execute(query, params)
ProgrammingError: more than one row returned by a subquery used as an expression
Uniqueness should be checked when the UoM is created/modified. Even more, you should not be able to delete the reference of a category if other UoM depend on it.
Follow ups
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Fabien (Open ERP), 2011-09-24
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Fabien (Open ERP), 2011-09-24
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Nathan, 2011-08-02
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Atik Agewan(OpenERP), 2011-06-15
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Launchpad Bug Tracker, 2011-06-15
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Phong Nguyen-Thanh, 2011-06-13
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Eric Caudal - www.elico-corp.com, 2011-05-31
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Marco Dieckhoff, 2011-05-31
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Eric Caudal - www.elico-corp.com, 2011-05-31
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Olivier Dony (OpenERP), 2011-05-31
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Kyle Waid - http://www.gcotech.com, 2011-03-22
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Atik Agewan(OpenERP), 2011-03-09
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Launchpad Bug Tracker, 2011-03-09
-
[Bug 731035] Re: Reference UoM for category should be checked for uniqueness
From: Olivier Dony (OpenERP), 2011-03-08
-
[Bug 731035] [NEW] Reference UoM for category should be checked for uniqueness
From: Eric Caudal - www.elico-corp.com, 2011-03-08
References