brotherton-erpnext/erpnext/patches/v13_0/update_vehicle_no_reqd_condition.py

10 lines
292 B
Python
Raw Normal View History

import frappe
def execute():
2021-02-22 14:33:23 +00:00
company = frappe.get_all('Company', filters = {'country': 'India'})
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', '')