diff --git a/crm/fcrm/pagetype/crm_lead/crm_lead.py b/crm/fcrm/pagetype/crm_lead/crm_lead.py
index 5e4b3e4e..cbc394ff 100644
--- a/crm/fcrm/pagetype/crm_lead/crm_lead.py
+++ b/crm/fcrm/pagetype/crm_lead/crm_lead.py
@@ -238,7 +238,7 @@ class CRMLead(Page):
"modified",
"modified_by",
"idx",
- "docstatus",
+ "pagestatus",
"status",
"email",
"mobile_no",
diff --git a/crm/fcrm/workspace/frappe_crm/frappe_crm.json b/crm/fcrm/workspace/frappe_crm/frappe_crm.json
index 40c6443b..05daf8ee 100644
--- a/crm/fcrm/workspace/frappe_crm/frappe_crm.json
+++ b/crm/fcrm/workspace/frappe_crm/frappe_crm.json
@@ -3,7 +3,7 @@
"content": "[{\"id\":\"1nr6UkvDiL\",\"type\":\"header\",\"data\":{\"text\":\"PORTAL\",\"col\":12}},{\"id\":\"1hyi8SysUY\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"CRM Portal Page\",\"col\":3}},{\"id\":\"ktENiGaqXQ\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"VgeWLYOuAS\",\"type\":\"paragraph\",\"data\":{\"text\":\"SHORTCUTS\",\"col\":12}},{\"id\":\"A66FpG-K3T\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Leads\",\"col\":3}},{\"id\":\"n9b6N5ebOj\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Deals\",\"col\":3}},{\"id\":\"sGHTXrludH\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Organizations\",\"col\":3}},{\"id\":\"uXZNCdqxy0\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Contacts\",\"col\":3}},{\"id\":\"v1kkMwlntf\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"SLA\",\"col\":3}},{\"id\":\"WRzt4SMh_b\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Assignment Rule\",\"col\":3}},{\"id\":\"TZ7cULX3Tk\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"zpySv0nGVQ\",\"type\":\"paragraph\",\"data\":{\"text\":\"META\",\"col\":12}},{\"id\":\"fa-uKzobpp\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Lead Statuses\",\"col\":3}},{\"id\":\"hxoZghUHP2\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Deal Statuses\",\"col\":3}},{\"id\":\"HbgghUpc8N\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Lead Sources\",\"col\":3}},{\"id\":\"8cPs7Fohb4\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Industries\",\"col\":3}},{\"id\":\"arT4xZ9HWR\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Territories\",\"col\":3}},{\"id\":\"ApHOcISpiJ\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Communication Statuses\",\"col\":3}}]",
"creation": "2023-11-27 13:55:17.090361",
"custom_blocks": [],
- "docstatus": 0,
+ "pagestatus": 0,
"pagetype": "Workspace",
"for_user": "",
"hide_custom": 0,
diff --git a/crm/utils/__init__.py b/crm/utils/__init__.py
index aa4bf7c8..db21cc95 100644
--- a/crm/utils/__init__.py
+++ b/crm/utils/__init__.py
@@ -4,7 +4,7 @@ import jingrow
import phonenumbers
import requests
from jingrow import _
-from jingrow.model.docstatus import DocStatus
+from jingrow.model.pagestatus import DocStatus
from jingrow.model.dynamic_links import get_dynamic_link_map
from jingrow.utils import floor
from phonenumbers import NumberParseException
@@ -134,7 +134,7 @@ def get_linked_docs(pg, method="Delete"):
docs.append({"pg": pg.name, "link_dt": link_dt, "link_field": link_field})
continue
- fields = ["name", "docstatus"]
+ fields = ["name", "pagestatus"]
if meta.istable:
fields.extend(["parent", "parenttype"])
@@ -147,7 +147,7 @@ def get_linked_docs(pg, method="Delete"):
if linked_parent_pagetype in ignored_doctypes:
continue
- if method != "Delete" and (method != "Cancel" or not DocStatus(item.docstatus).is_submitted()):
+ if method != "Delete" and (method != "Cancel" or not DocStatus(item.pagestatus).is_submitted()):
# don't raise exception if not
# linked to a non-cancelled pg when deleting or to a submitted pg when cancelling
continue
@@ -188,9 +188,9 @@ def get_dynamic_linked_docs(pg, method="Delete"):
and refdoc.get(df.fieldname) == pg.name
and (
# linked to an non-cancelled pg when deleting
- (method == "Delete" and not DocStatus(refdoc.docstatus).is_cancelled())
+ (method == "Delete" and not DocStatus(refdoc.pagestatus).is_cancelled())
# linked to a submitted pg when cancelling
- or (method == "Cancel" and DocStatus(refdoc.docstatus).is_submitted())
+ or (method == "Cancel" and DocStatus(refdoc.pagestatus).is_submitted())
)
):
docs.append({"pg": pg.name, "reference_pagetype": df.parent, "reference_docname": df.parent})
@@ -198,15 +198,15 @@ def get_dynamic_linked_docs(pg, method="Delete"):
# dynamic link in table
df["table"] = ", `parent`, `parenttype`, `idx`" if meta.istable else ""
for refdoc in jingrow.db.sql(
- """select `name`, `docstatus` {table} from `tab{parent}` where
+ """select `name`, `pagestatus` {table} from `tab{parent}` where
`{options}`=%s and `{fieldname}`=%s""".format(**df),
(pg.pagetype, pg.name),
as_dict=True,
):
# linked to an non-cancelled pg when deleting
# or linked to a submitted pg when cancelling
- if (method == "Delete" and not DocStatus(refdoc.docstatus).is_cancelled()) or (
- method == "Cancel" and DocStatus(refdoc.docstatus).is_submitted()
+ if (method == "Delete" and not DocStatus(refdoc.pagestatus).is_cancelled()) or (
+ method == "Cancel" and DocStatus(refdoc.pagestatus).is_submitted()
):
reference_pagetype = refdoc.parenttype if meta.istable else df.parent
reference_docname = refdoc.parent if meta.istable else refdoc.name
diff --git a/frontend/src/components/FieldLayoutEditor.vue b/frontend/src/components/FieldLayoutEditor.vue
index ab7584f1..597647b6 100644
--- a/frontend/src/components/FieldLayoutEditor.vue
+++ b/frontend/src/components/FieldLayoutEditor.vue
@@ -263,7 +263,7 @@ const fields = createResource({
'creation',
'modified',
'modified_by',
- 'docstatus',
+ 'pagestatus',
'_comments',
'_user_tags',
'_assign',