Fix in Pricing Rule Patch
This commit is contained in:
parent
7ea8528d50
commit
ebdac5db5c
@ -7,6 +7,8 @@ import frappe
|
|||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doc("accounts", "doctype", "pricing_rule")
|
frappe.reload_doc("accounts", "doctype", "pricing_rule")
|
||||||
|
|
||||||
|
frappe.db.auto_commit_on_many_writes = True
|
||||||
|
|
||||||
for d in frappe.db.sql("""select * from `tabCustomer Discount`
|
for d in frappe.db.sql("""select * from `tabCustomer Discount`
|
||||||
where ifnull(parent, '') != '' and docstatus < 2""", as_dict=1):
|
where ifnull(parent, '') != '' and docstatus < 2""", as_dict=1):
|
||||||
if not d.item_group:
|
if not d.item_group:
|
||||||
@ -24,6 +26,7 @@ def execute():
|
|||||||
"price_or_discount": "Discount",
|
"price_or_discount": "Discount",
|
||||||
"discount_percentage": d.discount
|
"discount_percentage": d.discount
|
||||||
}]).insert()
|
}]).insert()
|
||||||
|
|
||||||
|
frappe.db.auto_commit_on_many_writes = False
|
||||||
|
|
||||||
frappe.delete_doc("DocType", "Customer Discount")
|
frappe.delete_doc("DocType", "Customer Discount")
|
||||||
Loading…
x
Reference in New Issue
Block a user