more fixes to perms, floats and default enabled / disabled in search

This commit is contained in:
Rushabh Mehta
2013-01-23 10:09:28 +05:30
parent efe8102351
commit 6382a42dbe
25 changed files with 330 additions and 290 deletions

View File

@@ -1,2 +1,6 @@
cur_frm.cscript.refresh = function(doc) {
cur_frm.set_intro("");
if(!cur_frm.doc.enabled) {
cur_frm.set_intro(wn._("This Currency is disabled. Enable to use in transactions"))
}
}

View File

@@ -0,0 +1,19 @@
wn.doclistviews['Currency'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabCurrency`.enabled",
]);
this.stats = this.stats.concat(['enabled']);
this.order_by = "`tabCurrency`.`enabled` desc, `tabCurrency`.modified desc";
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar'},
{width: '3%', content: "enabled"},
{width: '70%', content: 'name'},
{width: '20%', content:'modified',
css: {'text-align': 'right', 'color': '#777'}},
]
});