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

@@ -63,7 +63,7 @@ def map_fields(field_list, source, target):
def import_vouchers(common_values, data, start_idx, import_type):
from webnotes.model.doc import Document
from webnotes.model.doclist import DocList
from webnotes.model.wrapper import ModelWrapper
from webnotes.model.code import get_obj
from accounts.utils import get_fiscal_year
from webnotes.utils.dateutils import parse_date
@@ -158,7 +158,7 @@ def import_vouchers(common_values, data, start_idx, import_type):
If you entered accounts correctly, please check template once"""]
raise Exception
doclist = DocList([jv]+details)
doclist = ModelWrapper([jv]+details)
doclist.submit()
messages.append("""<p style='color: green'>[row #%s]