mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
introducing model 3.0, refactored import module
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model.doclist import DocList
|
||||
DocList("Website Settings", "Website Settings").save()
|
||||
from webnotes.model.wrapper import ModelWrapper
|
||||
ModelWrapper("Website Settings", "Website Settings").save()
|
||||
@@ -21,7 +21,7 @@ from __future__ import unicode_literals
|
||||
import webnotes
|
||||
from webnotes.model import delete_doc
|
||||
from webnotes.modules import reload_doc
|
||||
from webnotes.modules.export_module import export_to_files
|
||||
from webnotes.modules.export_file import export_to_files
|
||||
sql = webnotes.conn.sql
|
||||
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ sql = webnotes.conn.sql
|
||||
from webnotes.utils import cint, cstr
|
||||
|
||||
def create_proper_index():
|
||||
from webnotes.modules.export_module import export_to_files
|
||||
from webnotes.modules.export_file import export_to_files
|
||||
|
||||
dt_index_fields={
|
||||
'Purchase Receipt Item': ['prevdoc_docname', 'item_code', 'warehouse', 'prevdoc_detail_docname'],
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import webnotes
|
||||
|
||||
def execute():
|
||||
webnotes.conn.sql("""delete from `tabSearch Criteria` where name='Delivery Note Itemwise Pending To Bill'""")
|
||||
from webnotes.modules import reload_doc
|
||||
reload_doc("stock", "report", "delivered_items_to_be_billed")
|
||||
@@ -675,4 +675,8 @@ patch_list = [
|
||||
'patch_module': 'patches.november_2012',
|
||||
'patch_file': 'disable_cancelled_profiles',
|
||||
},
|
||||
]
|
||||
{
|
||||
'patch_module': 'patches.november_2012',
|
||||
'patch_file': 'remove_old_unbilled_items_report',
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user