mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
* fix: v12 migrate error - unknown column ‘mandatory_depends_on’ (#27897)
* fix: v12 doesn't have mandatory_depends_on field
* fix: move update_vehicle_no_reqd_condition to v13
* fix: move update_vehicle_no_reqd_condition to v13
* fix: file name missing .py
* refactor!: add back empty line
* fix: linters issue
(cherry picked from commit 7acdcc70ad)
# Conflicts:
# erpnext/patches.txt
* fix: resolve conflicts
Co-authored-by: Dany Robert <rtdany10@gmail.com>
Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
12 lines
349 B
Python
12 lines
349 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', '')
|