From 73ea15d2d3cef716ce0209bad7c3fa825d33554a Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 25 Mar 2013 12:09:24 +0530 Subject: [PATCH 1/2] for checking timelog conflicts, also check if tasks are the same --- projects/doctype/time_log/time_log.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/doctype/time_log/time_log.py b/projects/doctype/time_log/time_log.py index fe5d287718e..8ab46c1086b 100644 --- a/projects/doctype/time_log/time_log.py +++ b/projects/doctype/time_log/time_log.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import webnotes from webnotes import _ +from webnotes.utils import cstr from webnotes.widgets.reportview import build_match_conditions @@ -41,9 +42,11 @@ class DocType: (to_time between %s and %s) or (%s between from_time and to_time)) and name!=%s + and ifnull(task, "")=%s and docstatus < 2""", (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: webnotes.msgprint(_("This Time Log conflicts with") + ":" + ', '.join(existing), From 7e062b335244a17a72d362084509547b56259452 Mon Sep 17 00:00:00 2001 From: Akhilesh Darjee Date: Mon, 25 Mar 2013 12:28:39 +0530 Subject: [PATCH 2/2] barcode error in sales_invoice fixed. --- selling/doctype/sales_common/sales_common.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index d34261d65ef..e15565aa749 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -310,8 +310,10 @@ cur_frm.cscript.barcode = function(doc, cdt, cdn) { var callback = function(r, rt) { 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); + } } cur_frm.fields_dict[cur_frm.cscript.fname].grid.get_field('batch_no').get_query =