fix: Patch

This commit is contained in:
deepeshgarg007 2019-07-18 18:14:12 +05:30
parent 6dd5f74671
commit 703fc08467

View File

@ -10,18 +10,19 @@ def execute():
field = frappe.db.get_value("Custom Field", {"dt": "Sales Invoice", "fieldname": "ewaybill"}) field = frappe.db.get_value("Custom Field", {"dt": "Sales Invoice", "fieldname": "ewaybill"})
ewaybill_field = frappe.get_doc("Custom Field", field) if field:
ewaybill_field = frappe.get_doc("Custom Field", field)
ewaybill_field.flags.ignore_validate = True ewaybill_field.flags.ignore_validate = True
ewaybill_field.update({ ewaybill_field.update({
'fieldname': 'ewaybill', 'fieldname': 'ewaybill',
'label': 'e-Way Bill No.', 'label': 'e-Way Bill No.',
'fieldtype': 'Data', 'fieldtype': 'Data',
'depends_on': 'eval:(doc.docstatus === 1)', 'depends_on': 'eval:(doc.docstatus === 1)',
'allow_on_submit': 1, 'allow_on_submit': 1,
'insert_after': 'tax_id', 'insert_after': 'tax_id',
'translatable': 0 'translatable': 0
}) })
ewaybill_field.save() ewaybill_field.save()