fix hooks
This commit is contained in:
parent
33966decd9
commit
bd487adca2
1 changed files with 8 additions and 4 deletions
|
|
@ -215,6 +215,13 @@ doc_events = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# custom_ui/hooks.py (or a separate utils.py in the app)
|
||||||
|
def remove_fencing_job_queue_links(doc):
|
||||||
|
"""Remove links to the deleted 'Fencing Job Queue' doctype"""
|
||||||
|
links = doc.get("links", [])
|
||||||
|
doc["links"] = [l for l in links if l.get("link_doctype") != "Fencing Job Queue"]
|
||||||
|
|
||||||
|
|
||||||
fixtures = [
|
fixtures = [
|
||||||
# {"dt": "Company"},
|
# {"dt": "Company"},
|
||||||
# {"dt": "Account"},
|
# {"dt": "Account"},
|
||||||
|
|
@ -233,10 +240,7 @@ fixtures = [
|
||||||
["custom", "=", 1],
|
["custom", "=", 1],
|
||||||
["name", "!=", "Fencing Job Queue"],
|
["name", "!=", "Fencing Job Queue"],
|
||||||
["name", "!=", "Locate Log"], # <-- skip the deleted/removed doctype
|
["name", "!=", "Locate Log"], # <-- skip the deleted/removed doctype
|
||||||
],
|
]
|
||||||
"postprocess": lambda doc: doc.update(
|
|
||||||
{"links": [l for l in doc.get("links", []) if l.get("link_doctype") != "Fencing Job Queue"]}
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
{ "dt": "Task Type" },
|
{ "dt": "Task Type" },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue