Merge pull request #26958 from deepeshgarg007/export_type_mandatory_v13_pre
fix: Add mandatory depends on condition for export type field
This commit is contained in:
commit
3b4258b817
@ -296,7 +296,7 @@ erpnext.patches.v13_0.update_subscription_status_in_memberships
|
|||||||
erpnext.patches.v13_0.update_amt_in_work_order_required_items
|
erpnext.patches.v13_0.update_amt_in_work_order_required_items
|
||||||
erpnext.patches.v12_0.show_einvoice_irn_cancelled_field
|
erpnext.patches.v12_0.show_einvoice_irn_cancelled_field
|
||||||
erpnext.patches.v13_0.delete_orphaned_tables
|
erpnext.patches.v13_0.delete_orphaned_tables
|
||||||
erpnext.patches.v13_0.update_export_type_for_gst
|
erpnext.patches.v13_0.update_export_type_for_gst #2021-08-16
|
||||||
erpnext.patches.v13_0.update_tds_check_field #3
|
erpnext.patches.v13_0.update_tds_check_field #3
|
||||||
erpnext.patches.v13_0.update_recipient_email_digest
|
erpnext.patches.v13_0.update_recipient_email_digest
|
||||||
erpnext.patches.v13_0.shopify_deprecation_warning
|
erpnext.patches.v13_0.shopify_deprecation_warning
|
||||||
|
@ -8,11 +8,19 @@ def execute():
|
|||||||
# Update custom fields
|
# Update custom fields
|
||||||
fieldname = frappe.db.get_value('Custom Field', {'dt': 'Customer', 'fieldname': 'export_type'})
|
fieldname = frappe.db.get_value('Custom Field', {'dt': 'Customer', 'fieldname': 'export_type'})
|
||||||
if fieldname:
|
if fieldname:
|
||||||
frappe.db.set_value('Custom Field', fieldname, 'default', '')
|
frappe.db.set_value('Custom Field', fieldname,
|
||||||
|
{
|
||||||
|
'default': '',
|
||||||
|
'mandatory_depends_on': 'eval:in_list(["SEZ", "Overseas", "Deemed Export"], doc.gst_category)'
|
||||||
|
})
|
||||||
|
|
||||||
fieldname = frappe.db.get_value('Custom Field', {'dt': 'Supplier', 'fieldname': 'export_type'})
|
fieldname = frappe.db.get_value('Custom Field', {'dt': 'Supplier', 'fieldname': 'export_type'})
|
||||||
if fieldname:
|
if fieldname:
|
||||||
frappe.db.set_value('Custom Field', fieldname, 'default', '')
|
frappe.db.set_value('Custom Field', fieldname,
|
||||||
|
{
|
||||||
|
'default': '',
|
||||||
|
'mandatory_depends_on': 'eval:in_list(["SEZ", "Overseas"], doc.gst_category)'
|
||||||
|
})
|
||||||
|
|
||||||
# Update Customer/Supplier Masters
|
# Update Customer/Supplier Masters
|
||||||
frappe.db.sql("""
|
frappe.db.sql("""
|
||||||
|
@ -642,7 +642,8 @@ def make_custom_fields(update=True):
|
|||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'insert_after': 'gst_category',
|
'insert_after': 'gst_category',
|
||||||
'depends_on':'eval:in_list(["SEZ", "Overseas"], doc.gst_category)',
|
'depends_on':'eval:in_list(["SEZ", "Overseas"], doc.gst_category)',
|
||||||
'options': '\nWith Payment of Tax\nWithout Payment of Tax'
|
'options': '\nWith Payment of Tax\nWithout Payment of Tax',
|
||||||
|
'mandatory_depends_on': 'eval:in_list(["SEZ", "Overseas"], doc.gst_category)'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'Customer': [
|
'Customer': [
|
||||||
@ -660,7 +661,8 @@ def make_custom_fields(update=True):
|
|||||||
'fieldtype': 'Select',
|
'fieldtype': 'Select',
|
||||||
'insert_after': 'gst_category',
|
'insert_after': 'gst_category',
|
||||||
'depends_on':'eval:in_list(["SEZ", "Overseas", "Deemed Export"], doc.gst_category)',
|
'depends_on':'eval:in_list(["SEZ", "Overseas", "Deemed Export"], doc.gst_category)',
|
||||||
'options': '\nWith Payment of Tax\nWithout Payment of Tax'
|
'options': '\nWith Payment of Tax\nWithout Payment of Tax',
|
||||||
|
'mandatory_depends_on': 'eval:in_list(["SEZ", "Overseas", "Deemed Export"], doc.gst_category)'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'Member': [
|
'Member': [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user