some file checked out from master

This commit is contained in:
Nabin Hait
2011-09-09 13:13:06 +05:30
parent 4303218771
commit 00be94860b
5 changed files with 13 additions and 10 deletions

View File

@@ -29,7 +29,7 @@ class DocType:
set_default(defkey, defvalue)
if defkey == 'fiscal_year':
ysd = sql("select year_start_date from `tabFiscal Year` where name=%s", defvalue)
ysd = sql("select year_start_date from `tabFiscal Year` where name=%s", cstr(defvalue))
ysd = ysd and ysd[0][0] or ''
if ysd:
set_default('year_start_date', ysd.strftime('%Y-%m-%d'))

View File

@@ -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'
return 'false'