Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
12e1a5f983
@ -116,15 +116,23 @@ erpnext.AccountsChart = Class.extend({
|
|||||||
if(!data) return;
|
if(!data) return;
|
||||||
|
|
||||||
link.toolbar = $('<span class="tree-node-toolbar"></span>').insertAfter(link);
|
link.toolbar = $('<span class="tree-node-toolbar"></span>').insertAfter(link);
|
||||||
// edit
|
|
||||||
$('<a href="#!Form/'+encodeURIComponent(this.ctype)+'/'
|
|
||||||
+encodeURIComponent(data.value)+'">Edit</a>').appendTo(link.toolbar);
|
|
||||||
|
|
||||||
if(data.expandable) {
|
var node_links = [];
|
||||||
link.toolbar.append(' | <a onclick="erpnext.account_chart.new_node();">Add Child</a>');
|
// edit
|
||||||
} else if(this.ctype=='Account') {
|
if (wn.boot.profile.can_read.indexOf(this.ctype) !== -1) {
|
||||||
link.toolbar.append(' | <a onclick="erpnext.account_chart.show_ledger();">View Ledger</a>');
|
node_links.push('<a href="#!Form/'+encodeURIComponent(this.ctype)+'/'
|
||||||
|
+encodeURIComponent(data.value)+'">Edit</a>');
|
||||||
}
|
}
|
||||||
|
if (data.expandable) {
|
||||||
|
if (wn.boot.profile.can_create.indexOf(this.ctype) !== -1 ||
|
||||||
|
wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
|
||||||
|
node_links.push('<a onclick="erpnext.account_chart.new_node();">Add Child</a>');
|
||||||
|
}
|
||||||
|
} else if (this.ctype === 'Account' && wn.boot.profile.can_read.indexOf("GL Entry") !== -1) {
|
||||||
|
node_links.push('<a onclick="erpnext.account_chart.show_ledger();">View Ledger</a>');
|
||||||
|
}
|
||||||
|
|
||||||
|
link.toolbar.append(node_links.join(" | "));
|
||||||
},
|
},
|
||||||
show_ledger: function() {
|
show_ledger: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
4
erpnext/patches/august_2012/changed_blog_date_format.py
Normal file
4
erpnext/patches/august_2012/changed_blog_date_format.py
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
def execute():
|
||||||
|
import webnotes
|
||||||
|
from webnotes.model.doclist import DocList
|
||||||
|
DocList("Website Settings", "Website Settings").save()
|
@ -521,4 +521,8 @@ patch_list = [
|
|||||||
'patch_module': 'patches.august_2012',
|
'patch_module': 'patches.august_2012',
|
||||||
'patch_file': 'report_supplier_quotations',
|
'patch_file': 'report_supplier_quotations',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'patch_module': 'patches.august_2012',
|
||||||
|
'patch_file': 'changed_blog_date_format',
|
||||||
|
},
|
||||||
]
|
]
|
@ -79,12 +79,21 @@ erpnext.SalesChart = Class.extend({
|
|||||||
link.toolbar = $('<span class="tree-node-toolbar"></span>').insertAfter(link);
|
link.toolbar = $('<span class="tree-node-toolbar"></span>').insertAfter(link);
|
||||||
|
|
||||||
// edit
|
// edit
|
||||||
$('<a href="#!Form/'+encodeURIComponent(this.ctype)+'/'
|
var node_links = [];
|
||||||
+encodeURIComponent(data.value)+'">Edit</a>').appendTo(link.toolbar);
|
|
||||||
|
if (wn.boot.profile.can_read.indexOf(this.ctype) !== -1) {
|
||||||
|
node_links.push('<a href="#!Form/'+encodeURIComponent(this.ctype)+'/'
|
||||||
|
+encodeURIComponent(data.value)+'">Edit</a>');
|
||||||
|
}
|
||||||
|
|
||||||
if(data.expandable) {
|
if(data.expandable) {
|
||||||
link.toolbar.append(' | <a onclick="erpnext.sales_chart.new_node();">Add Child</a>');
|
if (wn.boot.profile.can_create.indexOf(this.ctype) !== -1 ||
|
||||||
|
wn.boot.profile.in_create.indexOf(this.ctype) !== -1) {
|
||||||
|
node_links.push('<a onclick="erpnext.sales_chart.new_node();">Add Child</a>');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
link.toolbar.append(node_links.join(" | "));
|
||||||
},
|
},
|
||||||
new_node: function() {
|
new_node: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -64,7 +64,7 @@ cur_frm.cscript.render_communication_list = function(doc, dt, dn) {
|
|||||||
ListView, function(doctype) {
|
ListView, function(doctype) {
|
||||||
var new_doc = LocalDB.create(doctype);
|
var new_doc = LocalDB.create(doctype);
|
||||||
new_doc = locals[doctype][new_doc];
|
new_doc = locals[doctype][new_doc];
|
||||||
new_doc[doc.doctype.toLowerCase()] = doc.name;
|
new_doc[doc.doctype.toLowerCase().replace(" ", "_")] = doc.name;
|
||||||
loaddoc(new_doc.doctype, new_doc.name);
|
loaddoc(new_doc.doctype, new_doc.name);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ cur_frm.cscript.render_list = function(doc, doctype, wrapper, ListView, make_new
|
|||||||
var RecordListView = wn.views.RecordListView.extend({
|
var RecordListView = wn.views.RecordListView.extend({
|
||||||
default_docstatus: ['0', '1', '2'],
|
default_docstatus: ['0', '1', '2'],
|
||||||
default_filters: [
|
default_filters: [
|
||||||
[doctype, doc.doctype.toLowerCase(), '=', doc.name],
|
[doctype, doc.doctype.toLowerCase().replace(" ", "_"), '=', doc.name],
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ def add_comment(args=None):
|
|||||||
|
|
||||||
import webnotes.utils
|
import webnotes.utils
|
||||||
|
|
||||||
comment['comment_date'] = webnotes.utils.pretty_date(comment['creation'])
|
comment['comment_date'] = webnotes.utils.global_date_format(comment['creation'])
|
||||||
template_args = { 'comment_list': [comment], 'template': 'html/comment.html' }
|
template_args = { 'comment_list': [comment], 'template': 'html/comment.html' }
|
||||||
|
|
||||||
# get html of comment row
|
# get html of comment row
|
||||||
|
@ -83,4 +83,4 @@ class DocType(website.web_page.Page):
|
|||||||
|
|
||||||
self.doc.comment_list = comment_list or []
|
self.doc.comment_list = comment_list or []
|
||||||
for comment in self.doc.comment_list:
|
for comment in self.doc.comment_list:
|
||||||
comment['comment_date'] = webnotes.utils.pretty_date(comment['creation'])
|
comment['comment_date'] = webnotes.utils.global_date_format(comment['creation'])
|
Loading…
x
Reference in New Issue
Block a user