2021-02-22 13:57:23 +00:00
|
|
|
import frappe
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2021-02-22 13:57:23 +00:00
|
|
|
def execute():
|
2021-10-11 16:44:28 +00:00
|
|
|
frappe.reload_doc("custom", "doctype", "custom_field", force=True)
|
2021-02-22 14:33:23 +00:00
|
|
|
company = frappe.get_all("Company", filters={"country": "India"})
|
2021-02-22 13:57:23 +00:00
|
|
|
if not company:
|
|
|
|
return
|
|
|
|
|
2021-02-22 14:33:23 +00:00
|
|
|
if frappe.db.exists("Custom Field", {"fieldname": "vehicle_no"}):
|
|
|
|
frappe.db.set_value("Custom Field", {"fieldname": "vehicle_no"}, "mandatory_depends_on", "")
|