Skip to content

Commit e0e8eee

Browse files
committed
feat: DocType Calendar Event
1 parent 41bceaa commit e0e8eee

8 files changed

Lines changed: 291 additions & 0 deletions

File tree

mail/client/doctype/calendar_event/__init__.py

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
2+
// For license information, please see license.txt
3+
4+
// frappe.ui.form.on("Calendar Event", {
5+
// refresh(frm) {
6+
7+
// },
8+
// });
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"actions": [],
3+
"creation": "2025-12-18 09:53:53.514893",
4+
"doctype": "DocType",
5+
"engine": "InnoDB",
6+
"field_order": [
7+
"section_break_nfos",
8+
"user",
9+
"column_break_guhl",
10+
"draft",
11+
"origin",
12+
"section_break_nzql",
13+
"id",
14+
"base_event_id",
15+
"column_break_dcpf",
16+
"utc_start",
17+
"utc_end",
18+
"section_break_bnnv",
19+
"calendars",
20+
"section_break_mohl",
21+
"may_invite_self",
22+
"may_invite_others",
23+
"hide_attendees"
24+
],
25+
"fields": [
26+
{
27+
"fieldname": "section_break_nfos",
28+
"fieldtype": "Section Break"
29+
},
30+
{
31+
"description": "The user this event belongs to.",
32+
"fieldname": "user",
33+
"fieldtype": "Link",
34+
"in_list_view": 1,
35+
"label": "User",
36+
"options": "User",
37+
"reqd": 1
38+
},
39+
{
40+
"fieldname": "column_break_guhl",
41+
"fieldtype": "Column Break"
42+
},
43+
{
44+
"default": "0",
45+
"fieldname": "draft",
46+
"fieldtype": "Check",
47+
"label": "Draft"
48+
},
49+
{
50+
"fieldname": "section_break_nzql",
51+
"fieldtype": "Section Break"
52+
},
53+
{
54+
"fieldname": "id",
55+
"fieldtype": "Data",
56+
"label": "ID"
57+
},
58+
{
59+
"fieldname": "base_event_id",
60+
"fieldtype": "Data",
61+
"label": "Base Event ID"
62+
},
63+
{
64+
"fieldname": "column_break_dcpf",
65+
"fieldtype": "Column Break"
66+
},
67+
{
68+
"fieldname": "section_break_bnnv",
69+
"fieldtype": "Section Break"
70+
},
71+
{
72+
"fieldname": "calendars",
73+
"fieldtype": "Table",
74+
"label": "Calendars",
75+
"options": "Event Calendar",
76+
"reqd": 1
77+
},
78+
{
79+
"default": "0",
80+
"fieldname": "origin",
81+
"fieldtype": "Check",
82+
"label": "Origin"
83+
},
84+
{
85+
"fieldname": "utc_start",
86+
"fieldtype": "Data",
87+
"label": "UTC Start"
88+
},
89+
{
90+
"fieldname": "utc_end",
91+
"fieldtype": "Data",
92+
"label": "UTC End"
93+
},
94+
{
95+
"fieldname": "section_break_mohl",
96+
"fieldtype": "Section Break"
97+
},
98+
{
99+
"default": "0",
100+
"fieldname": "may_invite_self",
101+
"fieldtype": "Check",
102+
"label": "May Invite Self"
103+
},
104+
{
105+
"default": "0",
106+
"fieldname": "may_invite_others",
107+
"fieldtype": "Check",
108+
"label": "May Invite Others"
109+
},
110+
{
111+
"default": "0",
112+
"fieldname": "hide_attendees",
113+
"fieldtype": "Check",
114+
"label": "Hide Attendees"
115+
}
116+
],
117+
"grid_page_length": 50,
118+
"index_web_pages_for_search": 1,
119+
"is_virtual": 1,
120+
"links": [],
121+
"modified": "2025-12-18 10:15:57.618848",
122+
"modified_by": "Administrator",
123+
"module": "Client",
124+
"name": "Calendar Event",
125+
"owner": "Administrator",
126+
"permissions": [
127+
{
128+
"create": 1,
129+
"delete": 1,
130+
"email": 1,
131+
"export": 1,
132+
"print": 1,
133+
"read": 1,
134+
"report": 1,
135+
"role": "System Manager",
136+
"share": 1,
137+
"write": 1
138+
}
139+
],
140+
"row_format": "Dynamic",
141+
"rows_threshold_for_grid_search": 20,
142+
"sort_field": "creation",
143+
"sort_order": "DESC",
144+
"states": []
145+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
2+
# For license information, please see license.txt
3+
4+
# import frappe
5+
from frappe.model.document import Document
6+
7+
8+
class CalendarEvent(Document):
9+
def db_insert(self, *args, **kwargs):
10+
raise NotImplementedError
11+
12+
def load_from_db(self, *args, **kwargs):
13+
raise NotImplementedError
14+
15+
def db_update(self, *args, **kwargs):
16+
raise NotImplementedError
17+
18+
def delete(self, *args, **kwargs):
19+
raise NotImplementedError
20+
21+
@staticmethod
22+
def get_list(filters=None, page_length=20, **kwargs):
23+
pass
24+
25+
@staticmethod
26+
def get_count(filters=None, **kwargs):
27+
pass
28+
29+
@staticmethod
30+
def get_stats(**kwargs):
31+
pass
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and Contributors
2+
# See license.txt
3+
4+
# import frappe
5+
from frappe.tests import IntegrationTestCase
6+
7+
# On IntegrationTestCase, the doctype test records and all
8+
# link-field test record dependencies are recursively loaded
9+
# Use these module variables to add/remove to/from that list
10+
EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
11+
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
12+
13+
14+
class IntegrationTestCalendarEvent(IntegrationTestCase):
15+
"""
16+
Integration tests for CalendarEvent.
17+
Use this class for testing interactions between multiple components.
18+
"""
19+
20+
pass

mail/client/doctype/event_calendar/__init__.py

Whitespace-only changes.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"actions": [],
3+
"allow_rename": 1,
4+
"creation": "2025-12-18 10:02:01.484617",
5+
"doctype": "DocType",
6+
"editable_grid": 1,
7+
"engine": "InnoDB",
8+
"field_order": [
9+
"section_break_yala",
10+
"calendar",
11+
"column_break_kutf",
12+
"calendar_id",
13+
"calendar_name"
14+
],
15+
"fields": [
16+
{
17+
"fieldname": "section_break_yala",
18+
"fieldtype": "Section Break"
19+
},
20+
{
21+
"fieldname": "calendar",
22+
"fieldtype": "Link",
23+
"in_list_view": 1,
24+
"label": "Calendar",
25+
"options": "Calendar",
26+
"reqd": 1,
27+
"set_only_once": 1
28+
},
29+
{
30+
"fieldname": "column_break_kutf",
31+
"fieldtype": "Column Break"
32+
},
33+
{
34+
"fieldname": "calendar_id",
35+
"fieldtype": "Data",
36+
"in_list_view": 1,
37+
"label": "Calendar ID",
38+
"no_copy": 1,
39+
"read_only": 1,
40+
"set_only_once": 1
41+
},
42+
{
43+
"fieldname": "calendar_name",
44+
"fieldtype": "Data",
45+
"in_list_view": 1,
46+
"label": "Calendar Name",
47+
"no_copy": 1,
48+
"read_only": 1,
49+
"set_only_once": 1
50+
}
51+
],
52+
"grid_page_length": 50,
53+
"index_web_pages_for_search": 1,
54+
"is_virtual": 1,
55+
"istable": 1,
56+
"links": [],
57+
"modified": "2025-12-18 10:04:42.854069",
58+
"modified_by": "Administrator",
59+
"module": "Client",
60+
"name": "Event Calendar",
61+
"owner": "Administrator",
62+
"permissions": [],
63+
"row_format": "Dynamic",
64+
"rows_threshold_for_grid_search": 20,
65+
"sort_field": "creation",
66+
"sort_order": "DESC",
67+
"states": []
68+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2025, Frappe Technologies Pvt. Ltd. and contributors
2+
# For license information, please see license.txt
3+
4+
# import frappe
5+
from frappe.model.document import Document
6+
7+
8+
class EventCalendar(Document):
9+
def db_insert(self, *args, **kwargs):
10+
raise NotImplementedError
11+
12+
def load_from_db(self, *args, **kwargs):
13+
raise NotImplementedError
14+
15+
def db_update(self, *args, **kwargs):
16+
raise NotImplementedError
17+
18+
def delete(self, *args, **kwargs):
19+
raise NotImplementedError

0 commit comments

Comments
 (0)