Merge pull request #2509 from pdvyas/fix-patches

add reload_doc in a few patches
This commit is contained in:
Nabin Hait 2014-12-23 17:43:52 +05:30
commit 95225be93d
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):