mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
introducing model 3.0, refactored import module
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user