setting list_views

This commit is contained in:
Rushabh Mehta
2013-01-29 17:53:29 +05:30
parent 6abb2e67e9
commit 08da1a0a3d
105 changed files with 575 additions and 1736 deletions

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
"modified": "2013-01-23 17:11:22",
"modified": "2013-01-29 16:27:53",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -105,6 +105,7 @@
"fieldtype": "Text",
"hidden": 1,
"in_filter": 0,
"in_list_view": 1,
"label": "Lead Name",
"read_only": 1
},
@@ -113,6 +114,7 @@
"fieldname": "customer_name",
"fieldtype": "Data",
"hidden": 1,
"in_list_view": 1,
"label": "Customer Name",
"read_only": 1
},
@@ -242,7 +244,7 @@
"no_copy": 0,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -414,7 +416,7 @@
"label": "Taxes and Charges Total*",
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1
},
@@ -442,7 +444,7 @@
"no_copy": 0,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@@ -456,7 +458,7 @@
"no_copy": 0,
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"width": "200px"
@@ -486,6 +488,7 @@
"doctype": "DocField",
"fieldname": "grand_total_export",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Grand Total",
"no_copy": 0,
"oldfieldname": "grand_total_export",

View File

@@ -1,44 +0,0 @@
// render
wn.doclistviews['Quotation'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabQuotation`.quotation_to",
"`tabQuotation`.lead_name",
"`tabQuotation`.customer_name",
"`tabQuotation`.currency",
"ifnull(`tabQuotation`.grand_total_export,0) as grand_total_export",
"`tabQuotation`.transaction_date",
]);
this.stats = this.stats.concat(['status', 'quotation_to', 'company']);
},
prepare_data: function(data) {
this._super(data);
if(data.quotation_to == 'Lead') {
data.quotation_name = repl('[%(quotation_to)s] %(lead_name)s', data);
} else {
data.quotation_name = repl('[%(quotation_to)s] %(customer_name)s', data);
}
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content:'avatar'},
{width: '3%', content:'docstatus'},
{width: '15%', content:'name'},
{width: '44%', content:'quotation_name+tags', css: {color:'#222'}},
{
width: '18%',
content: function(parent, data) {
$(parent).html(format_currency(data.grand_total_export, data.currency))
},
css: {'text-align':'right'}
},
{width: '12%', content:'transaction_date',
css: {'text-align': 'right', 'color':'#777'},
title: "Quotation Date", type: "date"}
]
});