openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #06971
[Bug 927817] Re: _is_osv_memory (6.1 Trunk)
*** This bug is a duplicate of bug 908875 ***
https://bugs.launchpad.net/bugs/908875
I'm getting the same error with a database ported from 6.0 to 6.1. When
assigning groups to a user and trying to access with it. No errors when
accesing with the admin user though.
server: 4043
addons: 6552
Any news on this? Can I help you with extra information?
Thanks!
Yaiza
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/927817
Title:
_is_osv_memory (6.1 Trunk)
Status in OpenERP Server:
New
Bug description:
In ir_model.py
classe ir_model
def _is_osv_memory(self, cr, uid, ids, field_name, arg, context=None):
models = self.browse(cr, uid, ids, context=context)
res = dict.fromkeys(ids)
for model in models:
res[model.id] = self.pool.get(model.model).is_transient()
return res
If you create a new model, test it, and finaly you remove it, model
now removed from ir_model table, so when we try to configure group
this function is called and browse all id result of this error :
AttributeError: 'NoneType' object has no attribute 'is_transient'
Because the model in ir_model table NOT IN self.pool because we remove
it from code, and not remove from database.
maybe add something like that to validate
for model in models:
res[model.id] = self.pool.get(model.model) and self.pool.get(model.model).is_transient() or False
or
for model in models:
obj = self.pool.get(model.model)
res[model.id] = obj and obj.is_transient() or False
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/927817/+subscriptions
References