mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
[patches] [fix] replace sync with reload_doc in old patches
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -2,11 +2,9 @@ from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
|
||||
# perform sync
|
||||
import webnotes.model.sync
|
||||
webnotes.model.sync.sync('buying', 'purchase_order_item')
|
||||
webnotes.model.sync.sync('accounts', 'purchase_invoice_item')
|
||||
webnotes.model.sync.sync('stock', 'purchase_receipt_item')
|
||||
webnotes.reload_doc('buying', 'doctype', 'purchase_order_item')
|
||||
webnotes.reload_doc('accounts', 'doctype', 'purchase_invoice_item')
|
||||
webnotes.reload_doc('stock', 'doctype', 'purchase_receipt_item')
|
||||
|
||||
webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Order Item` t2 set t1.uom = t2.uom where ifnull(t1.po_detail, '') != '' and t1.po_detail = t2.name")
|
||||
webnotes.conn.sql("update `tabPurchase Invoice Item` t1, `tabPurchase Receipt Item` t2 set t1.uom = t2.uom where ifnull(t1.pr_detail, '') != '' and t1.pr_detail = t2.name")
|
||||
@@ -8,8 +8,7 @@ def execute():
|
||||
|
||||
webnotes.conn.commit()
|
||||
|
||||
import webnotes.model.sync
|
||||
webnotes.model.sync.sync('core', 'search_criteria')
|
||||
webnotes.model.sync.sync('core', 'report')
|
||||
webnotes.reload_doc('core', 'doctype', 'search_criteria')
|
||||
webnotes.reload_doc('core', 'doctype', 'report')
|
||||
|
||||
webnotes.conn.begin()
|
||||
@@ -1,7 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
def execute():
|
||||
import webnotes
|
||||
from webnotes.model.sync import sync
|
||||
sync('accounts', 'sales_invoice')
|
||||
webnotes.reload_doc('accounts', 'doctype', 'sales_invoice')
|
||||
|
||||
webnotes.conn.sql("update `tabSales Invoice` set recurring_type = 'Monthly' where ifnull(convert_into_recurring_invoice, 0) = 1")
|
||||
@@ -4,9 +4,8 @@ def execute():
|
||||
import webnotes
|
||||
import webnotes.utils
|
||||
|
||||
import webnotes.model.sync
|
||||
webnotes.conn.commit()
|
||||
webnotes.model.sync.sync('setup', 'email_settings')
|
||||
webnotes.reload_doc('setup', 'doctype', 'email_settings')
|
||||
webnotes.conn.begin()
|
||||
|
||||
sync_support_mails = webnotes.utils.cint(webnotes.conn.get_value('Email Settings',
|
||||
|
||||
Reference in New Issue
Block a user