patch added

This commit is contained in:
Neil Trini Lasrado 2015-05-07 11:12:14 +05:30
parent 4f5cc9d672
commit e64d453d09
2 changed files with 15 additions and 1 deletions

View File

@ -151,3 +151,4 @@ erpnext.patches.v5_0.link_warehouse_with_account
erpnext.patches.v5_0.rename_taxes_and_charges_master
execute:frappe.delete_doc("Page", "stock-ledger")
execute:frappe.delete_doc("Page", "stock-level")
erpnext.patches.v5_0.reclculate_planned_operating_cost_in_production_order

View File

@ -0,0 +1,13 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
for po in frappe.db.sql("""select name from `tabProduction Order` where docstatus < 2""", as_dict=1):
prod_order = frappe.get_doc("Production Order", po.name)
if prod_order.operations:
prod_order.flags.ignore_validate_update_after_submit = True
prod_order.calculate_time()
prod_order.save()