Merge pull request #23585 from bosue/readonly_route_history

fix: Turn Route History read-only.
This commit is contained in:
Ankush Menat 2023-12-04 09:53:14 +05:30 committed by GitHub
commit cefd275b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 8 deletions

View file

@ -1,5 +1,6 @@
{
"actions": [],
"allow_copy": 1,
"creation": "2018-10-05 11:26:04.601113",
"doctype": "DocType",
"editable_grid": 1,
@ -13,7 +14,9 @@
"fieldname": "route",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Route"
"label": "Route",
"no_copy": 1,
"read_only": 1
},
{
"fieldname": "user",
@ -21,30 +24,29 @@
"in_list_view": 1,
"in_standard_filter": 1,
"label": "User",
"options": "User"
"no_copy": 1,
"options": "User",
"read_only": 1
}
],
"in_create": 1,
"links": [],
"modified": "2022-06-13 05:48:56.967244",
"modified": "2023-12-04 04:41:32.448331",
"modified_by": "Administrator",
"module": "Desk",
"name": "Route History",
"owner": "Administrator",
"permissions": [
{
"create": 1,
"delete": 1,
"email": 1,
"export": 1,
"print": 1,
"read": 1,
"report": 1,
"role": "System Manager",
"share": 1,
"write": 1
"share": 1
}
],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC",
"states": [],

View file

@ -18,6 +18,7 @@ class RouteHistory(Document):
route: DF.Data | None
user: DF.Link | None
# end: auto-generated types
@staticmethod
def clear_old_logs(days=30):
from frappe.query_builder import Interval