Merge branch 'master' into edge

This commit is contained in:
Anand Doshi 2013-03-25 13:40:49 +05:30
commit 6e38564357
2 changed files with 7 additions and 2 deletions

View File

@ -3,6 +3,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import webnotes import webnotes
from webnotes import _ from webnotes import _
from webnotes.utils import cstr
from webnotes.widgets.reportview import build_match_conditions from webnotes.widgets.reportview import build_match_conditions
@ -41,9 +42,11 @@ class DocType:
(to_time between %s and %s) or (to_time between %s and %s) or
(%s between from_time and to_time)) (%s between from_time and to_time))
and name!=%s and name!=%s
and ifnull(task, "")=%s
and docstatus < 2""", and docstatus < 2""",
(self.doc.owner, self.doc.from_time, self.doc.to_time, self.doc.from_time, (self.doc.owner, self.doc.from_time, self.doc.to_time, self.doc.from_time,
self.doc.to_time, self.doc.from_time, self.doc.name or "No Name")) self.doc.to_time, self.doc.from_time, self.doc.name or "No Name",
cstr(self.doc.task)))
if existing: if existing:
webnotes.msgprint(_("This Time Log conflicts with") + ":" + ', '.join(existing), webnotes.msgprint(_("This Time Log conflicts with") + ":" + ', '.join(existing),

View File

@ -310,8 +310,10 @@ cur_frm.cscript.barcode = function(doc, cdt, cdn) {
var callback = function(r, rt) { var callback = function(r, rt) {
cur_frm.cscript.item_code(doc, cdt, cdn); cur_frm.cscript.item_code(doc, cdt, cdn);
} }
get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname, if(d.barcode) {
get_server_fields('get_barcode_details', d.barcode, cur_frm.cscript.fname,
doc, cdt, cdn, 1, callback); doc, cdt, cdn, 1, callback);
}
} }
cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field('batch_no').get_query = cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field('batch_no').get_query =