Some checks failed
Frontend / Unit Tests & Coverage (push) Has been skipped
Regenerate POT file (translatable strings) / Regenerate POT file (develop) (push) Failing after 1m13s
Regenerate POT file (translatable strings) / Regenerate POT file (main-hotfix) (push) Failing after 6s
Server / Tests (frappe ${{ matrix.frappe-branch }}) (push) Has been skipped
Server / Resolve frappe matrix (push) Failing after 1s
Frontend / Lint (push) Failing after 1s
Frontend / Production Build (push) Failing after 1s
Server / Coverage Wrap Up (push) Has been skipped
Frontend / Coverage Wrap Up (push) Has been skipped
23 lines
520 B
Python
23 lines
520 B
Python
import json
|
|
|
|
import frappe
|
|
|
|
|
|
def execute():
|
|
if not frappe.db.exists("CRM Fields Layout", "CRM Deal-Quick Entry"):
|
|
return
|
|
|
|
deal = frappe.db.get_value("CRM Fields Layout", "CRM Deal-Quick Entry", "layout")
|
|
|
|
layout = json.loads(deal)
|
|
for section in layout:
|
|
if section.get("label") in [
|
|
"Select Organization",
|
|
"Organization Details",
|
|
"Select Contact",
|
|
"Contact Details",
|
|
]:
|
|
section["editable"] = False
|
|
|
|
frappe.db.set_value("CRM Fields Layout", "CRM Deal-Quick Entry", "layout", json.dumps(layout))
|