Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
a189af48f6
@ -162,14 +162,24 @@ cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
|
|||||||
cur_frm.cscript.customer = function(doc,dt,dn,onload) {
|
cur_frm.cscript.customer = function(doc,dt,dn,onload) {
|
||||||
|
|
||||||
var callback = function(r,rt) {
|
var callback = function(r,rt) {
|
||||||
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
var callback2 = function(doc, dt, dn) {
|
||||||
get_server_fields('get_debit_to','','',doc, dt, dn, 0);
|
doc = locals[dt][dn];
|
||||||
|
if(doc.debit_to && doc.posting_date){
|
||||||
|
get_server_fields('get_cust_and_due_date','','',doc,dt,dn,1,
|
||||||
|
function(doc, dt, dn) {
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
||||||
|
get_server_fields('get_debit_to','','',doc, dt, dn, 0, callback2);
|
||||||
}
|
}
|
||||||
var args = onload ? 'onload':''
|
var args = onload ? 'onload':''
|
||||||
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', args, callback);
|
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', args, callback);
|
||||||
|
|
||||||
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
SELECT gl.account,sum(gl.credit) as amount
|
SELECT gl.account,sum(gl.credit) as amount
|
||||||
FROM `tabGL Entry` gl, `tabAccount` a
|
FROM `tabGL Entry` gl, `tabAccount` a
|
||||||
WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s'
|
WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s' and ifnull(gl.is_cancelled, 'No') = 'No'
|
||||||
GROUP BY gl.account
|
GROUP BY gl.account
|
||||||
ORDER BY posting_date
|
ORDER BY posting_date
|
||||||
|
@ -69,14 +69,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Hover and click effects */
|
/* Hover and click effects */
|
||||||
.case-border:hover, .circle:hover {
|
.case-border:hover, .circle:hover, .hover-effect {
|
||||||
box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
|
box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
|
||||||
-moz-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
|
-moz-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
|
||||||
-webkit-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
|
-webkit-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
|
||||||
-o-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
|
-o-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.case-border:active, .case-border:focus, .circle:active, .circle:focus {
|
.case-border:active, .case-border:focus, .case-border-click {
|
||||||
transform: scale(0.98, 0.98);
|
transform: scale(0.98, 0.98);
|
||||||
-ms-transform: scale(0.98, 0.98); /* IE 9 */
|
-ms-transform: scale(0.98, 0.98); /* IE 9 */
|
||||||
-webkit-transform: scale(0.98, 0.98); /* Safari and Chrome */
|
-webkit-transform: scale(0.98, 0.98); /* Safari and Chrome */
|
||||||
@ -84,6 +84,14 @@
|
|||||||
-moz-transform: scale(0.98, 0.98); /* Firefox */
|
-moz-transform: scale(0.98, 0.98); /* Firefox */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.circle:active, .circle:focus, .circle-click {
|
||||||
|
transform: scale(1, 1);
|
||||||
|
-ms-transform: scale(1, 1); /* IE 9 */
|
||||||
|
-webkit-transform: scale(1, 1); /* Safari and Chrome */
|
||||||
|
-o-transform: scale(1, 1); /* Opera */
|
||||||
|
-moz-transform: scale(1, 1); /* Firefox */
|
||||||
|
}
|
||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
-moz-border-radius: 30px;
|
-moz-border-radius: 30px;
|
||||||
@ -93,9 +101,8 @@
|
|||||||
min-width: 15px;
|
min-width: 15px;
|
||||||
background: #B00D07;
|
background: #B00D07;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
z-index: 2;
|
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: -10px;
|
margin-top: -74px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
border: 2px solid white;
|
border: 2px solid white;
|
||||||
box-shadow: 0 0 10px 1px black;
|
box-shadow: 0 0 10px 1px black;
|
||||||
@ -106,10 +113,8 @@
|
|||||||
|
|
||||||
.circle-text {
|
.circle-text {
|
||||||
color: white;
|
color: white;
|
||||||
vertical-align: middle;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-top: -3px;
|
margin-top: 1px;
|
||||||
text-shadow: 1px 1px 5px #000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,9 +95,37 @@ erpnext.desktop.render = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
erpnext.desktop.show_pending_notifications = function() {
|
erpnext.desktop.show_pending_notifications = function() {
|
||||||
$('#messages a:first').prepend('<div id="msg_count" class="circle" title="Unread Messages">\
|
var add_circle = function(str_module, id, title) {
|
||||||
<span class="circle-text"></span></div>');
|
var module = $('#'+str_module);
|
||||||
$('#msg_count').toggle(false);
|
module.find('a:first').append(
|
||||||
|
repl('<div id="%(id)s" class="circle" title="%(title)s" style="display: None">\
|
||||||
|
<span class="circle-text"></span>\
|
||||||
|
</div>', {id: id, title: title}));
|
||||||
|
|
||||||
|
var case_border = module.find('.case-border');
|
||||||
|
var circle = module.find('.circle');
|
||||||
|
|
||||||
|
var add_hover_and_click = function(primary, secondary, hover_class, click_class) {
|
||||||
|
primary
|
||||||
|
.hover(
|
||||||
|
function() { secondary.addClass(hover_class); },
|
||||||
|
function() { secondary.removeClass(hover_class); })
|
||||||
|
.mousedown(function() { secondary.addClass(click_class); })
|
||||||
|
.mouseup(function() { secondary.removeClass(click_class); })
|
||||||
|
.focusin(function() { $(this).mousedown(); })
|
||||||
|
.focusout(function() { $(this).mouseup(); })
|
||||||
|
}
|
||||||
|
|
||||||
|
add_hover_and_click(case_border, circle, 'hover-effect', 'circle-click');
|
||||||
|
add_hover_and_click(circle, case_border, 'hover-effect', 'case-border-click');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
add_circle('messages', 'unread_messages', 'Unread Messages');
|
||||||
|
add_circle('support', 'open_support_tickets', 'Open Support Tickets');
|
||||||
|
add_circle('todo', 'things_todo', 'Things To Do');
|
||||||
|
add_circle('calendar', 'todays_events', 'Todays Events');
|
||||||
|
|
||||||
update_messages();
|
update_messages();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -600,7 +600,7 @@ pscript.home_make_status = function() {
|
|||||||
// get values
|
// get values
|
||||||
$c_page('home', 'event_updates', 'get_status_details', user,
|
$c_page('home', 'event_updates', 'get_status_details', user,
|
||||||
function(r,rt) {
|
function(r,rt) {
|
||||||
page_body.wntoolbar.set_new_comments(r.message.unread_messages);
|
//page_body.wntoolbar.set_new_comments(r.message.unread_messages);
|
||||||
|
|
||||||
// render online users
|
// render online users
|
||||||
pscript.online_users_obj.render(r.message.online_users);
|
pscript.online_users_obj.render(r.message.online_users);
|
||||||
|
@ -26,8 +26,7 @@ def get_online_users(arg=None):
|
|||||||
and t1.user not in ('Guest','Administrator')
|
and t1.user not in ('Guest','Administrator')
|
||||||
and TIMESTAMPDIFF(HOUR,t1.lastupdate,NOW()) <= 1""", as_list=1) or []
|
and TIMESTAMPDIFF(HOUR,t1.lastupdate,NOW()) <= 1""", as_list=1) or []
|
||||||
|
|
||||||
@webnotes.whitelist()
|
def get_unread_messages():
|
||||||
def get_unread_messages(arg=None):
|
|
||||||
"returns unread (docstatus-0 messages for a user)"
|
"returns unread (docstatus-0 messages for a user)"
|
||||||
return webnotes.conn.sql("""\
|
return webnotes.conn.sql("""\
|
||||||
SELECT name, comment
|
SELECT name, comment
|
||||||
@ -37,6 +36,49 @@ def get_unread_messages(arg=None):
|
|||||||
AND ifnull(docstatus,0)=0
|
AND ifnull(docstatus,0)=0
|
||||||
""", webnotes.user.name, as_list=1)
|
""", webnotes.user.name, as_list=1)
|
||||||
|
|
||||||
|
def get_open_support_tickets():
|
||||||
|
"""
|
||||||
|
Returns a count of open support tickets
|
||||||
|
"""
|
||||||
|
from webnotes.utils import cint
|
||||||
|
open_support_tickets = webnotes.conn.sql("""\
|
||||||
|
SELECT COUNT(*) FROM `tabSupport Ticket`
|
||||||
|
WHERE status = 'Open'""")
|
||||||
|
return open_support_tickets and cint(open_support_tickets[0][0]) or 0
|
||||||
|
|
||||||
|
def get_things_todo():
|
||||||
|
"""
|
||||||
|
Returns a count of incomplete todos
|
||||||
|
"""
|
||||||
|
from webnotes.utils import cint
|
||||||
|
incomplete_todos = webnotes.conn.sql("""\
|
||||||
|
SELECT COUNT(*) FROM `tabToDo Item`
|
||||||
|
WHERE IFNULL(checked, 0) = 0
|
||||||
|
AND owner = %s""", webnotes.session.get('user'))
|
||||||
|
return incomplete_todos and cint(incomplete_todos[0][0]) or 0
|
||||||
|
|
||||||
|
def get_todays_events():
|
||||||
|
"""
|
||||||
|
Returns a count of todays events in calendar
|
||||||
|
"""
|
||||||
|
from webnotes.utils import nowdate, cint
|
||||||
|
todays_events = webnotes.conn.sql("""\
|
||||||
|
SELECT COUNT(*) FROM `tabEvent`
|
||||||
|
WHERE owner = %s
|
||||||
|
AND event_type != 'Cancel'
|
||||||
|
AND event_date = %s""", (
|
||||||
|
webnotes.session.get('user'), nowdate()))
|
||||||
|
return todays_events and cint(todays_events[0][0]) or 0
|
||||||
|
|
||||||
|
@webnotes.whitelist()
|
||||||
|
def get_global_status_messages(arg=None):
|
||||||
|
return {
|
||||||
|
'unread_messages': get_unread_messages(),
|
||||||
|
'open_support_tickets': get_open_support_tickets(),
|
||||||
|
'things_todo': get_things_todo(),
|
||||||
|
'todays_events': get_todays_events(),
|
||||||
|
}
|
||||||
|
|
||||||
@webnotes.whitelist()
|
@webnotes.whitelist()
|
||||||
def get_status_details(arg=None):
|
def get_status_details(arg=None):
|
||||||
"""get toolbar items"""
|
"""get toolbar items"""
|
||||||
@ -47,7 +89,8 @@ def get_status_details(arg=None):
|
|||||||
# system messages
|
# system messages
|
||||||
ret = {
|
ret = {
|
||||||
'user_count': len(online) or 0,
|
'user_count': len(online) or 0,
|
||||||
'unread_messages': get_unread_messages(),
|
#'unread_messages': get_unread_messages(),
|
||||||
|
#'open_support_tickets': get_open_support_tickets(),
|
||||||
'online_users': online or [],
|
'online_users': online or [],
|
||||||
'setup_status': get_setup_status(),
|
'setup_status': get_setup_status(),
|
||||||
'registration_complete': cint(get_defaults('registration_complete')) and 'Yes' or 'No',
|
'registration_complete': cint(get_defaults('registration_complete')) and 'Yes' or 'No',
|
||||||
|
@ -203,7 +203,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': u'<a href="javascript:cur_frm.cscript.CGHelp();">To manage Customer Groups, click here</a>',
|
'description': u'<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'customer_group',
|
'fieldname': u'customer_group',
|
||||||
'fieldtype': u'Link',
|
'fieldtype': u'Link',
|
||||||
@ -223,7 +223,7 @@
|
|||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'description': u'<a href="javascript:cur_frm.cscript.TerritoryHelp();">To manage Territory, click here</a>',
|
'description': u'<a href="#!Sales Browser/Territory">To manage Territory, click here</a>',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'territory',
|
'fieldname': u'territory',
|
||||||
'fieldtype': u'Link',
|
'fieldtype': u'Link',
|
||||||
|
@ -209,13 +209,14 @@ class DocType(TransactionBase):
|
|||||||
if default: add_cond = 'ifnull(t2.is_default,0) = 1'
|
if default: add_cond = 'ifnull(t2.is_default,0) = 1'
|
||||||
else: add_cond = 't1.parent = "'+cstr(obj.doc.charge)+'"'
|
else: add_cond = 't1.parent = "'+cstr(obj.doc.charge)+'"'
|
||||||
idx = 0
|
idx = 0
|
||||||
other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1)
|
other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate, t1.cost_center_other_charges from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1)
|
||||||
for other in other_charge:
|
for other in other_charge:
|
||||||
d = addchild(obj.doc, 'other_charges', 'RV Tax Detail', 1, obj.doclist)
|
d = addchild(obj.doc, 'other_charges', 'RV Tax Detail', 1, obj.doclist)
|
||||||
d.charge_type = other['charge_type']
|
d.charge_type = other['charge_type']
|
||||||
d.row_id = other['row_id']
|
d.row_id = other['row_id']
|
||||||
d.description = other['description']
|
d.description = other['description']
|
||||||
d.account_head = other['account_head']
|
d.account_head = other['account_head']
|
||||||
|
d.cost_center_other_charges = other['cost_center_other_charges']
|
||||||
d.rate = flt(other['rate'])
|
d.rate = flt(other['rate'])
|
||||||
d.tax_amount = flt(other['tax_amount'])
|
d.tax_amount = flt(other['tax_amount'])
|
||||||
d.included_in_print_rate = cint(other['included_in_print_rate'])
|
d.included_in_print_rate = cint(other['included_in_print_rate'])
|
||||||
|
@ -231,7 +231,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldtype': 'HTML',
|
||||||
'label': 'IGHelp',
|
'label': 'IGHelp',
|
||||||
'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Item Group\');">To manage Item Groups, click here</a>'
|
'options': '<a href="#!Sales Browser/Item Group">To manage Item Groups, click here</a>'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -391,7 +391,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldtype': 'HTML',
|
||||||
'label': 'CGHelp',
|
'label': 'CGHelp',
|
||||||
'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Customer Group\');">To manage Customer Groups, click here</a>'
|
'options': '<a href="#!Sales Browser/Customer Group">To manage Customer Groups, click here</a>'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
@ -408,7 +408,7 @@
|
|||||||
'doctype': 'DocField',
|
'doctype': 'DocField',
|
||||||
'fieldtype': 'HTML',
|
'fieldtype': 'HTML',
|
||||||
'label': 'TerritoryHelp',
|
'label': 'TerritoryHelp',
|
||||||
'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Territory\');">To manage Territory, click here</a>'
|
'options': '<a href="#!Sales Browser/Territory">To manage Territory, click here</a>'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
|
@ -183,7 +183,7 @@
|
|||||||
'idx': 5,
|
'idx': 5,
|
||||||
'label': 'SPHelp',
|
'label': 'SPHelp',
|
||||||
'oldfieldtype': 'HTML',
|
'oldfieldtype': 'HTML',
|
||||||
'options': '<a href="javascript:cur_frm.cscript.TreePage(\'Sales Person\');">To manage Sales Person, click here</a>',
|
'options': '<a href="#!Sales Browser/Sales Person">To manage Sales Person, click here</a>',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -87,6 +87,7 @@ def boot_session(bootinfo):
|
|||||||
|
|
||||||
import webnotes.model.doctype
|
import webnotes.model.doctype
|
||||||
bootinfo['docs'] += webnotes.model.doctype.get('Event')
|
bootinfo['docs'] += webnotes.model.doctype.get('Event')
|
||||||
|
bootinfo['docs'] += webnotes.model.doctype.get('Search Criteria')
|
||||||
|
|
||||||
bootinfo['modules_list'] = webnotes.conn.get_global('modules_list')
|
bootinfo['modules_list'] = webnotes.conn.get_global('modules_list')
|
||||||
|
|
||||||
|
@ -110,20 +110,29 @@ var update_messages = function(reset) {
|
|||||||
if(inList(['Guest'], user)) { return; }
|
if(inList(['Guest'], user)) { return; }
|
||||||
|
|
||||||
if(!reset) {
|
if(!reset) {
|
||||||
$c_page('home', 'event_updates', 'get_unread_messages', null,
|
$c_page('home', 'event_updates', 'get_global_status_messages', null,
|
||||||
function(r,rt) {
|
function(r,rt) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
// This function is defined in toolbar.js
|
// This function is defined in toolbar.js
|
||||||
page_body.wntoolbar.set_new_comments(r.message);
|
page_body.wntoolbar.set_new_comments(r.message.unread_messages);
|
||||||
var circle = $('#msg_count')
|
|
||||||
if(circle) {
|
var show_in_circle = function(parent_id, msg) {
|
||||||
if(r.message.length) {
|
var parent = $('#'+parent_id);
|
||||||
circle.find('span:first').text(r.message.length);
|
if(parent) {
|
||||||
circle.toggle(true);
|
if(msg) {
|
||||||
|
parent.find('span:first').text(msg);
|
||||||
|
parent.toggle(true);
|
||||||
} else {
|
} else {
|
||||||
circle.toggle(false);
|
parent.toggle(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
show_in_circle('unread_messages', r.message.unread_messages.length);
|
||||||
|
show_in_circle('open_support_tickets', r.message.open_support_tickets);
|
||||||
|
show_in_circle('things_todo', r.message.things_todo);
|
||||||
|
show_in_circle('todays_events', r.message.todays_events);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
clearInterval(wn.updates.id);
|
clearInterval(wn.updates.id);
|
||||||
}
|
}
|
||||||
@ -131,7 +140,7 @@ var update_messages = function(reset) {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
page_body.wntoolbar.set_new_comments(0);
|
page_body.wntoolbar.set_new_comments(0);
|
||||||
$('#msg_count').toggle(false);
|
$('#unread_messages').toggle(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@
|
|||||||
'module': u'Stock',
|
'module': u'Stock',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'read_only_onload': 1,
|
'read_only_onload': 1,
|
||||||
'search_fields': u'status,transaction_date,customer,customer_name, territory,grand_total',
|
'search_fields': u'status,customer,customer_name, territory,grand_total',
|
||||||
'section_style': u'Tabbed',
|
'section_style': u'Tabbed',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': u'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
|
'subject': u'To %(customer_name)s on %(posting_date)s | %(per_billed)s% billed',
|
||||||
'tag_fields': u'billing_status',
|
'tag_fields': u'billing_status',
|
||||||
'version': 475
|
'version': 475
|
||||||
},
|
},
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
'module': u'Stock',
|
'module': u'Stock',
|
||||||
'name': '__common__',
|
'name': '__common__',
|
||||||
'read_only_onload': 1,
|
'read_only_onload': 1,
|
||||||
'search_fields': u'status, transaction_date, supplier',
|
'search_fields': u'status, posting_date, supplier',
|
||||||
'section_style': u'Tabbed',
|
'section_style': u'Tabbed',
|
||||||
'server_code_error': u' ',
|
'server_code_error': u' ',
|
||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': u'From %(supplier_name)s against %(purchase_order)s on %(transaction_date)s',
|
'subject': u'From %(supplier_name)s against %(purchase_order)s on %(posting_date)s',
|
||||||
'version': 325
|
'version': 325
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<div class="section-item">
|
<div class="section-item">
|
||||||
<a class="section-link"
|
<a class="section-link"
|
||||||
title = "Readings of incoming quality inspections"
|
title = "Readings of incoming quality inspections"
|
||||||
href="#!List/List/QA Inspection Report">Incoming Inspection</a>
|
href="#!List/QA Inspection Report">Incoming Inspection</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="section-item">
|
<div class="section-item">
|
||||||
<a class="section-link"
|
<a class="section-link"
|
||||||
@ -71,7 +71,6 @@
|
|||||||
title = "Helper for managing return of goods (sales or purchase)"
|
title = "Helper for managing return of goods (sales or purchase)"
|
||||||
href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales or Purchase Returns</a>
|
href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales or Purchase Returns</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
|
File diff suppressed because one or more lines are too long
@ -595,7 +595,7 @@ var v=_f.get_value(this.doctype,this.docname,this.df.fieldname);else{if(this.opt
|
|||||||
var v=this.options_list[0];else
|
var v=this.options_list[0];else
|
||||||
var v=null;}
|
var v=null;}
|
||||||
this.input.set_input(v);}
|
this.input.set_input(v);}
|
||||||
this.input.set_input=function(v){if(!v){if(!me.input.multiple){if(me.docname){if(me.options_list&&me.options_list.length){me.set(me.options_list[0]);me.input.value=me.options_list[0];}else{me.input.value='';}}}}else{if(me.options_list){if(me.input.multiple){for(var i=0;i<me.input.options.length;i++){me.input.options[i].selected=0;if(me.input.options[i].value&&inList(v.split(","),me.input.options[i].value))
|
this.input.set_input=function(v){if(!v){if(!me.input.multiple){if(me.docname){if(me.options_list&&me.options_list.length){me.set(me.options_list[0]);me.input.value=me.options_list[0];}else{me.input.value='';}}}}else{if(me.options_list){if(me.input.multiple){for(var i=0;i<me.input.options.length;i++){me.input.options[i].selected=0;if(me.input.options[i].value&&inList(typeof(v)=='string'?v.split(","):v,me.input.options[i].value))
|
||||||
me.input.options[i].selected=1;}}else if(in_list(me.options_list,v)){me.input.value=v;}}}}
|
me.input.options[i].selected=1;}}else if(in_list(me.options_list,v)){me.input.value=v;}}}}
|
||||||
this.get_value=function(){if(me.input.multiple){var l=[];for(var i=0;i<me.input.options.length;i++){if(me.input.options[i].selected)l[l.length]=me.input.options[i].value;}
|
this.get_value=function(){if(me.input.multiple){var l=[];for(var i=0;i<me.input.options.length;i++){if(me.input.options[i].selected)l[l.length]=me.input.options[i].value;}
|
||||||
return l;}else{if(me.input.options){var val=sel_val(me.input);if(!val&&!me.input.selectedIndex)
|
return l;}else{if(me.input.options){var val=sel_val(me.input);if(!val&&!me.input.selectedIndex)
|
||||||
@ -1077,8 +1077,8 @@ else if(nm=='Accounts Browser')
|
|||||||
pscript.make_chart(chart_type);}
|
pscript.make_chart(chart_type);}
|
||||||
loadpage(nm,call_back);}
|
loadpage(nm,call_back);}
|
||||||
var update_messages=function(reset){if(inList(['Guest'],user)){return;}
|
var update_messages=function(reset){if(inList(['Guest'],user)){return;}
|
||||||
if(!reset){$c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);var circle=$('#msg_count')
|
if(!reset){$c_page('home','event_updates','get_global_status_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message.unread_messages);var show_in_circle=function(parent_id,msg){var parent=$('#'+parent_id);if(parent){if(msg){parent.find('span:first').text(msg);parent.toggle(true);}else{parent.toggle(false);}}}
|
||||||
if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#msg_count').toggle(false);}}
|
show_in_circle('unread_messages',r.message.unread_messages.length);show_in_circle('open_support_tickets',r.message.open_support_tickets);show_in_circle('things_todo',r.message.things_todo);show_in_circle('todays_events',r.message.todays_events);}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#unread_messages').toggle(false);}}
|
||||||
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||||
wn.updates.id=setInterval(update_messages,60000);}
|
wn.updates.id=setInterval(update_messages,60000);}
|
||||||
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
|
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
|
||||||
|
@ -1 +1 @@
|
|||||||
821
|
841
|
10
wnf.py
10
wnf.py
@ -118,6 +118,9 @@ def setup_options():
|
|||||||
metavar = "search replace_by extension",
|
metavar = "search replace_by extension",
|
||||||
help="file search-replace")
|
help="file search-replace")
|
||||||
|
|
||||||
|
parser.add_option("--cci", nargs=1, metavar="CacheItem Key",
|
||||||
|
help="Clear Cache Item")
|
||||||
|
|
||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
@ -229,6 +232,13 @@ def run():
|
|||||||
import webnotes.utils.scheduler
|
import webnotes.utils.scheduler
|
||||||
print webnotes.utils.scheduler.trigger('execute_' + options.run_scheduler_event)
|
print webnotes.utils.scheduler.trigger('execute_' + options.run_scheduler_event)
|
||||||
|
|
||||||
|
elif options.cci is not None:
|
||||||
|
if options.cci=='all':
|
||||||
|
webnotes.conn.sql("DELETE FROM __CacheItem")
|
||||||
|
else:
|
||||||
|
from webnotes.utils.cache import CacheItem
|
||||||
|
CacheItem(options.cci).clear()
|
||||||
|
|
||||||
# print messages
|
# print messages
|
||||||
if webnotes.message_log:
|
if webnotes.message_log:
|
||||||
print '\n'.join(webnotes.message_log)
|
print '\n'.join(webnotes.message_log)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user