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;
|
||||
|
||||
link.toolbar = $('<span class="tree-node-toolbar"></span>').insertAfter(link);
|
||||
|
||||
var node_links = [];
|
||||
// edit
|
||||
$('<a href="#!Form/'+encodeURIComponent(this.ctype)+'/'
|
||||
+encodeURIComponent(data.value)+'">Edit</a>').appendTo(link.toolbar);
|
||||
|
||||
if(data.expandable) {
|
||||
link.toolbar.append(' | <a onclick="erpnext.account_chart.new_node();">Add Child</a>');
|
||||
} else if(this.ctype=='Account') {
|
||||
link.toolbar.append(' | <a onclick="erpnext.account_chart.show_ledger();">View Ledger</a>');
|
||||
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 (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() {
|
||||
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_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);
|
||||
|
||||
// edit
|
||||
$('<a href="#!Form/'+encodeURIComponent(this.ctype)+'/'
|
||||
+encodeURIComponent(data.value)+'">Edit</a>').appendTo(link.toolbar);
|
||||
var node_links = [];
|
||||
|
||||
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) {
|
||||
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() {
|
||||
var me = this;
|
||||
|
@ -64,7 +64,7 @@ cur_frm.cscript.render_communication_list = function(doc, dt, dn) {
|
||||
ListView, function(doctype) {
|
||||
var new_doc = LocalDB.create(doctype);
|
||||
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);
|
||||
});
|
||||
}
|
||||
@ -79,7 +79,7 @@ cur_frm.cscript.render_list = function(doc, doctype, wrapper, ListView, make_new
|
||||
var RecordListView = wn.views.RecordListView.extend({
|
||||
default_docstatus: ['0', '1', '2'],
|
||||
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
|
||||
|
||||
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' }
|
||||
|
||||
# get html of comment row
|
||||
|
@ -83,4 +83,4 @@ class DocType(website.web_page.Page):
|
||||
|
||||
self.doc.comment_list = comment_list or []
|
||||
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