introducing model 3.0, refactored import module

This commit is contained in:
Rushabh Mehta
2012-11-23 17:53:43 +05:30
parent a44b66e47a
commit 78d4b49e62
105 changed files with 137 additions and 145 deletions

View File

@@ -67,13 +67,13 @@ def save_pages():
}
import webnotes
from webnotes.model.doclist import DocList
from webnotes.model.wrapper import ModelWrapper
import webnotes.modules.patch_handler
for dt in query_map:
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
try:
DocList(dt, result['name'].encode('utf-8')).save()
ModelWrapper(dt, result['name'].encode('utf-8')).save()
except Exception, e:
webnotes.modules.patch_handler.log(unicode(e))