fix(regional): vehicle no is mandatory for ewaybill generation (#24679)

* fix: vehicle no required for e-invoice

* fix: ewaybill generation dialog condition
This commit is contained in:
Saqib 2021-02-22 19:27:23 +05:30 committed by GitHub
parent fdafb55fba
commit 14472f6bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -754,3 +754,4 @@ erpnext.patches.v13_0.setup_patient_history_settings_for_standard_doctypes
erpnext.patches.v13_0.add_naming_series_to_old_projects # 1-02-2021
erpnext.patches.v12_0.add_state_code_for_ladakh
erpnext.patches.v13_0.item_reposting_for_incorrect_sl_and_gl
erpnext.patches.v13_0.update_vehicle_no_reqd_condition

View File

@ -0,0 +1,9 @@
import frappe
def execute():
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', '')

View File

@ -188,7 +188,6 @@ const get_ewaybill_fields = (frm) => {
'fieldname': 'vehicle_no',
'label': 'Vehicle No',
'fieldtype': 'Data',
'depends_on': 'eval:(doc.mode_of_transport === "Road")',
'default': frm.doc.vehicle_no
},
{