Merge branch 'master' of git://github.com/webnotes/erpnext

This commit is contained in:
Nijil Y 2011-12-22 17:43:46 +05:30
commit f2a5c290b3
3 changed files with 26 additions and 2 deletions

View File

@ -0,0 +1,6 @@
import webnotes
def execute():
webnotes.conn.sql("""\
DELETE FROM `tabProperty Setter`
WHERE property='previous_field'
""")

View File

@ -0,0 +1,9 @@
import webnotes
def execute():
doc_type_list = webnotes.conn.sql("""SELECT DISTINCT parent FROM `tabDocField` where idx=0""")
for doc_type in doc_type_list:
if doc_type and doc_type[0]:
webnotes.conn.sql("""\
UPDATE `tabDocField` SET idx=idx+1
WHERE parent=%s
""", doc_type[0])

View File

@ -121,6 +121,8 @@ class DocType:
#webnotes.msgprint(query) #webnotes.msgprint(query)
#webnotes.msgprint(res) #webnotes.msgprint(res)
result[query] = (res and len(res)==1) and res[0] or (res and res or None) result[query] = (res and len(res)==1) and res[0] or (res and res or None)
if result[query] is None:
del result[query]
return result return result
@ -586,7 +588,7 @@ class DocType:
}, },
'bank_balance': { 'bank_balance': {
'table': 'bank_balance' in result and table({ 'table': 'bank_balance' in result and result['bank_balance'] and table({
'head': 'Bank Balance', 'head': 'Bank Balance',
'body': [ 'body': [
[ [
@ -662,8 +664,15 @@ class DocType:
table_list.append(\ table_list.append(\
"<div style='font-size: 16px; color: grey'>[" + \ "<div style='font-size: 16px; color: grey'>[" + \
k.capitalize() + \ k.capitalize() + \
"]<br />Missing: Ledger of type 'Bank or Cash'\ "]<br />Missing: Account of type 'Bank or Cash'\
</div>") </div>")
elif k=='bank_balance':
table_list.append(\
"<div style='font-size: 16px; color: grey'>[" + \
"Bank Balance" + \
"]<br />Alert: GL Entry not found for Account of type 'Bank or Cash'\
</div>")
i = 0 i = 0
result = [] result = []