mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
[Fix] After amend the status become cancelled even if docstatus is zero
This commit is contained in:
11
erpnext/patches/v7_2/update_doctype_status.py
Normal file
11
erpnext/patches/v7_2/update_doctype_status.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# 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():
|
||||
doctypes = ["Opportunity", "Quotation", "Sales Order", "Sales Invoice", "Purchase Invoice", "Purchase Order", "Delivery Note", "Purchase Receipt"]
|
||||
for doctype in doctypes:
|
||||
frappe.db.sql(""" update `tab{doctype}` set status = 'Draft'
|
||||
where status = 'Cancelled' and docstatus = 0 """.format(doctype = doctype))
|
||||
Reference in New Issue
Block a user