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

@@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:18",
"creation": "2013-01-23 19:57:18",
"docstatus": 0,
"modified": "2013-01-23 17:11:21",
"modified": "2013-01-29 16:28:03",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -52,6 +52,7 @@
"fieldtype": "Data",
"hidden": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Customer Name",
"no_copy": 1,
"oldfieldname": "customer_name",
@@ -127,6 +128,7 @@
"doctype": "DocField",
"fieldname": "territory",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Territory",
"oldfieldname": "territory",
"oldfieldtype": "Link",
@@ -277,7 +279,7 @@
"label": "Credit Limit",
"oldfieldname": "credit_limit",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"permlevel": 2
},
{

View File

@@ -1,28 +0,0 @@
// render
wn.doclistviews['Customer'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabCustomer`.customer_name",
"`tabCustomer`.territory",
]);
this.show_hide_check_column();
},
prepare_data: function(data) {
this._super(data);
data.customer_name = repl("<a href=\"#!Form/Customer/%(name)s\">%(customer_name)s</a>",
data);
},
columns: [
{width: '3%', content:'check'},
{width: '5%', content:'avatar'},
{width: '50%', content:'customer_name'},
{width: '10%', content:'tags'},
{width: '20%', content:'territory',
css: {'color': '#aaa'}},
{width: '12%', content:'modified',
css: {'text-align': 'right', 'color':'#777'}}
],
});

View File

@@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:19",
"creation": "2013-01-23 19:57:18",
"docstatus": 0,
"modified": "2013-01-22 15:23:24",
"modified": "2013-01-29 14:23:07",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -73,6 +73,7 @@
"fieldtype": "Link",
"hidden": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Customer",
"oldfieldname": "customer",
"oldfieldtype": "Link",
@@ -87,6 +88,7 @@
"fieldtype": "Link",
"hidden": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Lead",
"oldfieldname": "lead",
"oldfieldtype": "Link",
@@ -105,6 +107,7 @@
"doctype": "DocField",
"fieldname": "status",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",

View File

@@ -1,41 +0,0 @@
wn.doclistviews['Opportunity'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
'tabOpportunity.enquiry_from',
'tabOpportunity.lead_name',
'tabOpportunity.customer_name',
'tabOpportunity.status',
'tabOpportunity.transaction_date',
]);
this.stats = this.stats.concat(['status', 'source', 'enquiry_from', 'company']);
},
prepare_data: function(data) {
this._super(data);
if(['Order Confirmed', 'Quotation Sent']
.indexOf(data.status)!=-1) {
data.label_type = 'success';
} else if(data.status == 'Draft') {
data.label_type = 'info';
} else if(data.status == 'Submit') {
data.label_type = 'important';
}
data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
if(data.enquiry_from == 'Lead') {
data.enquiry_name = repl('[%(enquiry_from)s] %(lead_name)s', data);
} else {
data.enquiry_name = repl('[%(enquiry_from)s] %(customer_name)s', data);
}
},
columns: [
{width: '3%', content: 'check'},
{width: '15%', content:'name'},
{width: '18%', content:'status_html'},
{width: '52%', content:'enquiry_name+tags', css: {color:'#222'}},
{width: '12%', content:'transaction_date',
css: {'text-align': 'right', 'color':'#777'},
title: "Opportunity Date", type: "date"}
]
})

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"
},
@@ -85,7 +85,7 @@
"label": "Basic Rate",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1
},
{

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"}
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:19",
"docstatus": 0,
"modified": "2013-01-23 15:46:18",
"modified": "2013-01-29 16:27:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -161,7 +161,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@@ -175,7 +175,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"options": "Company:company:default_currency",
"print_hide": 1,
"reqd": 0,
"search_index": 0,
@@ -190,7 +190,7 @@
"label": "Amount*",
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency(cur_frm.doc.company);",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"reqd": 0,

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:20",
"docstatus": 0,
"modified": "2013-01-23 17:11:22",
"modified": "2013-01-29 16:27:54",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@@ -63,7 +63,7 @@
"label": "Rate",
"oldfieldname": "rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"read_only": 1
},
{

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-22 15:24:17",
"docstatus": 0,
"modified": "2013-01-23 17:11:29",
"modified": "2013-01-29 17:14:58",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -67,6 +67,7 @@
"fieldname": "customer",
"fieldtype": "Link",
"in_filter": 1,
"in_list_view": 1,
"label": "Customer",
"oldfieldname": "customer",
"oldfieldtype": "Link",
@@ -121,6 +122,7 @@
"doctype": "DocField",
"fieldname": "order_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Order Type",
"oldfieldname": "order_type",
"oldfieldtype": "Select",
@@ -249,7 +251,7 @@
"label": "Net Total*",
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 0,
"read_only": 1,
"reqd": 0,
@@ -428,7 +430,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,
"width": "150px"
@@ -456,7 +458,7 @@
"label": "Grand Total*",
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"reqd": 0,
@@ -469,7 +471,7 @@
"label": "Rounded Total",
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"width": "150px"
@@ -791,6 +793,7 @@
"fieldname": "status",
"fieldtype": "Select",
"in_filter": 1,
"in_list_view": 1,
"label": "Status",
"no_copy": 1,
"oldfieldname": "status",
@@ -807,8 +810,9 @@
"description": "% of materials delivered against this Sales Order",
"doctype": "DocField",
"fieldname": "per_delivered",
"fieldtype": "Float",
"fieldtype": "Percent",
"in_filter": 1,
"in_list_view": 1,
"label": "% Delivered",
"no_copy": 1,
"oldfieldname": "per_delivered",
@@ -822,8 +826,9 @@
"description": "% of materials billed against this Sales Order",
"doctype": "DocField",
"fieldname": "per_billed",
"fieldtype": "Float",
"fieldtype": "Percent",
"in_filter": 1,
"in_list_view": 1,
"label": "% Amount Billed",
"no_copy": 1,
"oldfieldname": "per_billed",
@@ -926,7 +931,7 @@
"label": "Total Commission",
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1
},
{

View File

@@ -1,50 +0,0 @@
// render
wn.doclistviews['Sales Order'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabSales Order`.customer_name",
"`tabSales Order`.status",
"`tabSales Order`.order_type",
"ifnull(`tabSales Order`.per_delivered,0) as per_delivered",
"ifnull(`tabSales Order`.per_billed,0) as per_billed",
"`tabSales Order`.currency",
"ifnull(`tabSales Order`.grand_total_export,0) as grand_total_export",
"`tabSales Order`.transaction_date",
]);
this.stats = this.stats.concat(['status', 'order_type', 'company']);
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar'},
{width: '3%', content: 'docstatus'},
{width: '15%', content: 'name'},
{width: '29%', content: 'customer_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: '11%',
content: function(parent, data, me) {
var order_type = data.order_type.toLowerCase();
if (order_type === 'sales') {
me.render_icon(parent, 'icon-tag', data.order_type);
me.render_bar_graph(parent, data, 'per_delivered', 'Delivered');
} else if (order_type === 'maintenance') {
me.render_icon(parent, 'icon-wrench', data.order_type);
}
},
},
{width: '8%', content: 'per_billed', type:'bar-graph', label:'Billed'},
{width: '12%', content:'transaction_date',
css: {'text-align': 'right', 'color':'#777'},
title: "Sales Order Date", type: "date"}
]
});

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:21",
"docstatus": 0,
"modified": "2013-01-23 17:11:22",
"modified": "2013-01-29 16:27:54",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -150,7 +150,7 @@
"label": "Price List Rate*",
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"width": "100px"
@@ -163,7 +163,7 @@
"label": "Basic Rate*",
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"reqd": 0,
"width": "100px"
@@ -177,7 +177,7 @@
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"print_hide": 1,
"read_only": 1,
"reqd": 0,

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:22",
"docstatus": 0,
"modified": "2013-01-23 17:11:23",
"modified": "2013-01-29 16:27:56",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -73,7 +73,7 @@
"label": "Allocated Amount",
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()",
"options": "Company:company:default_currency",
"reqd": 0,
"width": "120px"
},
@@ -96,6 +96,6 @@
"label": "Incentives",
"oldfieldname": "incentives",
"oldfieldtype": "Currency",
"options": "eval:erpnext.get_currency()"
"options": "Company:company:default_currency"
}
]