[IMP]Implement show required field.
bzr revid: kch@tinyerp.com-20110722095036-9jf225y2xxpsmc0m
This commit is contained in:
parent
c36ed657df
commit
bd53153386
|
@ -81,7 +81,7 @@ class Export(View):
|
||||||
id = prefix + (prefix and '/'or '') + field
|
id = prefix + (prefix and '/'or '') + field
|
||||||
nm = name + (name and '/' or '') + value['string']
|
nm = name + (name and '/' or '') + value['string']
|
||||||
record.update(id=id, string= nm, action='javascript: void(0)',
|
record.update(id=id, string= nm, action='javascript: void(0)',
|
||||||
target=None, icon=None, children=[], field_type=value.get('type',False))
|
target=None, icon=None, children=[], field_type=value.get('type',False), required=value.get('required', False))
|
||||||
records.append(record)
|
records.append(record)
|
||||||
|
|
||||||
if len(nm.split('/')) < 3 and value.get('relation', False):
|
if len(nm.split('/')) < 3 and value.get('relation', False):
|
||||||
|
|
|
@ -8,6 +8,10 @@ tr.ui-selected td {
|
||||||
background-color: #CCCCCC;
|
background-color: #CCCCCC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.requiredfield {
|
||||||
|
background-color: #D2D2FF;
|
||||||
|
}
|
||||||
|
|
||||||
.row:hover{
|
.row:hover{
|
||||||
background-color: #F3F3F3;
|
background-color: #F3F3F3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,6 +207,10 @@ openerp.base_export.Export = openerp.base.Dialog.extend({
|
||||||
$('#left_field_panel').append(QWeb.render('ExportTreeView-Secondary', {'fields': result}));
|
$('#left_field_panel').append(QWeb.render('ExportTreeView-Secondary', {'fields': result}));
|
||||||
}
|
}
|
||||||
_.each(result, function(record) {
|
_.each(result, function(record) {
|
||||||
|
if ((record.required == true) || record.required == "True"){
|
||||||
|
var required_fld = $("tr[id^='treerow-" + record.id + "']").find('#tree-column');
|
||||||
|
required_fld.addClass("requiredfield");
|
||||||
|
}
|
||||||
$("img[id ^='parentimg-" + record.id +"']").click(function(){
|
$("img[id ^='parentimg-" + record.id +"']").click(function(){
|
||||||
self.on_click(this.id, result);
|
self.on_click(this.id, result);
|
||||||
});
|
});
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</td>
|
</td>
|
||||||
<td valign="top" align="left" style="cursor: pointer;">
|
<td id="tree-column" valign="middle" align="left" style="cursor: pointer;">
|
||||||
<a t-att-id="'export-' + field.id" t-att-string="field.string" href="javascript: void(0);" style="text-decoration: none;">
|
<a t-att-id="'export-' + field.id" t-att-string="field.string" href="javascript: void(0);" style="text-decoration: none;">
|
||||||
<t t-esc="field.string"/>
|
<t t-esc="field.string"/>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue