fix in listviews of lead, customer and supplier
This commit is contained in:
parent
8afa88b906
commit
3b6eda3b45
@ -11,13 +11,14 @@ wn.doclistviews['Supplier'] = wn.views.ListView.extend({
|
|||||||
|
|
||||||
prepare_data: function(data) {
|
prepare_data: function(data) {
|
||||||
this._super(data);
|
this._super(data);
|
||||||
|
data.supplier_name = repl("<a href=\"#!Form/Supplier/%(name)s\">%(supplier_name)s</a>",
|
||||||
|
data);
|
||||||
},
|
},
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{width: '3%', content: 'check'},
|
{width: '3%', content: 'check'},
|
||||||
{width: '5%', content:'avatar'},
|
{width: '5%', content:'avatar'},
|
||||||
{width: '20%', content:'name'},
|
{width: '50%', content:'supplier_name'},
|
||||||
{width: '30%', content:'supplier_name'},
|
|
||||||
{width: '10%', content:'tags'},
|
{width: '10%', content:'tags'},
|
||||||
{width: '20%', content:'supplier_type', css: {'color': '#aaa'}},
|
{width: '20%', content:'supplier_type', css: {'color': '#aaa'}},
|
||||||
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
# DocType, Communication Log
|
|
||||||
[
|
|
||||||
|
|
||||||
# These values are common in all dictionaries
|
|
||||||
{
|
|
||||||
'creation': '2012-03-27 14:36:09',
|
|
||||||
'docstatus': 0,
|
|
||||||
'modified': '2012-03-27 14:36:09',
|
|
||||||
'modified_by': u'Administrator',
|
|
||||||
'owner': u'Administrator'
|
|
||||||
},
|
|
||||||
|
|
||||||
# These values are common for all DocType
|
|
||||||
{
|
|
||||||
'colour': u'White:FFF',
|
|
||||||
'doctype': 'DocType',
|
|
||||||
'istable': 1,
|
|
||||||
'module': u'Selling',
|
|
||||||
'name': '__common__',
|
|
||||||
'section_style': u'Tray',
|
|
||||||
'server_code_error': u' ',
|
|
||||||
'show_in_menu': 0,
|
|
||||||
'version': 10
|
|
||||||
},
|
|
||||||
|
|
||||||
# These values are common for all DocField
|
|
||||||
{
|
|
||||||
'allow_on_submit': 1,
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'name': '__common__',
|
|
||||||
'parent': u'Communication Log',
|
|
||||||
'parentfield': u'fields',
|
|
||||||
'parenttype': u'DocType',
|
|
||||||
'permlevel': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocType, Communication Log
|
|
||||||
{
|
|
||||||
'doctype': 'DocType',
|
|
||||||
'name': u'Communication Log'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'date',
|
|
||||||
'fieldtype': u'Date',
|
|
||||||
'in_filter': 1,
|
|
||||||
'label': u'Date',
|
|
||||||
'oldfieldname': u'date',
|
|
||||||
'oldfieldtype': u'Date'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'notes',
|
|
||||||
'fieldtype': u'Small Text',
|
|
||||||
'in_filter': 0,
|
|
||||||
'label': u'Notes',
|
|
||||||
'oldfieldname': u'notes',
|
|
||||||
'oldfieldtype': u'Small Text',
|
|
||||||
'width': u'300px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'colour': u'White:FFF',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'follow_up_type',
|
|
||||||
'fieldtype': u'Select',
|
|
||||||
'in_filter': 1,
|
|
||||||
'label': u'Communication type',
|
|
||||||
'oldfieldname': u'follow_up_type',
|
|
||||||
'oldfieldtype': u'Select',
|
|
||||||
'options': u'\nPhone\nEmail\nSMS\nVisit\nOther'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'follow_up_by',
|
|
||||||
'fieldtype': u'Link',
|
|
||||||
'in_filter': 1,
|
|
||||||
'label': u'Communication by',
|
|
||||||
'oldfieldname': u'follow_up_by',
|
|
||||||
'oldfieldtype': u'Link',
|
|
||||||
'options': u'Sales Person'
|
|
||||||
}
|
|
||||||
]
|
|
@ -9,12 +9,20 @@ wn.doclistviews['Customer'] = wn.views.ListView.extend({
|
|||||||
this.show_hide_check_column();
|
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: [
|
columns: [
|
||||||
{width: '3%', content:'check'},
|
{width: '3%', content:'check'},
|
||||||
{width: '5%', content:'avatar'},
|
{width: '5%', content:'avatar'},
|
||||||
{width: '50%', content:'name'},
|
{width: '50%', content:'customer_name'},
|
||||||
{width: '10%', content:'tags'},
|
{width: '10%', content:'tags'},
|
||||||
{width: '20%', content:'territory', css: {'color': '#aaa'}},
|
{width: '20%', content:'territory',
|
||||||
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
css: {'color': '#aaa'}},
|
||||||
]
|
{width: '12%', content:'modified',
|
||||||
|
css: {'text-align': 'right', 'color':'#777'}}
|
||||||
|
],
|
||||||
});
|
});
|
||||||
|
@ -19,15 +19,16 @@ wn.doclistviews['Lead'] = wn.views.ListView.extend({
|
|||||||
data.label_type = 'info'
|
data.label_type = 'info'
|
||||||
}
|
}
|
||||||
data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
|
data.status_html = repl('<span class="label label-%(label_type)s">%(status)s</span>', data);
|
||||||
|
data.lead_name = repl("<a href=\"#!Form/Lead/%(name)s\">%(lead_name)s</a>",
|
||||||
data.lead_name = (data.rating ? ('['+data.rating+'] ') : '') + '['+data.source+'] ' + data.lead_name;
|
data);
|
||||||
|
data.lead_status = (data.rating ? ('['+data.rating+'] ') : '') + '['+data.source+']';
|
||||||
},
|
},
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{width: '3%', content: 'check'},
|
{width: '3%', content: 'check'},
|
||||||
{width: '20%', content:'name'},
|
{width: '30%', content:'lead_name'},
|
||||||
{width: '12%', content:'status_html'},
|
{width: '12%', content:'status_html'},
|
||||||
{width: '52%', content:'lead_name+tags', css: {color:'#222'}},
|
{width: '42%', content:'lead_status+tags', css: {color:'#222'}},
|
||||||
{width: '13%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
{width: '13%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user