mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 03:45:08 +00:00
chore: patch fixes
This commit is contained in:
@@ -3,14 +3,22 @@ import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
try:
|
||||
frappe.db.sql("UPDATE `tabStock Ledger Entry` SET is_cancelled = 0 where is_cancelled in ('', NULL, 'No')")
|
||||
frappe.db.sql("UPDATE `tabSerial No` SET is_cancelled = 0 where is_cancelled in ('', NULL, 'No')")
|
||||
#handle type casting for is_cancelled field
|
||||
|
||||
frappe.db.sql("UPDATE `tabStock Ledger Entry` SET is_cancelled = 1 where is_cancelled = 'Yes'")
|
||||
frappe.db.sql("UPDATE `tabSerial No` SET is_cancelled = 1 where is_cancelled = 'Yes'")
|
||||
for doc_mapper in (('stock','Stock Ledger Entry'),
|
||||
('stock','Serial No'),
|
||||
('accounts','GL Entry')):
|
||||
try:
|
||||
module = doc_mapper[0]
|
||||
doctype = doc_mapper[1]
|
||||
|
||||
frappe.reload_doc("stock", "doctype", "stock_ledger_entry")
|
||||
frappe.reload_doc("stock", "doctype", "serial_no")
|
||||
except Exception:
|
||||
pass
|
||||
frappe.db.sql('''UPDATE `tab{doctype}` SET is_cancelled =
|
||||
CASE
|
||||
WHEN is_cancelled = 'No' THEN 0
|
||||
WHEN is_cancelled = 'Yes' THEN 1
|
||||
ELSE 0
|
||||
END'''.format(doctype=doctype))
|
||||
|
||||
frappe.reload_doc(module, "doctype", frappe.scrub(doctype))
|
||||
except Exception:
|
||||
pass
|
||||
@@ -13,4 +13,6 @@ def execute():
|
||||
row.item_code = web_item
|
||||
|
||||
homepage.flags.ignore_mandatory = True
|
||||
homepage.flags.ignore_links = True
|
||||
|
||||
homepage.save()
|
||||
Reference in New Issue
Block a user