Modifs
bzr revid: pinky-d6af6a25ec04d4deac5f726836325dead03002a7
This commit is contained in:
parent
5f2770ccfc
commit
8963c4e0d8
|
@ -1217,11 +1217,16 @@ class orm(object):
|
||||||
result['view_id'] = sql_res[3]
|
result['view_id'] = sql_res[3]
|
||||||
result['arch'] = sql_res[0]
|
result['arch'] = sql_res[0]
|
||||||
|
|
||||||
# get all views which inherit from (ie modify) this view
|
def _inherit_apply_rec(result, inherit_id):
|
||||||
cr.execute('select arch from ir_ui_view where inherit_id=%d and model=%s order by priority', (sql_res[3], self._name))
|
# get all views which inherit from (ie modify) this view
|
||||||
sql_inherit = cr.fetchall()
|
cr.execute('select arch,id from ir_ui_view where inherit_id=%d and model=%s order by priority', (inherit_id, self._name))
|
||||||
for (inherit,) in sql_inherit:
|
sql_inherit = cr.fetchall()
|
||||||
result['arch'] = _inherit_apply(result['arch'], inherit)
|
for (inherit,id) in sql_inherit:
|
||||||
|
result = _inherit_apply(result, inherit)
|
||||||
|
result = _inherit_apply_rec(result,id)
|
||||||
|
return result
|
||||||
|
|
||||||
|
result['arch'] = _inherit_apply_rec(result['arch'], sql_res[3])
|
||||||
|
|
||||||
result['name'] = sql_res[1]
|
result['name'] = sql_res[1]
|
||||||
result['field_parent'] = sql_res[2] or False
|
result['field_parent'] = sql_res[2] or False
|
||||||
|
@ -1343,12 +1348,12 @@ class orm(object):
|
||||||
if args[i][0]=='active':
|
if args[i][0]=='active':
|
||||||
if not args[i][2]:
|
if not args[i][2]:
|
||||||
del args[i]
|
del args[i]
|
||||||
break
|
|
||||||
i += 1
|
i += 1
|
||||||
if i==len(args):
|
if i==len(args):
|
||||||
args.append(('active', '=', 1))
|
args.append(('active', '=', 1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# if the object has a field named 'company_id', filter out all
|
# if the object has a field named 'company_id', filter out all
|
||||||
# records which do not concern the current company (the company
|
# records which do not concern the current company (the company
|
||||||
# of the current user) or its "childs"
|
# of the current user) or its "childs"
|
||||||
|
@ -1533,7 +1538,6 @@ class orm(object):
|
||||||
if res_trans:
|
if res_trans:
|
||||||
res[lang][f]=res_trans
|
res[lang][f]=res_trans
|
||||||
else:
|
else:
|
||||||
print "columns:", self._columns[f].string
|
|
||||||
res[lang][f]=self._columns[f].string
|
res[lang][f]=self._columns[f].string
|
||||||
for table in self._inherits:
|
for table in self._inherits:
|
||||||
cols = intersect(self._inherit_fields.keys(), fields)
|
cols = intersect(self._inherit_fields.keys(), fields)
|
||||||
|
|
Loading…
Reference in New Issue