[IMP] use existing tools for the job

bzr revid: xmo@openerp.com-20131018141510-1x1w5ba5fqfzebfk
This commit is contained in:
Xavier Morel 2013-10-18 16:15:10 +02:00
parent aeb0125c84
commit 8d6302f260
1 changed files with 1 additions and 1 deletions

View File

@ -775,7 +775,7 @@ class view(osv.osv):
for key in values:
value = isinstance(values, (dict,)) and values[key] or key
if isinstance(value, (browse_record,)):
if value.__dict__.get('_uid') == openerp.SUPERUSER_ID and uid != openerp.SUPERUSER_ID:
if getattr(value, '_uid', None) == openerp.SUPERUSER_ID and uid != openerp.SUPERUSER_ID:
message = 'SUPERUSER_ID Access used for rendering "%s" in a xml view: %s' % (key, id_or_xml_id,)
_logger.warn(message)
elif isinstance(value, (dict, list, browse_record_list,)):