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