[patches] [fix] replace sync with reload_doc in old patches

This commit is contained in:
Anand Doshi
2013-05-16 15:28:19 +05:30
parent bfc18ea6c4
commit 4221814131
17 changed files with 32 additions and 50 deletions

View File

@@ -12,8 +12,7 @@ def execute():
clean_docfield_properties()
def change_property_setter_fieldnames():
import webnotes.model.sync
webnotes.model.sync.sync('core', 'property_setter')
webnotes.reload_doc('core', 'doctype', 'property_setter')
docfield_list = webnotes.conn.sql("""\
SELECT name, fieldname FROM `tabDocField`""", as_list=1)
custom_field_list = webnotes.conn.sql("""\

View File

@@ -94,8 +94,7 @@ from webnotes.model.code import get_obj
from webnotes.model.doc import Document
def execute():
import webnotes.model.sync
webnotes.model.sync.sync('core', 'custom_field')
webnotes.reload_doc('core', 'doctype', 'custom_field')
for f in field_list:
res = webnotes.conn.sql("""SELECT name FROM `tabCustom Field`
WHERE dt=%s AND fieldname=%s""", (f[0], f[1]))