patch fix

This commit is contained in:
Neil Trini Lasrado 2014-12-11 17:33:41 +05:30
parent 3a34cadcb2
commit 6ddc487fb6

View File

@ -5,7 +5,9 @@ from __future__ import unicode_literals
import frappe
def execute():
for d in frappe.db.sql("""select name from `tabBOM` where docstatus < 2 and total_fixed_cost IS NOT NULL""", as_dict=1):
for d in frappe.db.sql("""select bom.name from `tabBOM` bom where bom.docstatus < 2 and
exists(select bom_item.name from `tabBOM Operation` bom_op where
bom.name = bom_op.parent and bom_op.fixed_cycle_cost IS NOT NULL)""", as_dict=1):
try:
bom = frappe.get_doc('BOM', d.name)
bom.ignore_validate_update_after_submit = True