[IMP] improve template of export tree structure and tree open on 2 level.
bzr revid: ysa@tinyerp.com-20110715055746-m2ukkqyrxcnqmcy2
This commit is contained in:
@@ -21,10 +21,8 @@ class Export(View):
|
||||
|
||||
id = prefix + (prefix and '/'or '') + key
|
||||
nm = name + (name and '/' or '') + value['string']
|
||||
levels = nm.split('/')
|
||||
levels > 1 and levels.remove(levels[0]) or []
|
||||
record.update(id=id, string= nm, action='javascript: void(0)',
|
||||
target=None, icon=None, children=[], level = levels)
|
||||
target=None, icon=None, children=[])
|
||||
records.append(record)
|
||||
|
||||
if value.get('relation', False):
|
||||
|
||||
@@ -89,12 +89,16 @@
|
||||
<td>
|
||||
<table width="100%" border="0">
|
||||
<tr class="row">
|
||||
<t t-foreach="field.level" t-as="level" >
|
||||
<td width="18">&nbsp;</td>
|
||||
<t t-foreach="(field.id).split('/')" t-as="level" >
|
||||
<t t-if="(field.id).split('/')[0] != level">
|
||||
<td width="18">&nbsp;</td>
|
||||
</t>
|
||||
</t>
|
||||
<td valign="top" align="left" style="cursor: pointer;" width="18">
|
||||
<t t-if="(field.children).length >= 1">
|
||||
<img t-att-id="'parentimg-' + field.id" src="/base/static/src/img/expand.gif" width="16" height="16" border="0"/>
|
||||
<t t-if="(field.id).split('/').length != 3">
|
||||
<img t-att-id="'parentimg-' + field.id" src="/base/static/src/img/expand.gif" width="16" height="16" border="0"/>
|
||||
</t>
|
||||
</t>
|
||||
</td>
|
||||
<td valign="top" align="left" style="cursor: pointer;">
|
||||
|
||||
Reference in New Issue
Block a user