mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-12 14:58:24 +00:00
fix: show/hide eway bill fields
This commit is contained in:
@@ -678,4 +678,4 @@ erpnext.patches.v12_0.update_state_code_for_daman_and_diu
|
||||
erpnext.patches.v12_0.rename_lost_reason_detail
|
||||
erpnext.patches.v12_0.update_leave_application_status
|
||||
erpnext.patches.v12_0.update_payment_entry_status
|
||||
erpnext.patches.v12_0.setup_einvoice_fields
|
||||
erpnext.patches.v12_0.setup_einvoice_fields #2020-11-04
|
||||
|
||||
@@ -29,4 +29,12 @@ def execute():
|
||||
}
|
||||
create_custom_fields(custom_fields, update=True)
|
||||
add_permissions()
|
||||
add_print_formats()
|
||||
add_print_formats()
|
||||
|
||||
frappe.db.set_value('Custom Field', { 'fieldname': 'mode_of_transport' }, 'default', '')
|
||||
frappe.db.set_value('Custom Field', { 'fieldname': 'distance' }, 'mandatory_depends_on', 'transporter')
|
||||
frappe.db.set_value('Custom Field', { 'fieldname': 'vehicle_no' }, 'mandatory_depends_on', 'eval:doc.mode_of_transport == "Road"')
|
||||
frappe.db.set_value('Custom Field', { 'fieldname': 'vehicle_no' }, 'depends_on', 'depends_on': 'eval:doc.mode_of_transport == "Road"')
|
||||
frappe.db.set_value('Custom Field', { 'fieldname': 'gst_vehicle_type' }, 'mandatory_depends_on', 'eval:doc.mode_of_transport == "Road"')
|
||||
frappe.db.set_value('Custom Field', { 'fieldname': 'lr_date' }, 'mandatory_depends_on', 'eval:in_list(["Air", "Ship", "Rail"], doc.mode_of_transport)')
|
||||
frappe.db.set_value('Custom Field', { 'fieldname': 'lr_no' }, 'mandatory_depends_on', 'eval:in_list(["Air", "Ship", "Rail"], doc.mode_of_transport)')
|
||||
@@ -303,6 +303,7 @@ def make_custom_fields(update=True):
|
||||
'label': 'Vehicle No',
|
||||
'fieldtype': 'Data',
|
||||
'insert_after': 'lr_no',
|
||||
'depends_on': 'eval:(doc.mode_of_transport === "Road")',
|
||||
'print_hide': 1,
|
||||
'translatable': 0
|
||||
},
|
||||
@@ -333,7 +334,6 @@ def make_custom_fields(update=True):
|
||||
'label': 'Mode of Transport',
|
||||
'fieldtype': 'Select',
|
||||
'options': '\nRoad\nAir\nRail\nShip',
|
||||
'default': 'Road',
|
||||
'insert_after': 'transporter_name',
|
||||
'print_hide': 1,
|
||||
'translatable': 0
|
||||
|
||||
Reference in New Issue
Block a user