[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

@@ -1,14 +1,13 @@
from __future__ import unicode_literals
def execute():
import webnotes
import webnotes.model.sync
# sync doctypes required for the patch
webnotes.model.sync.sync('website', 'web_cache')
webnotes.model.sync.sync('website', 'web_page')
webnotes.model.sync.sync('website', 'blog')
webnotes.model.sync.sync('website', 'website_settings')
webnotes.model.sync.sync('stock', 'item')
webnotes.reload_doc('website', 'doctype', 'web_cache')
webnotes.reload_doc('website', 'doctype', 'web_page')
webnotes.reload_doc('website', 'doctype', 'blog')
webnotes.reload_doc('website', 'doctype', 'website_settings')
webnotes.reload_doc('stock', 'doctype', 'item')
cleanup()