← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 694694] Re: [6.0RC1] problem with inherit in view

 

Obtain trunk version of this day
Make society with crm, sale, purchase

Try to go administration, user and obtain :

Environment Information :
System : Linux-2.6.32-26-generic-x86_64-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID:    Ubuntu
Description:    Ubuntu 10.04.1 LTS
Release:    10.04
Codename:    lucid
Operating System Release : 2.6.32-26-generic
Operating System Version : #48-Ubuntu SMP Wed Nov 24 10:14:11 UTC 2010
Operating System Architecture : 64bit
Operating System Locale : fr_FR.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0.0-rc1
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/opt/openerp/somafrac/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/somafrac/server/bin/service/web_services.py", line 598, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/somafrac/server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/somafrac/server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/somafrac/server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/somafrac/server/bin/osv/orm.py", line 1694, in fields_view_get
    cr.execute(query, params)
  File "/opt/openerp/somafrac/server/bin/sql_db.py", line 76, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/somafrac/server/bin/sql_db.py", line 129, in execute
    res = self._obj.execute(query, params)
ProgrammingError: ERREUR:  l'opérateur n'existe pas : integer = record
LIGNE 1 : ...,id,type,inherit_id,model FROM ir_ui_view WHERE id=(9, E'res...
                                                               ^
ASTUCE : Aucun opérateur ne correspond au nom donné et aux types d'arguments.
Vous devez ajouter des conversions explicites de type.

Bad solution, but it works (why tuple some times and int some others ??) :
modify orm.py to put  (~line 1685):

                if isinstance(view_id,tuple):
                    params = (view_id[0],)
                else:
                    params = (view_id,)

in place of :

                params = (view_id,)

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

Title:
  [6.0RC1] problem with inherit in view

Status in OpenObject Addons Modules:
  Incomplete

Bug description:
  trying to use trunk version in place of 6.0RC1 Official with own module.
Error in osv/orm.py line 1684.
It seems to receive in view_id two types of values : integer or tuple.
When it's integer, no problem, but don't work with tuple.
Add two print line in function to show parameters : 

type view_id :  <type 'tuple'>
view_is :  (920, u'res.partner.contact.search')
type view_id :  <type 'int'>
type view_id :  <type 'tuple'>
view_is :  (920, u'res.partner.contact.search')
type view_id :  <type 'int'>
type view_id :  <type 'tuple'>
view_is :  (642, u'purchase.order.list.select')
type view_id :  <type 'tuple'>
view_is :  (920, u'res.partner.contact.search')
type view_id :  <type 'int'>

modify bloc to make version run by testing type of view_id, but it is not the good way.





References