mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 21:49:18 +00:00
Patch Fixed
This commit is contained in:
@@ -5,12 +5,12 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
try:
|
for d in frappe.db.sql("select name from `tabBOM` where docstatus < 2"):
|
||||||
for d in frappe.db.sql("select name from `tabBOM` where docstatus < 2"):
|
try:
|
||||||
document = frappe.get_doc('BOM', d[0])
|
document = frappe.get_doc('BOM', d[0])
|
||||||
if document.docstatus == 1:
|
if document.docstatus == 1:
|
||||||
document.ignore_validate_update_after_submit = True
|
document.ignore_validate_update_after_submit = True
|
||||||
document.calculate_cost()
|
document.calculate_cost()
|
||||||
document.save()
|
document.save()
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
Reference in New Issue
Block a user