[FIX] ir: small fix to handle missing models when upgrading
bzr revid: rco@openerp.com-20121005102003-16vbr0aive2mbtid
This commit is contained in:
parent
bc9f1eeb4d
commit
5a971eca90
|
@ -557,7 +557,9 @@ class ir_model_access(osv.osv):
|
|||
model_name = model
|
||||
|
||||
# TransientModel records have no access rights, only an implicit access rule
|
||||
if self.pool.get(model_name).is_transient():
|
||||
if not self.pool.get(model_name):
|
||||
_logger.error('Missing model %s' % (model_name, ))
|
||||
elif self.pool.get(model_name).is_transient():
|
||||
return True
|
||||
|
||||
# We check if a specific rule exists
|
||||
|
|
|
@ -265,7 +265,7 @@ class ir_ui_menu(osv.osv):
|
|||
}
|
||||
if menu.action and menu.action.type in ('ir.actions.act_window','ir.actions.client') and menu.action.res_model:
|
||||
obj = self.pool.get(menu.action.res_model)
|
||||
if obj._needaction:
|
||||
if obj and obj._needaction:
|
||||
if menu.action.type=='ir.actions.act_window':
|
||||
dom = menu.action.domain and eval(menu.action.domain, {'uid': uid}) or []
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue