fix: patch to remove default item group and territory
(cherry picked from commit bdf7b8d379)
This commit is contained in:
committed by
Ankush Menat
parent
93ee870bf9
commit
e9af26e7b6
@@ -304,6 +304,7 @@ erpnext.patches.v13_0.update_recipient_email_digest
|
|||||||
erpnext.patches.v13_0.shopify_deprecation_warning
|
erpnext.patches.v13_0.shopify_deprecation_warning
|
||||||
erpnext.patches.v13_0.add_custom_field_for_south_africa #2
|
erpnext.patches.v13_0.add_custom_field_for_south_africa #2
|
||||||
erpnext.patches.v13_0.rename_discharge_ordered_date_in_ip_record
|
erpnext.patches.v13_0.rename_discharge_ordered_date_in_ip_record
|
||||||
|
erpnext.patches.v13_0.remove_bad_selling_defaults
|
||||||
erpnext.patches.v13_0.migrate_stripe_api
|
erpnext.patches.v13_0.migrate_stripe_api
|
||||||
erpnext.patches.v13_0.reset_clearance_date_for_intracompany_payment_entries
|
erpnext.patches.v13_0.reset_clearance_date_for_intracompany_payment_entries
|
||||||
execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings")
|
execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings")
|
||||||
|
|||||||
15
erpnext/patches/v13_0/remove_bad_selling_defaults.py
Normal file
15
erpnext/patches/v13_0/remove_bad_selling_defaults.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import frappe
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
selling_settings = frappe.get_single("Selling Settings")
|
||||||
|
|
||||||
|
if selling_settings.customer_group in (_("All Customer Groups"), "All Customer Groups"):
|
||||||
|
selling_settings.customer_group = None
|
||||||
|
|
||||||
|
if selling_settings.territory in (_("All Territories"), "All Territories"):
|
||||||
|
selling_settings.territory = None
|
||||||
|
|
||||||
|
selling_settings.flags.ignore_mandatory=True
|
||||||
|
selling_settings.save(ignore_permissions=True)
|
||||||
Reference in New Issue
Block a user