removing listviews and added hide_currency_symbol in global defaults

This commit is contained in:
Rushabh Mehta
2013-01-28 15:11:18 +05:30
parent b6a45fad5e
commit 4dbc813741
6 changed files with 20 additions and 90 deletions

View File

@@ -23,6 +23,7 @@ keydict = {
"fiscal_year": "current_fiscal_year", "fiscal_year": "current_fiscal_year",
'company': 'default_company', 'company': 'default_company',
'currency': 'default_currency', 'currency': 'default_currency',
'hide_currency_symbol':'hide_currency_symbol',
'price_list_name': 'default_price_list', 'price_list_name': 'default_price_list',
'price_list_currency': 'default_price_list_currency', 'price_list_currency': 'default_price_list_currency',
'item_group': 'default_item_group', 'item_group': 'default_item_group',

View File

@@ -2,7 +2,7 @@
{ {
"creation": "2013-01-28 10:06:02", "creation": "2013-01-28 10:06:02",
"docstatus": 0, "docstatus": 0,
"modified": "2013-01-28 10:36:35", "modified": "2013-01-28 15:09:04",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@@ -92,6 +92,14 @@
"fieldtype": "Column Break", "fieldtype": "Column Break",
"width": "50%" "width": "50%"
}, },
{
"description": "Do not show any symbol like $ etc next to currencies.",
"doctype": "DocField",
"fieldname": "hide_currency_symbol",
"fieldtype": "Select",
"label": "Hide Currency Symbol",
"options": "\nNo\nYes"
},
{ {
"default": "INR", "default": "INR",
"doctype": "DocField", "doctype": "DocField",

View File

@@ -2,7 +2,7 @@
{ {
"creation": "2013-01-10 16:34:31", "creation": "2013-01-10 16:34:31",
"docstatus": 0, "docstatus": 0,
"modified": "2013-01-22 14:56:40", "modified": "2013-01-28 15:00:15",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@@ -116,6 +116,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "subject", "fieldname": "subject",
"fieldtype": "Small Text", "fieldtype": "Small Text",
"in_list_view": 1,
"label": "Subject", "label": "Subject",
"reqd": 1 "reqd": 1
}, },
@@ -157,6 +158,7 @@
"doctype": "DocField", "doctype": "DocField",
"fieldname": "email_sent", "fieldname": "email_sent",
"fieldtype": "Check", "fieldtype": "Check",
"in_list_view": 1,
"label": "Email Sent?", "label": "Email Sent?",
"no_copy": 1, "no_copy": 1,
"read_only": 1 "read_only": 1

View File

@@ -1,34 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
wn.doclistviews['Newsletter'] = wn.views.ListView.extend({
init: function(doclistview) {
this._super(doclistview);
this.fields = this.fields.concat([
"`tabNewsletter`.subject",
"`tabNewsletter`.email_sent",
]);
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content: 'avatar'},
{width: '15%', content: 'name'},
{width: '55%', content: 'subject+tags'},
{width: '22%', content:'modified',
css: {'text-align': 'right', 'color':'#777'}}
],
});

View File

@@ -2,7 +2,7 @@
{ {
"creation": "2013-01-10 16:34:31", "creation": "2013-01-10 16:34:31",
"docstatus": 0, "docstatus": 0,
"modified": "2013-01-24 14:29:22", "modified": "2013-01-28 14:53:34",
"modified_by": "Administrator", "modified_by": "Administrator",
"owner": "Administrator" "owner": "Administrator"
}, },
@@ -58,6 +58,7 @@
"fieldname": "status", "fieldname": "status",
"fieldtype": "Select", "fieldtype": "Select",
"in_filter": 0, "in_filter": 0,
"in_list_view": 1,
"label": "Status", "label": "Status",
"no_copy": 1, "no_copy": 1,
"oldfieldname": "status", "oldfieldname": "status",
@@ -72,8 +73,11 @@
"fieldname": "subject", "fieldname": "subject",
"fieldtype": "Data", "fieldtype": "Data",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1,
"label": "Subject", "label": "Subject",
"reqd": 1 "report_hide": 0,
"reqd": 1,
"search_index": 0
}, },
{ {
"doctype": "DocField", "doctype": "DocField",
@@ -86,6 +90,7 @@
"fieldname": "raised_by", "fieldname": "raised_by",
"fieldtype": "Data", "fieldtype": "Data",
"in_filter": 1, "in_filter": 1,
"in_list_view": 1,
"label": "Raised By (Email)", "label": "Raised By (Email)",
"oldfieldname": "raised_by", "oldfieldname": "raised_by",
"oldfieldtype": "Data", "oldfieldtype": "Data",

View File

@@ -1,52 +0,0 @@
// render
wn.doclistviews['Support Ticket'] = wn.views.ListView.extend({
init: function(d) {
this._super(d)
this.fields = this.fields.concat([
"`tabSupport Ticket`.status",
"`tabSupport Ticket`.subject",
"`tabSupport Ticket`.description",
'`tabSupport Ticket`.modified_by'
]);
this.stats = this.stats.concat(['status']);
this.show_hide_check_column();
},
label_style: {
"status": {
"Open": "danger",
"Closed": "success",
"Hold": "info",
"Waiting for Customer": "info"
}
},
prepare_data: function(data) {
this._super(data);
data.label_style = this.label_style.status[data.status];
if(data.label_style=="danger")
data.label_style = "important"
data.status_html = repl('<span class="label \
label-%(label_style)s">%(status)s</span>', data);
// escape double quotes
data.description = cstr(data.subject)
+ " | " + cstr(data.description);
data.description = data.description.replace(/"/gi, '\"')
.replace(/</gi, '&lt;').replace(/>/gi, '&gt;');
},
columns: [
{width: '3%', content: 'check'},
{width: '5%', content:'avatar_modified'},
{width: '20%', content:'name'},
{width: '10%', content:'status_html'},
{width: '50%', content:'description+tags', css: {color:'#222'}},
{width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}}
]
});