mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-15 15:45:01 +00:00
fix(patch): use db_insert instead of save to escape validations (#19279)
This commit is contained in:
@@ -41,7 +41,9 @@ def execute():
|
||||
item = frappe.get_doc("Item", item_code)
|
||||
item.set("taxes", [])
|
||||
item.append("taxes", {"item_tax_template": item_tax_template_name, "tax_category": ""})
|
||||
item.save()
|
||||
frappe.db.sql("delete from `tabItem Tax` where parent=%s and parenttype='Item'", item_code)
|
||||
for d in item.taxes:
|
||||
d.db_insert()
|
||||
|
||||
doctypes = [
|
||||
'Quotation', 'Sales Order', 'Delivery Note', 'Sales Invoice',
|
||||
|
||||
Reference in New Issue
Block a user