mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-03 21:48:27 +00:00
some file checked out from master
This commit is contained in:
@@ -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'))
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user