From f06796941790c1879b25de826e58656982e3893c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 9 Sep 2011 12:14:45 +0530 Subject: [PATCH] error fixed in sales browser control --- setup/doctype/sales_browser_control/sales_browser_control.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/doctype/sales_browser_control/sales_browser_control.py b/setup/doctype/sales_browser_control/sales_browser_control.py index d4c4a1316b..e9f8242450 100644 --- a/setup/doctype/sales_browser_control/sales_browser_control.py +++ b/setup/doctype/sales_browser_control/sales_browser_control.py @@ -131,7 +131,7 @@ class DocType: r = eval(args) - if r['lft'] == 0: + if r['lft'] == 0 and r['action'] != 'Create': n = sql("select lft,rgt from `tab%s` where name = '%s'"%(r['node_title'],r['nm'])) r['lft'] = n[0][0] r['rgt'] = n[0][1] @@ -212,4 +212,4 @@ class DocType: if res: msgprint("'%s' record is already exist."%(r['nm'])) return 'true' - return 'false' \ No newline at end of file + return 'false'