c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #27446
[Bug 797089] Re: bug with share_create object
Thank you again for your time, I think you are writing a widely awaited documentation in this thread.
Le 27/06/2011 18:10, Olivier Dony (OpenERP) a écrit :
> On 06/27/2011 03:55 PM, Dominique Chabord wrote:
>
> In fact I just checked, and this same 'has_share' attribute has been
> added recently in 6.0 addons branch at revision 4637.
> This was not in 6.0.2, but will be part of 6.0.3. I suppose somehow your
> web client has been connecting to a server that has the (future) 6.0.3
> version of the 'share' module, and later to another one that does not
> have it?
correct. my users can order a 6.0.2 version or a 6.0.2-launchpad version which is impacted by this change.
This explains the problem.
>
>
>> This design means you dropped the capability for a code directory to
>> be used several times for several process. (This so far useless
>> duplication would cost ~15 GB of SSD disk if I cannot avoid it :-( )
>
> Unfortunately, being able to execute several web client instance within
> the same directory has never been a documented feature as far as I know.
Where are client web features documented since 1.0 ? ;-)
It was for me a state-of-the-art rule, but seems it's not.
It was discussed and considered by Amit for the 1.0.
> We don't execute multiple web client instances from the same directory,
> not even in our SaaS server.
It worked perfectly till now and eases updates
> So it's just that in 6.0 we introduced web addons, and decided to store
> them in the same location as the core addons that are builtin in the web
> client.
nobody is perfect ;-)
>
>
>> Correct design would be to add a path to addon directory in the
>> config file, so each process can update separatly if they connect to
>> different openerp servers. I'm still puzzled by this way to update a
>> web client on the fly.
>
> Sorry if this design conflicts with the way you were using the 5.0 web.
V5 customers are not impacted at all. This design impacts the "not-so-
stable" 6.0. I should not have to reconsider administration rules on a
stable version.
> Every day we have to take design decisions, and for sure some of them
> conflict with the way someone else was using OpenERP. We always try to
> be backwards compatible with documented API and features, but we can't
> always preserve compatibility with undocumented features, or side
> effects of the previous design.
I understand the engineer didn't understand what a "stable" version should be, A path in the configuration with a default value as you wish it to be, as far as I know, is the standard design for backward compatibility and avoid to destabilize production servers.
>
> I suppose you may need to extend/modify the web client for your own
> hosting needs, if you want to avoid this.
yes, another one.
>
> BTW, the web client does manage web addons on a per-database basis, so
> each session will only use the relevant web addons. Therefore if your
> multiple clients all connect to the same server, with the same addons
> versions, users should not see anything - that's perhaps an order of
> magnitude less instances needed. The current design is meant to allow
> running hundreds of databases in a single server process and a single
> web client process - you can isolate databases from each other, so
> privacy is preserved.
good to know. Nevertheless, this is not an option for me because I want to keep my hosting open for module customization, even for free hosting.
Many customers appreciate not to be locked in my service offering, and long term experience shows they don't spoil their server if they receive precise instructions.
>
> Be careful that the web client also automatically reloads as soon as its
> files change, so sharing the same directory may have other side-effects
> and cause spurious restarts.
good point, but this is under the control of tools which care about this.
>
I think we can close the point. Thank you
--
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
Follow ups
References