From ad76337fa3ddcca577a7b0f0a039e4d5f3b2a0bd Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 10 May 2012 12:40:16 +0530 Subject: [PATCH 1/4] if not permlevel set 0 --- py/core/doctype/doctype/doctype.py | 1 + 1 file changed, 1 insertion(+) diff --git a/py/core/doctype/doctype/doctype.py b/py/core/doctype/doctype/doctype.py index ff3e766f3c..44d1a47581 100644 --- a/py/core/doctype/doctype/doctype.py +++ b/py/core/doctype/doctype/doctype.py @@ -75,6 +75,7 @@ class DocType: fieldnames = {} illegal = ['.', ',', ' ', '-', '&', '%', '=', '"', "'", '*', '$'] for d in self.doclist: + if not d.permlevel: d.permlevel = 0 if d.parent and d.fieldtype and d.parent == self.doc.name: # check if not double if d.fieldname: From 81cae80b40908f09cb43a209a540d1def68f2070 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 May 2012 17:09:31 +0530 Subject: [PATCH 2/4] do not connect to db while doing a pull --- wnf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wnf.py b/wnf.py index 190831f656..3ab036989e 100755 --- a/wnf.py +++ b/wnf.py @@ -164,7 +164,7 @@ def run(): webnotes.connect(options.db_name, options.password) else: webnotes.connect(options.db_name) - elif not options.install: + elif not any([options.install, options.pull]): webnotes.connect(conf.db_name) # build From a24cf7daf56d39808e0e00e2229d549c4080df50 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 May 2012 17:28:59 +0530 Subject: [PATCH 3/4] fix in Suggest type field's autosuggest --- js/legacy/widgets/form/fields.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/legacy/widgets/form/fields.js b/js/legacy/widgets/form/fields.js index da0a51b48a..1e3fbcecbe 100644 --- a/js/legacy/widgets/form/fields.js +++ b/js/legacy/widgets/form/fields.js @@ -454,6 +454,9 @@ DataField.prototype.make_input = function() { response(r.results); } }); + }, + select: function(event, ui) { + me.set(ui.item.value); } }); } From e4eacaab81099a9ad48fa37cd19faeef24fa8285 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 11 May 2012 17:52:29 +0530 Subject: [PATCH 4/4] fix in time issue --- js/legacy/utils/datetime.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/legacy/utils/datetime.js b/js/legacy/utils/datetime.js index 86c4c06efd..0cfa9abf9a 100644 --- a/js/legacy/utils/datetime.js +++ b/js/legacy/utils/datetime.js @@ -222,7 +222,7 @@ wn.datetime.only_date = function(val) { wn.datetime.time_to_ampm = function(v) { if(!v) { var d = new Date(); - var t = [d.getHours(), cint(d.getMinutes()/5)*5] + var t = [d.getHours(), cint(d.getMinutes()/5)*5 + ''] } else { var t = v.split(':'); } @@ -246,6 +246,9 @@ wn.datetime.time_to_hhmm = function(hh,mm,am) { } else if(am == 'PM' && hh!='12') { hh = cint(hh) + 12; } + if(!mm) mm='00'; + if(!hh) hh='00'; + return hh + ':' + mm; }