[FIX] condition for displaying open/close arrow of tree views

failed to display it in the BOM structure screen even on nodes with children

lp bug: https://launchpad.net/bugs/877995 fixed

bzr revid: xmo@openerp.com-20111123142820-5o7wx3rqd5r18lgk
This commit is contained in:
Xavier Morel
2011-11-23 15:28:20 +01:00
+3 -2
View File
@@ -534,16 +534,17 @@
t-att-id="'treerow_' + record.id"
t-att-data-id="record.id" t-att-data-level="level + 1">
<t t-set="children" t-value="record[children_field]"/>
<t t-set="has_children" t-value="children and children.length"/>
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
<td t-foreach="fields_view" t-as="field"
t-if="!field.attrs.modifiers.tree_invisible"
t-att-data-id="record.id"
t-att-style="color_for(record) + (!field_index ? 'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;' : '')"
t-att-class="!field_index and has_children ? 'treeview-tr' : 'treeview-td'">
t-att-class="class">
<span t-if="!field.attrs.modifiers.invisible">
<t t-esc="render(record[field.attrs.name], fields[field.attrs.name])" />
</span>
<t t-set="class" t-value="'treeview-td'"/>
</td>
</tr>