fix to customer issue, desktop
This commit is contained in:
parent
85df835db2
commit
86945fe178
@ -60,8 +60,7 @@ erpnext.desktop.render = function() {
|
|||||||
// setup
|
// setup
|
||||||
for(var i in wn.boot.modules_list) {
|
for(var i in wn.boot.modules_list) {
|
||||||
var m = wn.boot.modules_list[i];
|
var m = wn.boot.modules_list[i];
|
||||||
if(!in_list(['Setup'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1
|
if(!in_list(['Setup', 'Core'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1)
|
||||||
&& erpnext.modules[m])
|
|
||||||
add_icon(m);
|
add_icon(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,13 +3,18 @@ import webnotes
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
from webnotes.widgets.form.assign_to import add
|
from webnotes.widgets.form.assign_to import add
|
||||||
|
# clear old customer issue todos
|
||||||
|
webnotes.conn.sql("""delete from tabToDo where reference_type='Customer Issue'""")
|
||||||
|
webnotes.conn.sql("""delete from tabComment where comment like '%Form/Customer Issue%'""")
|
||||||
for t in webnotes.conn.sql("""select * from `tabCustomer Issue`
|
for t in webnotes.conn.sql("""select * from `tabCustomer Issue`
|
||||||
where ifnull(allocated_to, '')!=''""", as_dict=1):
|
where ifnull(allocated_to, '')!='' and ifnull(status, "")="Open" """, as_dict=1):
|
||||||
|
print t
|
||||||
add({
|
add({
|
||||||
'doctype': "Customer Issue",
|
'doctype': "Customer Issue",
|
||||||
'name': t['name'],
|
'name': t['name'],
|
||||||
'assign_to': t['allocated_to'],
|
'assign_to': t['allocated_to'],
|
||||||
'assigned_by': t['owner'],
|
'assigned_by': t['owner'],
|
||||||
'description': t['complaint'],
|
'description': t['complaint'],
|
||||||
'date': t['creation']
|
'date': t['creation'],
|
||||||
|
'no_notification': True
|
||||||
})
|
})
|
Loading…
x
Reference in New Issue
Block a user