[FIX]:search_view 'groups=' attribute in the child of a field tag was never evaluted:

Example:
<field name='user_id' select='1'>
   <filter domain='[('user_id','=',uid)]' help='My Sale Orders' icon='terp-personal' groups='base.group_extended'/>

bzr revid: nch@tinyerp.com-20101005112653-vg4qh4x5uzt0k2j5
This commit is contained in:
nch@tinyerp.com 2010-10-05 16:56:53 +05:30
parent a694aff5c0
commit 794c319ec9
1 changed files with 4 additions and 4 deletions

View File

@ -1359,8 +1359,8 @@ class orm_template(object):
if trans:
node.set('sum', trans)
if childs:
for f in node:
for f in node:
if childs or (node.tag == 'field' and f.tag in ('filter','separator')):
fields.update(self.__view_look_dom(cr, user, f, view_id, context))
return fields
@ -3922,7 +3922,7 @@ class orm(orm_template):
return True
def _apply_ir_rules(self, cr, uid, query, mode='read', context=None):
"""Add what's missing in ``query`` to implement all appropriate ir.rules
"""Add what's missing in ``query`` to implement all appropriate ir.rules
(using the ``model_name``'s rules or the current model's rules if ``model_name`` is None)
:param query: the current query object
@ -3978,7 +3978,7 @@ class orm(orm_template):
# extract the first field name, to be able to qualify it and add desc/asc
m2o_order = m2o_order.split(",",1)[0].strip().split(" ",1)[0]
# Join the dest m2o table if it's not joined yet. We use [LEFT] OUTER join here
# Join the dest m2o table if it's not joined yet. We use [LEFT] OUTER join here
# as we don't want to exclude results that have NULL values for the m2o
src_table, src_field = qualified_field.replace('"','').split('.', 1)
query.join((src_table, dest_model._table, src_field, 'id'), outer=True)