c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #27334
Re: [Bug 797089] Re: bug with share_create object
On 06/22/2011 05:37 PM, Dominique Chabord wrote:
> Some are signaling this failure on 6.0.2, and these people don't have
> access to web client directory. Is it the same answer to them ?
What error do you mean, the exact same one about "share_create" object
having no "has_share" attribute?
This was not very likely until last friday, because this attribute only
existed in a separate development branch. Now this new version of the
"share" module has been merged in trunk, so it could in theory happen if
you connect your web client to a trunk server, and then go back to a 6.0
server.
> Do you mean these people uploaded something in the code of the
> web-client on the server ? Or the server admin only can do it ? Thank
> you for answering these basic questions, but I wasn't aware of this
> possibility up to now on V6.0.2 regards
The users don't upload anything themselves, but as soon as you login
using the 6.0 web client (or later) onto an OpenERP server, it queries
the server to know about any installed modules that contain "web
addons", in order to install them automatically.
The installation is done (in 6.0) by retrieving the zipped version of
the web component from the server (there's a special method for that on
the ir.module object), and deploying it locally in the web client.
This mechanism has a built-in update detection so that it will upgrade
the web components if the server-side has a newer version of the module.
All of the above is restricted to admins by default, as only
administrators may install modules on a server. The difference is that
modules can now be split into 2 parts: one part stays server-side, and
another part goes in the web client side (and may also contain python
code, static resources, etc.)
One limitation is that there is no auto-downgrade mechanism, so
connecting a web client to an older version of the OpenERP server/addons
might cause issues under some circumstances (as in the current bug,
where the newer version of the web component is not backwards-compatible).
There's a simple way for system admins to solve the issue: after
changing the config of the web client to go to a different (older)
server, they can just delete all non-core web addons from the "addons"
subdirectory (1 subdir = 1 web addon).
The core web addons that should not be deleted are those that are part
of the standard install:
- openerp
- view_calendar
- view_diagram
- view_graph
- widget_ckeditor
Hope this makes matters more clear...
--
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/797089
Title:
bug with share_create object
Status in OpenERP Web Client:
Invalid
Bug description:
in trunk (tested on chrome and web client)
create a db. In configuration wizard, install extra tools and then, web share.
I got a bug :
In server side :
----------------------------
[2011-06-14 10:52:24,172][?] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
AttributeError: 'share_create' object has no attribute 'has_share'
<type 'exceptions.AttributeError'>
Python 2.6.5: /usr/bin/python
Tue Jun 14 10:52:54 2011
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/home/aline/openerp/server/trunk/openerp/netsvc.py in dispatch(self=<TinySocketClientThread(netrpc-client-127.0.0.1:47265, started 140017077249792)>, service_name='object', method='execute', params=('testbug_14juin', 1, u'a', 'share.wizard', 'has_share'))
426 self.log('service', tuple(replace_request_password(params)), depth=(None if logger.isEnabledFor(logging.DEBUG_RPC_ANSWER) else 1), fn='%s.%s'%(service_name,method))
427 auth = getattr(self, 'auth_provider', None)
428 result = ExportService.getService(service_name).dispatch(method, auth, params)
429 self.log('result', result, channel=logging.DEBUG_RPC_ANSWER)
430 return result
result undefined
global ExportService = <class 'openerp.netsvc.ExportService'>
ExportService.getService = <bound method type.getService of <class 'openerp.netsvc.ExportService'>>
service_name = 'object'
).dispatch undefined
method = 'execute'
auth = None
params = ('testbug_14juin', 1, u'a', 'share.wizard', 'has_share')
/home/aline/openerp/server/trunk/openerp/service/web_services.py in dispatch(self=<openerp.service.web_services.objects_proxy object>, method='execute', auth=None, params=('share.wizard', 'has_share'))
577 ls = netsvc.LocalService('object_proxy')
578 fn = getattr(ls, method)
579 res = fn(db, uid, *params)
580 return res
581
res undefined
fn = <bound method object_proxy.execute of <openerp.osv.osv.object_proxy object>>
db = 'testbug_14juin'
uid = 1
params = ('share.wizard', 'has_share')
/home/aline/openerp/server/trunk/openerp/osv/osv.py in wrapper(self=<openerp.osv.osv.object_proxy object>, dbname='testbug_14juin', *args=(1, 'share.wizard', 'has_share'), **kwargs={})
120 if pooler.get_pool(dbname)._init:
121 raise except_osv('Database not ready', 'Currently, this database is not fully loaded and can not be used.')
122 return f(self, dbname, *args, **kwargs)
123 except orm.except_orm, inst:
124 if inst.name == 'AccessError':
f = <function execute>
self = <openerp.osv.osv.object_proxy object>
dbname = 'testbug_14juin'
args = (1, 'share.wizard', 'has_share')
kwargs = {}
/home/aline/openerp/server/trunk/openerp/osv/osv.py in execute(self=<openerp.osv.osv.object_proxy object>, db='testbug_14juin', uid=1, obj='share.wizard', method='has_share', *args=(), **kw={})
174 if method.startswith('_'):
175 raise except_osv('Access Denied', 'Private methods (such as %s) cannot be called remotely.' % (method,))
176 res = self.execute_cr(cr, uid, obj, method, *args, **kw)
177 if res is None:
178 self.logger.warning('The method %s of the object %s can not return `None` !', method, obj)
res undefined
self = <openerp.osv.osv.object_proxy object>
self.execute_cr = <bound method object_proxy.execute_cr of <openerp.osv.osv.object_proxy object>>
cr = <openerp.sql_db.Cursor object>
uid = 1
obj = 'share.wizard'
method = 'has_share'
args = ()
kw = {}
/home/aline/openerp/server/trunk/openerp/osv/osv.py in execute_cr(self=<openerp.osv.osv.object_proxy object>, cr=<openerp.sql_db.Cursor object>, uid=1, obj='share.wizard', method='has_share', *args=(), **kw={})
165 if not object:
166 raise except_osv('Object Error', 'Object %s doesn\'t exist' % str(obj))
167 return getattr(object, method)(cr, uid, *args, **kw)
168
169 @check
builtingetattr = <built-in function getattr>
object = <share.wizard.share_wizard.share_create object>
method = 'has_share'
cr = <openerp.sql_db.Cursor object>
uid = 1
args = ()
kw = {}
<type 'exceptions.AttributeError'>: 'share_create' object has no attribute 'has_share'
__class__ = <type 'exceptions.AttributeError'>
__delattr__ = <method-wrapper '__delattr__' of exceptions.AttributeError object>
__dict__ = {}
__doc__ = 'Attribute not found.'
__format__ = <built-in method __format__ of exceptions.AttributeError object>
__getattribute__ = <method-wrapper '__getattribute__' of exceptions.AttributeError object>
__getitem__ = <method-wrapper '__getitem__' of exceptions.AttributeError object>
__getslice__ = <method-wrapper '__getslice__' of exceptions.AttributeError object>
__hash__ = <method-wrapper '__hash__' of exceptions.AttributeError object>
__init__ = <method-wrapper '__init__' of exceptions.AttributeError object>
__new__ = <built-in method __new__ of type object>
__reduce__ = <built-in method __reduce__ of exceptions.AttributeError object>
__reduce_ex__ = <built-in method __reduce_ex__ of exceptions.AttributeError object>
__repr__ = <method-wrapper '__repr__' of exceptions.AttributeError object>
__setattr__ = <method-wrapper '__setattr__' of exceptions.AttributeError object>
__setstate__ = <built-in method __setstate__ of exceptions.AttributeError object>
__sizeof__ = <built-in method __sizeof__ of exceptions.AttributeError object>
__str__ = <method-wrapper '__str__' of exceptions.AttributeError object>
__subclasshook__ = <built-in method __subclasshook__ of type object>
__unicode__ = <built-in method __unicode__ of exceptions.AttributeError object>
args = ("'share_create' object has no attribute 'has_share'",)
message = "'share_create' object has no attribute 'has_share'"
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "/home/aline/openerp/server/trunk/openerp/netsvc.py", line 428, in dispatch
result = ExportService.getService(service_name).dispatch(method, auth, params)
File "/home/aline/openerp/server/trunk/openerp/service/web_services.py", line 579, in dispatch
res = fn(db, uid, *params)
File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 122, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/aline/openerp/server/trunk/openerp/osv/osv.py", line 167, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
AttributeError: 'share_create' object has no attribute 'has_share'
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client-web/+bug/797089/+subscriptions
References