fix in setup control and patch to fix existing docstatus problem

This commit is contained in:
Anand Doshi 2012-10-05 15:10:40 +05:30
parent 976f9eeab7
commit ae09b37a08
2 changed files with 11 additions and 4 deletions

View File

@ -623,4 +623,8 @@ patch_list = [
'patch_module': 'patches.october_2012',
'patch_file': 'remove_old_customer_contact_address',
},
{
'patch_module': 'patches.october_2012',
'patch_file': 'company_fiscal_year_docstatus_patch',
},
]

View File

@ -192,10 +192,13 @@ class DocType:
rec = Document(d)
for fn in master_dict[d].keys():
rec.fields[fn] = master_dict[d][fn]
# add blank fields
for fn in rec.fields:
if fn not in master_dict[d].keys()+['name','owner','doctype']:
rec.fields[fn] = ''
# Note: I have no idea why this was there!
# # add blank fields
# for fn in rec.fields:
# if fn not in master_dict[d].keys()+['name','owner','doctype']:
# rec.fields[fn] = ''
rec_obj = get_obj(doc=rec)
rec_obj.doc.save(1)
if hasattr(rec_obj, 'on_update'):