brotherton-erpnext/erpnext/patches/v12_0/update_vehicle_no_reqd_condition.py
Saqib dbb76a7d00
fix(e-invoicing): validations & tax calculation fixes (#25314)
* fix: GST on freight charge in e-invoicing

* feat(india): bulk e-invoice generation (#24969)

* fix: cannot fetch e invoice settings

* fix: patch condition (#25301)

* fix: patch condition

* fix: except einvoice loading error seperately

* fix: json.loads error

Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
2021-04-13 18:49:03 +05:30

11 lines
348 B
Python

import frappe
def execute():
frappe.reload_doc('custom', 'doctype', 'custom_field')
company = frappe.get_all('Company', filters = {'country': 'India'})
if not company:
return
if frappe.db.exists('Custom Field', { 'fieldname': 'vehicle_no' }):
frappe.db.set_value('Custom Field', { 'fieldname': 'vehicle_no' }, 'mandatory_depends_on', '')