add reload_doc in a few patches

This commit is contained in:
Pratik Vyas 2014-12-18 11:36:23 +05:30
parent d6e49150a8
commit 387e1e21cb
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import frappe
def execute():
reference_date = guess_reference_date()
frappe.reload_doc('accounts', 'doctype', 'journal_voucher_detail')
for name in frappe.db.sql_list("""select name from `tabJournal Voucher`
where date(creation)>=%s""", reference_date):
jv = frappe.get_doc("Journal Voucher", name)

View File

@ -5,6 +5,7 @@ from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('manufacturing', 'doctype', 'bom_operation')
for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and
exists(select bom_op.name from `tabBOM Operation` bom_op where
bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1):