diff --git a/frappe/automation/doctype/assignment_rule/assignment_rule.py b/frappe/automation/doctype/assignment_rule/assignment_rule.py index 508ed317c6..dfff7626ff 100644 --- a/frappe/automation/doctype/assignment_rule/assignment_rule.py +++ b/frappe/automation/doctype/assignment_rule/assignment_rule.py @@ -12,6 +12,32 @@ from frappe.model.document import Document class AssignmentRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.automation.doctype.assignment_rule_day.assignment_rule_day import AssignmentRuleDay + from frappe.automation.doctype.assignment_rule_user.assignment_rule_user import ( + AssignmentRuleUser, + ) + from frappe.types import DF + + assign_condition: DF.Code + assignment_days: DF.Table[AssignmentRuleDay] + close_condition: DF.Code | None + description: DF.SmallText + disabled: DF.Check + document_type: DF.Link + due_date_based_on: DF.Literal + field: DF.Literal + last_user: DF.Link | None + priority: DF.Int + rule: DF.Literal["Round Robin", "Load Balancing", "Based on Field"] + unassign_condition: DF.Code | None + users: DF.TableMultiSelect[AssignmentRuleUser] | None + # end: auto-generated types def validate(self): self.validate_document_types() self.validate_assignment_days() diff --git a/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py b/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py index 5a1af94696..1fe9af4e21 100644 --- a/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py +++ b/frappe/automation/doctype/assignment_rule_day/assignment_rule_day.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class AssignmentRuleDay(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + day: DF.Literal["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py b/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py index 8b848589c3..68ceb6b018 100644 --- a/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py +++ b/frappe/automation/doctype/assignment_rule_user/assignment_rule_user.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class AssignmentRuleUser(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + user: DF.Link + # end: auto-generated types pass diff --git a/frappe/automation/doctype/auto_repeat/auto_repeat.py b/frappe/automation/doctype/auto_repeat/auto_repeat.py index 19952bdc9b..049ca8422d 100644 --- a/frappe/automation/doctype/auto_repeat/auto_repeat.py +++ b/frappe/automation/doctype/auto_repeat/auto_repeat.py @@ -42,6 +42,34 @@ week_map = { class AutoRepeat(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.automation.doctype.auto_repeat_day.auto_repeat_day import AutoRepeatDay + from frappe.types import DF + + disabled: DF.Check + end_date: DF.Date | None + frequency: DF.Literal["", "Daily", "Weekly", "Monthly", "Quarterly", "Half-yearly", "Yearly"] + message: DF.Text | None + next_schedule_date: DF.Date | None + notify_by_email: DF.Check + print_format: DF.Link | None + recipients: DF.SmallText | None + reference_doctype: DF.Link + reference_document: DF.DynamicLink + repeat_on_day: DF.Int + repeat_on_days: DF.Table[AutoRepeatDay] + repeat_on_last_day: DF.Check + start_date: DF.Date + status: DF.Literal["", "Active", "Disabled", "Completed"] + subject: DF.Data | None + submit_on_creation: DF.Check + template: DF.Link | None + # end: auto-generated types def validate(self): self.update_status() self.validate_reference_doctype() diff --git a/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py b/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py index 6453f2e80d..b237f94610 100644 --- a/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py +++ b/frappe/automation/doctype/auto_repeat_day/auto_repeat_day.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class AutoRepeatDay(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + day: DF.Literal["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/automation/doctype/milestone/milestone.py b/frappe/automation/doctype/milestone/milestone.py index 40d6fae989..e980fb17b5 100644 --- a/frappe/automation/doctype/milestone/milestone.py +++ b/frappe/automation/doctype/milestone/milestone.py @@ -6,6 +6,20 @@ from frappe.model.document import Document class Milestone(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + milestone_tracker: DF.Link | None + reference_name: DF.Data + reference_type: DF.Link + track_field: DF.Data + value: DF.Data + # end: auto-generated types pass diff --git a/frappe/automation/doctype/milestone_tracker/milestone_tracker.py b/frappe/automation/doctype/milestone_tracker/milestone_tracker.py index 5388797b80..414c2319d5 100644 --- a/frappe/automation/doctype/milestone_tracker/milestone_tracker.py +++ b/frappe/automation/doctype/milestone_tracker/milestone_tracker.py @@ -8,6 +8,18 @@ from frappe.model.document import Document class MilestoneTracker(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + disabled: DF.Check + document_type: DF.Link + track_field: DF.Literal + # end: auto-generated types def on_update(self): frappe.cache_manager.clear_doctype_map("Milestone Tracker", self.document_type) diff --git a/frappe/automation/doctype/reminder/reminder.py b/frappe/automation/doctype/reminder/reminder.py index 795cdfda69..fb6f1f222e 100644 --- a/frappe/automation/doctype/reminder/reminder.py +++ b/frappe/automation/doctype/reminder/reminder.py @@ -9,6 +9,21 @@ from frappe.utils.data import add_to_date, get_datetime, now_datetime class Reminder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText + notified: DF.Check + remind_at: DF.Datetime + reminder_docname: DF.DynamicLink | None + reminder_doctype: DF.Link | None + user: DF.Link + # end: auto-generated types @staticmethod def clear_old_logs(days=30): from frappe.query_builder import Interval diff --git a/frappe/contacts/doctype/address/address.py b/frappe/contacts/doctype/address/address.py index 0f881bf9be..e81a80fb65 100644 --- a/frappe/contacts/doctype/address/address.py +++ b/frappe/contacts/doctype/address/address.py @@ -15,6 +15,45 @@ from frappe.utils import cstr class Address(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.dynamic_link.dynamic_link import DynamicLink + from frappe.types import DF + + address_line1: DF.Data + address_line2: DF.Data | None + address_title: DF.Data | None + address_type: DF.Literal[ + "Billing", + "Shipping", + "Office", + "Personal", + "Plant", + "Postal", + "Shop", + "Subsidiary", + "Warehouse", + "Current", + "Permanent", + "Other", + ] + city: DF.Data + country: DF.Link + county: DF.Data | None + disabled: DF.Check + email_id: DF.Data | None + fax: DF.Data | None + is_primary_address: DF.Check + is_shipping_address: DF.Check + links: DF.Table[DynamicLink] + phone: DF.Data | None + pincode: DF.Data | None + state: DF.Data | None + # end: auto-generated types def __setup__(self): self.flags.linked = False diff --git a/frappe/contacts/doctype/address_template/address_template.py b/frappe/contacts/doctype/address_template/address_template.py index a33115b105..601fb54302 100644 --- a/frappe/contacts/doctype/address_template/address_template.py +++ b/frappe/contacts/doctype/address_template/address_template.py @@ -8,6 +8,18 @@ from frappe.utils.jinja import validate_template class AddressTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + country: DF.Link + is_default: DF.Check + template: DF.Code | None + # end: auto-generated types def validate(self): validate_template(self.template) diff --git a/frappe/contacts/doctype/contact/contact.py b/frappe/contacts/doctype/contact/contact.py index e58a5a2b7a..a3407e9c63 100644 --- a/frappe/contacts/doctype/contact/contact.py +++ b/frappe/contacts/doctype/contact/contact.py @@ -10,6 +10,43 @@ from frappe.utils import cstr, has_gravatar class Contact(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.contacts.doctype.contact_email.contact_email import ContactEmail + from frappe.contacts.doctype.contact_phone.contact_phone import ContactPhone + from frappe.core.doctype.dynamic_link.dynamic_link import DynamicLink + from frappe.types import DF + + address: DF.Link | None + company_name: DF.Data | None + department: DF.Data | None + designation: DF.Data | None + email_id: DF.Data | None + email_ids: DF.Table[ContactEmail] + first_name: DF.Data | None + full_name: DF.Data | None + gender: DF.Link | None + google_contacts: DF.Link | None + google_contacts_id: DF.Data | None + image: DF.AttachImage | None + is_primary_contact: DF.Check + last_name: DF.Data | None + links: DF.Table[DynamicLink] + middle_name: DF.Data | None + mobile_no: DF.Data | None + phone: DF.Data | None + phone_nos: DF.Table[ContactPhone] + pulled_from_google_contacts: DF.Check + salutation: DF.Link | None + status: DF.Literal["Passive", "Open", "Replied"] + sync_with_google_contacts: DF.Check + unsubscribed: DF.Check + user: DF.Link | None + # end: auto-generated types def autoname(self): self.name = self._get_full_name() diff --git a/frappe/contacts/doctype/contact_email/contact_email.py b/frappe/contacts/doctype/contact_email/contact_email.py index b6be852e57..2667263f39 100644 --- a/frappe/contacts/doctype/contact_email/contact_email.py +++ b/frappe/contacts/doctype/contact_email/contact_email.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class ContactEmail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email_id: DF.Data + is_primary: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/contacts/doctype/contact_phone/contact_phone.py b/frappe/contacts/doctype/contact_phone/contact_phone.py index ba6cd89834..45f164e4c1 100644 --- a/frappe/contacts/doctype/contact_phone/contact_phone.py +++ b/frappe/contacts/doctype/contact_phone/contact_phone.py @@ -6,4 +6,19 @@ from frappe.model.document import Document class ContactPhone(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + is_primary_mobile_no: DF.Check + is_primary_phone: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + phone: DF.Data + # end: auto-generated types pass diff --git a/frappe/contacts/doctype/gender/gender.py b/frappe/contacts/doctype/gender/gender.py index fa38a5a6b0..69e4e8f75c 100644 --- a/frappe/contacts/doctype/gender/gender.py +++ b/frappe/contacts/doctype/gender/gender.py @@ -5,4 +5,14 @@ from frappe.model.document import Document class Gender(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + gender: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/contacts/doctype/salutation/salutation.py b/frappe/contacts/doctype/salutation/salutation.py index 66469c4700..2d10dc18b5 100644 --- a/frappe/contacts/doctype/salutation/salutation.py +++ b/frappe/contacts/doctype/salutation/salutation.py @@ -5,4 +5,14 @@ from frappe.model.document import Document class Salutation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + salutation: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/core/doctype/access_log/access_log.py b/frappe/core/doctype/access_log/access_log.py index b7127b3a44..f62343ea66 100644 --- a/frappe/core/doctype/access_log/access_log.py +++ b/frappe/core/doctype/access_log/access_log.py @@ -8,6 +8,25 @@ from frappe.utils import cstr class AccessLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + columns: DF.HTMLEditor | None + export_from: DF.Data | None + file_type: DF.Data | None + filters: DF.Code | None + method: DF.Data | None + page: DF.HTMLEditor | None + reference_document: DF.Data | None + report_name: DF.Data | None + timestamp: DF.Datetime | None + user: DF.Link | None + # end: auto-generated types @staticmethod def clear_old_logs(days=30): from frappe.query_builder import Interval diff --git a/frappe/core/doctype/activity_log/activity_log.py b/frappe/core/doctype/activity_log/activity_log.py index e819683d0a..f7c21f6825 100644 --- a/frappe/core/doctype/activity_log/activity_log.py +++ b/frappe/core/doctype/activity_log/activity_log.py @@ -10,6 +10,29 @@ from frappe.utils import get_fullname, now class ActivityLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + communication_date: DF.Datetime | None + content: DF.TextEditor | None + full_name: DF.Data | None + link_doctype: DF.Link | None + link_name: DF.DynamicLink | None + operation: DF.Literal["", "Login", "Logout"] + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + reference_owner: DF.ReadOnly | None + status: DF.Literal["", "Success", "Failed", "Linked", "Closed"] + subject: DF.SmallText + timeline_doctype: DF.Link | None + timeline_name: DF.DynamicLink | None + user: DF.Link | None + # end: auto-generated types def before_insert(self): self.full_name = get_fullname(self.user) self.date = now() diff --git a/frappe/core/doctype/amended_document_naming_settings/amended_document_naming_settings.py b/frappe/core/doctype/amended_document_naming_settings/amended_document_naming_settings.py index 91b31350b0..3a25d9fe6c 100644 --- a/frappe/core/doctype/amended_document_naming_settings/amended_document_naming_settings.py +++ b/frappe/core/doctype/amended_document_naming_settings/amended_document_naming_settings.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class AmendedDocumentNamingSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action: DF.Literal["Amend Counter", "Default Naming"] + document_type: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/block_module/block_module.py b/frappe/core/doctype/block_module/block_module.py index b9de5b325e..17dd153d87 100644 --- a/frappe/core/doctype/block_module/block_module.py +++ b/frappe/core/doctype/block_module/block_module.py @@ -5,4 +5,17 @@ from frappe.model.document import Document class BlockModule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + module: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/comment/comment.py b/frappe/core/doctype/comment/comment.py index c86c7811ad..03557c303a 100644 --- a/frappe/core/doctype/comment/comment.py +++ b/frappe/core/doctype/comment/comment.py @@ -12,6 +12,48 @@ from frappe.website.utils import clear_cache class Comment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + comment_by: DF.Data | None + comment_email: DF.Data | None + comment_type: DF.Literal[ + "Comment", + "Like", + "Info", + "Label", + "Workflow", + "Created", + "Submitted", + "Cancelled", + "Updated", + "Deleted", + "Assigned", + "Assignment Completed", + "Attachment", + "Attachment Removed", + "Shared", + "Unshared", + "Bot", + "Relinked", + "Edit", + ] + content: DF.HTMLEditor | None + ip_address: DF.Data | None + link_doctype: DF.Link | None + link_name: DF.DynamicLink | None + published: DF.Check + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + reference_owner: DF.Data | None + seen: DF.Check + subject: DF.Text | None + # end: auto-generated types def after_insert(self): notify_mentions(self.reference_doctype, self.reference_name, self.content) self.notify_change("add") diff --git a/frappe/core/doctype/communication/communication.py b/frappe/core/doctype/communication/communication.py index 067cba59b2..9818b12e99 100644 --- a/frappe/core/doctype/communication/communication.py +++ b/frappe/core/doctype/communication/communication.py @@ -32,6 +32,91 @@ exclude_from_linked_with = True class Communication(Document, CommunicationEmailMixin): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.communication_link.communication_link import CommunicationLink + from frappe.types import DF + + _user_tags: DF.Data | None + bcc: DF.Code | None + cc: DF.Code | None + comment_type: DF.Literal[ + "", + "Comment", + "Like", + "Info", + "Label", + "Workflow", + "Created", + "Submitted", + "Cancelled", + "Updated", + "Deleted", + "Assigned", + "Assignment Completed", + "Attachment", + "Attachment Removed", + "Shared", + "Unshared", + "Relinked", + ] + communication_date: DF.Datetime | None + communication_medium: DF.Literal[ + "", "Email", "Chat", "Phone", "SMS", "Event", "Meeting", "Visit", "Other" + ] + communication_type: DF.Literal[ + "Communication", "Comment", "Chat", "Notification", "Feedback", "Automated Message" + ] + content: DF.TextEditor | None + delivery_status: DF.Literal[ + "", + "Sent", + "Bounced", + "Opened", + "Marked As Spam", + "Rejected", + "Delayed", + "Soft-Bounced", + "Clicked", + "Recipient Unsubscribed", + "Error", + "Expired", + "Sending", + "Read", + ] + email_account: DF.Link | None + email_status: DF.Literal["Open", "Spam", "Trash"] + email_template: DF.Link | None + feedback_request: DF.Data | None + has_attachment: DF.Check + imap_folder: DF.Data | None + in_reply_to: DF.Link | None + message_id: DF.SmallText | None + phone_no: DF.Data | None + rating: DF.Int + read_by_recipient: DF.Check + read_by_recipient_on: DF.Datetime | None + read_receipt: DF.Check + recipients: DF.Code | None + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + reference_owner: DF.ReadOnly | None + seen: DF.Check + sender: DF.Data | None + sender_full_name: DF.Data | None + sent_or_received: DF.Literal["Sent", "Received"] + status: DF.Literal["Open", "Replied", "Closed", "Linked"] + subject: DF.SmallText + text_content: DF.Code | None + timeline_links: DF.Table[CommunicationLink] + uid: DF.Int + unread_notification_sent: DF.Check + user: DF.Link | None + # end: auto-generated types """Communication represents an external communication like Email.""" no_feed_on_delete = True diff --git a/frappe/core/doctype/communication_link/communication_link.py b/frappe/core/doctype/communication_link/communication_link.py index 07633ad174..b79ebca236 100644 --- a/frappe/core/doctype/communication_link/communication_link.py +++ b/frappe/core/doctype/communication_link/communication_link.py @@ -6,6 +6,21 @@ from frappe.model.document import Document class CommunicationLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + link_doctype: DF.Link + link_name: DF.DynamicLink + link_title: DF.ReadOnly | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/custom_docperm/custom_docperm.py b/frappe/core/doctype/custom_docperm/custom_docperm.py index e24c765df4..97360cf35f 100644 --- a/frappe/core/doctype/custom_docperm/custom_docperm.py +++ b/frappe/core/doctype/custom_docperm/custom_docperm.py @@ -6,5 +6,31 @@ from frappe.model.document import Document class CustomDocPerm(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amend: DF.Check + cancel: DF.Check + create: DF.Check + delete: DF.Check + email: DF.Check + export: DF.Check + if_owner: DF.Check + parent: DF.Data | None + permlevel: DF.Int + print: DF.Check + read: DF.Check + report: DF.Check + role: DF.Link + select: DF.Check + share: DF.Check + submit: DF.Check + write: DF.Check + # end: auto-generated types def on_update(self): frappe.clear_cache(doctype=self.parent) diff --git a/frappe/core/doctype/custom_role/custom_role.py b/frappe/core/doctype/custom_role/custom_role.py index 4d96def662..9911f2fad2 100644 --- a/frappe/core/doctype/custom_role/custom_role.py +++ b/frappe/core/doctype/custom_role/custom_role.py @@ -6,6 +6,20 @@ from frappe.model.document import Document class CustomRole(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.types import DF + + page: DF.Link | None + ref_doctype: DF.Data | None + report: DF.Link | None + roles: DF.Table[HasRole] + # end: auto-generated types def validate(self): if self.report and not self.ref_doctype: self.ref_doctype = frappe.db.get_value("Report", self.report, "ref_doctype") diff --git a/frappe/core/doctype/data_export/data_export.py b/frappe/core/doctype/data_export/data_export.py index b27966aa3d..c8d25dfa38 100644 --- a/frappe/core/doctype/data_export/data_export.py +++ b/frappe/core/doctype/data_export/data_export.py @@ -5,4 +5,16 @@ from frappe.model.document import Document class DataExport(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + export_without_main_header: DF.Check + file_type: DF.Literal["Excel", "CSV"] + reference_doctype: DF.Link + # end: auto-generated types pass diff --git a/frappe/core/doctype/data_import/data_import.py b/frappe/core/doctype/data_import/data_import.py index 0df62080be..bd6c6efe4f 100644 --- a/frappe/core/doctype/data_import/data_import.py +++ b/frappe/core/doctype/data_import/data_import.py @@ -17,6 +17,26 @@ BLOCKED_DOCTYPES = set(core_doctypes_list) - {"User", "Role"} class DataImport(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + google_sheets_url: DF.Data | None + import_file: DF.Attach | None + import_type: DF.Literal["", "Insert New Records", "Update Existing Records"] + mute_emails: DF.Check + payload_count: DF.Int + reference_doctype: DF.Link + show_failed_logs: DF.Check + status: DF.Literal["Pending", "Success", "Partial Success", "Error"] + submit_after_import: DF.Check + template_options: DF.Code | None + template_warnings: DF.Code | None + # end: auto-generated types def validate(self): doc_before_save = self.get_doc_before_save() if ( diff --git a/frappe/core/doctype/data_import_log/data_import_log.py b/frappe/core/doctype/data_import_log/data_import_log.py index 8c778babde..2135057fea 100644 --- a/frappe/core/doctype/data_import_log/data_import_log.py +++ b/frappe/core/doctype/data_import_log/data_import_log.py @@ -6,4 +6,20 @@ from frappe.model.document import Document class DataImportLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + data_import: DF.Link | None + docname: DF.Data | None + exception: DF.Text | None + log_index: DF.Int + messages: DF.Code | None + row_indexes: DF.Code | None + success: DF.Check + # end: auto-generated types pass diff --git a/frappe/core/doctype/defaultvalue/defaultvalue.py b/frappe/core/doctype/defaultvalue/defaultvalue.py index da15787769..0458ef8452 100644 --- a/frappe/core/doctype/defaultvalue/defaultvalue.py +++ b/frappe/core/doctype/defaultvalue/defaultvalue.py @@ -6,6 +6,20 @@ from frappe.model.document import Document class DefaultValue(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + defkey: DF.Data + defvalue: DF.Text | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/deleted_document/deleted_document.py b/frappe/core/doctype/deleted_document/deleted_document.py index 9aa8e41708..b5b35206e9 100644 --- a/frappe/core/doctype/deleted_document/deleted_document.py +++ b/frappe/core/doctype/deleted_document/deleted_document.py @@ -11,6 +11,20 @@ from frappe.model.workflow import get_workflow_name class DeletedDocument(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + data: DF.Code | None + deleted_doctype: DF.Data | None + deleted_name: DF.Data | None + new_name: DF.ReadOnly | None + restored: DF.Check + # end: auto-generated types pass diff --git a/frappe/core/doctype/docfield/docfield.py b/frappe/core/doctype/docfield/docfield.py index 96dbfee4cb..5c65d416a1 100644 --- a/frappe/core/doctype/docfield/docfield.py +++ b/frappe/core/doctype/docfield/docfield.py @@ -6,6 +6,115 @@ from frappe.model.document import Document class DocField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_bulk_edit: DF.Check + allow_in_quick_entry: DF.Check + allow_on_submit: DF.Check + bold: DF.Check + collapsible: DF.Check + collapsible_depends_on: DF.Code | None + columns: DF.Int + default: DF.SmallText | None + depends_on: DF.Code | None + description: DF.SmallText | None + documentation_url: DF.Data | None + fetch_from: DF.SmallText | None + fetch_if_empty: DF.Check + fieldname: DF.Data | None + fieldtype: DF.Literal[ + "Autocomplete", + "Attach", + "Attach Image", + "Barcode", + "Button", + "Check", + "Code", + "Color", + "Column Break", + "Currency", + "Data", + "Date", + "Datetime", + "Duration", + "Dynamic Link", + "Float", + "Fold", + "Geolocation", + "Heading", + "HTML", + "HTML Editor", + "Icon", + "Image", + "Int", + "JSON", + "Link", + "Long Text", + "Markdown Editor", + "Password", + "Percent", + "Phone", + "Read Only", + "Rating", + "Section Break", + "Select", + "Signature", + "Small Text", + "Tab Break", + "Table", + "Table MultiSelect", + "Text", + "Text Editor", + "Time", + ] + hidden: DF.Check + hide_border: DF.Check + hide_days: DF.Check + hide_seconds: DF.Check + ignore_user_permissions: DF.Check + ignore_xss_filter: DF.Check + in_filter: DF.Check + in_global_search: DF.Check + in_list_view: DF.Check + in_preview: DF.Check + in_standard_filter: DF.Check + is_virtual: DF.Check + label: DF.Data | None + length: DF.Int + mandatory_depends_on: DF.Code | None + max_height: DF.Data | None + no_copy: DF.Check + non_negative: DF.Check + oldfieldname: DF.Data | None + oldfieldtype: DF.Data | None + options: DF.SmallText | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + permlevel: DF.Int + precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] + print_hide: DF.Check + print_hide_if_no_value: DF.Check + print_width: DF.Data | None + read_only: DF.Check + read_only_depends_on: DF.Code | None + remember_last_selected_value: DF.Check + report_hide: DF.Check + reqd: DF.Check + search_index: DF.Check + set_only_once: DF.Check + show_dashboard: DF.Check + sort_options: DF.Check + translatable: DF.Check + unique: DF.Check + width: DF.Data | None + # end: auto-generated types def get_link_doctype(self): """Returns the Link doctype for the docfield (if applicable) if fieldtype is Link: Returns "options" diff --git a/frappe/core/doctype/docperm/docperm.py b/frappe/core/doctype/docperm/docperm.py index 87d6457c3c..c508b77ce1 100644 --- a/frappe/core/doctype/docperm/docperm.py +++ b/frappe/core/doctype/docperm/docperm.py @@ -5,4 +5,32 @@ from frappe.model.document import Document class DocPerm(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amend: DF.Check + cancel: DF.Check + create: DF.Check + delete: DF.Check + email: DF.Check + export: DF.Check + if_owner: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + permlevel: DF.Int + print: DF.Check + read: DF.Check + report: DF.Check + role: DF.Link + select: DF.Check + share: DF.Check + submit: DF.Check + write: DF.Check + # end: auto-generated types pass diff --git a/frappe/core/doctype/docshare/docshare.py b/frappe/core/doctype/docshare/docshare.py index 641b118f28..ae10d161e0 100644 --- a/frappe/core/doctype/docshare/docshare.py +++ b/frappe/core/doctype/docshare/docshare.py @@ -10,6 +10,24 @@ exclude_from_linked_with = True class DocShare(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + everyone: DF.Check + notify_by_email: DF.Check + read: DF.Check + share: DF.Check + share_doctype: DF.Link + share_name: DF.DynamicLink + submit: DF.Check + user: DF.Link | None + write: DF.Check + # end: auto-generated types no_feed_on_delete = True def validate(self): diff --git a/frappe/core/doctype/doctype/doctype.py b/frappe/core/doctype/doctype/doctype.py index 7accea40ff..65f0b826b9 100644 --- a/frappe/core/doctype/doctype/doctype.py +++ b/frappe/core/doctype/doctype/doctype.py @@ -86,6 +86,94 @@ form_grid_templates = {"fields": "templates/form_grid/fields.html"} class DocType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.docfield.docfield import DocField + from frappe.core.doctype.docperm.docperm import DocPerm + from frappe.core.doctype.doctype_action.doctype_action import DocTypeAction + from frappe.core.doctype.doctype_link.doctype_link import DocTypeLink + from frappe.core.doctype.doctype_state.doctype_state import DocTypeState + from frappe.types import DF + + actions: DF.Table[DocTypeAction] + allow_auto_repeat: DF.Check + allow_copy: DF.Check + allow_events_in_timeline: DF.Check + allow_guest_to_view: DF.Check + allow_import: DF.Check + allow_rename: DF.Check + autoname: DF.Data | None + beta: DF.Check + color: DF.Data | None + custom: DF.Check + default_email_template: DF.Link | None + default_print_format: DF.Data | None + default_view: DF.Literal + description: DF.SmallText | None + document_type: DF.Literal["", "Document", "Setup", "System", "Other"] + documentation: DF.Data | None + editable_grid: DF.Check + email_append_to: DF.Check + engine: DF.Literal["InnoDB", "MyISAM"] + fields: DF.Table[DocField] + force_re_route_to_default_view: DF.Check + has_web_view: DF.Check + hide_toolbar: DF.Check + icon: DF.Data | None + image_field: DF.Data | None + in_create: DF.Check + index_web_pages_for_search: DF.Check + is_calendar_and_gantt: DF.Check + is_published_field: DF.Data | None + is_submittable: DF.Check + is_tree: DF.Check + is_virtual: DF.Check + issingle: DF.Check + istable: DF.Check + links: DF.Table[DocTypeLink] + make_attachments_public: DF.Check + max_attachments: DF.Int + migration_hash: DF.Data | None + module: DF.Link + naming_rule: DF.Literal[ + "", + "Set by user", + "Autoincrement", + "By fieldname", + 'By "Naming Series" field', + "Expression", + "Expression (old style)", + "Random", + "By script", + ] + nsm_parent_field: DF.Data | None + permissions: DF.Table[DocPerm] + queue_in_background: DF.Check + quick_entry: DF.Check + read_only: DF.Check + restrict_to_domain: DF.Link | None + route: DF.Data | None + search_fields: DF.Data | None + sender_field: DF.Data | None + show_name_in_global_search: DF.Check + show_preview_popup: DF.Check + show_title_field_in_link: DF.Check + sort_field: DF.Data | None + sort_order: DF.Literal["ASC", "DESC"] + states: DF.Table[DocTypeState] + subject_field: DF.Data | None + timeline_field: DF.Data | None + title_field: DF.Data | None + track_changes: DF.Check + track_seen: DF.Check + track_views: DF.Check + translated_doctype: DF.Check + website_search_field: DF.Data | None + # end: auto-generated types def validate(self): """Validate DocType before saving. diff --git a/frappe/core/doctype/doctype_action/doctype_action.py b/frappe/core/doctype/doctype_action/doctype_action.py index 1c5be9ae01..5ce72814e0 100644 --- a/frappe/core/doctype/doctype_action/doctype_action.py +++ b/frappe/core/doctype/doctype_action/doctype_action.py @@ -6,4 +6,22 @@ from frappe.model.document import Document class DocTypeAction(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action: DF.SmallText + action_type: DF.Literal["Server Action", "Route"] + custom: DF.Check + group: DF.Data | None + hidden: DF.Check + label: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/doctype_link/doctype_link.py b/frappe/core/doctype/doctype_link/doctype_link.py index 0658b1fb28..338642f567 100644 --- a/frappe/core/doctype/doctype_link/doctype_link.py +++ b/frappe/core/doctype/doctype_link/doctype_link.py @@ -6,4 +6,24 @@ from frappe.model.document import Document class DocTypeLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + custom: DF.Check + group: DF.Data | None + hidden: DF.Check + is_child_table: DF.Check + link_doctype: DF.Link + link_fieldname: DF.Data + parent: DF.Data + parent_doctype: DF.Link | None + parentfield: DF.Data + parenttype: DF.Data + table_fieldname: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/core/doctype/doctype_state/doctype_state.py b/frappe/core/doctype/doctype_state/doctype_state.py index be888d2d85..9d2f183eed 100644 --- a/frappe/core/doctype/doctype_state/doctype_state.py +++ b/frappe/core/doctype/doctype_state/doctype_state.py @@ -6,4 +6,21 @@ from frappe.model.document import Document class DocTypeState(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + color: DF.Literal[ + "Blue", "Cyan", "Gray", "Green", "Light Blue", "Orange", "Pink", "Purple", "Red", "Yellow" + ] + custom: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + title: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/document_naming_rule/document_naming_rule.py b/frappe/core/doctype/document_naming_rule/document_naming_rule.py index 46bc1c5ee2..545929eaa1 100644 --- a/frappe/core/doctype/document_naming_rule/document_naming_rule.py +++ b/frappe/core/doctype/document_naming_rule/document_naming_rule.py @@ -9,6 +9,25 @@ from frappe.utils.data import evaluate_filters class DocumentNamingRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.document_naming_rule_condition.document_naming_rule_condition import ( + DocumentNamingRuleCondition, + ) + from frappe.types import DF + + conditions: DF.Table[DocumentNamingRuleCondition] + counter: DF.Int + disabled: DF.Check + document_type: DF.Link + prefix: DF.Data + prefix_digits: DF.Int + priority: DF.Int + # end: auto-generated types def validate(self): self.validate_fields_in_conditions() diff --git a/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py b/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py index 7ecc0162a5..0b8d540448 100644 --- a/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py +++ b/frappe/core/doctype/document_naming_rule_condition/document_naming_rule_condition.py @@ -6,4 +6,19 @@ from frappe.model.document import Document class DocumentNamingRuleCondition(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + condition: DF.Literal["=", "!=", ">", "<", ">=", "<="] + field: DF.Literal + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + value: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/document_naming_settings/document_naming_settings.py b/frappe/core/doctype/document_naming_settings/document_naming_settings.py index 625b7cdd50..3ec4147ec7 100644 --- a/frappe/core/doctype/document_naming_settings/document_naming_settings.py +++ b/frappe/core/doctype/document_naming_settings/document_naming_settings.py @@ -15,6 +15,27 @@ class NamingSeriesNotSetError(frappe.ValidationError): class DocumentNamingSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.amended_document_naming_settings.amended_document_naming_settings import ( + AmendedDocumentNamingSettings, + ) + from frappe.types import DF + + amend_naming_override: DF.Table[AmendedDocumentNamingSettings] + current_value: DF.Int + default_amend_naming: DF.Literal["Amend Counter", "Default Naming"] + naming_series_options: DF.Text | None + prefix: DF.Autocomplete | None + series_preview: DF.Text | None + transaction_type: DF.Autocomplete | None + try_naming_series: DF.Data | None + user_must_always_select: DF.Check + # end: auto-generated types @frappe.whitelist() def get_transactions_and_prefixes(self): diff --git a/frappe/core/doctype/document_share_key/document_share_key.py b/frappe/core/doctype/document_share_key/document_share_key.py index 88608b992c..ffff1e1387 100644 --- a/frappe/core/doctype/document_share_key/document_share_key.py +++ b/frappe/core/doctype/document_share_key/document_share_key.py @@ -8,6 +8,19 @@ from frappe.model.document import Document class DocumentShareKey(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + expires_on: DF.Date | None + key: DF.Data | None + reference_docname: DF.DynamicLink | None + reference_doctype: DF.Link | None + # end: auto-generated types def before_insert(self): self.key = frappe.generate_hash(length=randrange(25, 35)) if not self.expires_on and not self.flags.no_expiry: diff --git a/frappe/core/doctype/domain/domain.py b/frappe/core/doctype/domain/domain.py index 1f5dbfa22e..0c98856490 100644 --- a/frappe/core/doctype/domain/domain.py +++ b/frappe/core/doctype/domain/domain.py @@ -7,6 +7,16 @@ from frappe.model.document import Document class Domain(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + domain: DF.Data + # end: auto-generated types """Domain documents are created automatically when DocTypes with "Restricted" domains are imported during installation or migration""" diff --git a/frappe/core/doctype/domain_settings/domain_settings.py b/frappe/core/doctype/domain_settings/domain_settings.py index d963a14830..4a1a63329b 100644 --- a/frappe/core/doctype/domain_settings/domain_settings.py +++ b/frappe/core/doctype/domain_settings/domain_settings.py @@ -6,6 +6,17 @@ from frappe.model.document import Document class DomainSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_domain.has_domain import HasDomain + from frappe.types import DF + + active_domains: DF.Table[HasDomain] + # end: auto-generated types def set_active_domains(self, domains): active_domains = [d.domain for d in self.active_domains] added = False diff --git a/frappe/core/doctype/dynamic_link/dynamic_link.py b/frappe/core/doctype/dynamic_link/dynamic_link.py index 53eb750b5c..0ff01eb438 100644 --- a/frappe/core/doctype/dynamic_link/dynamic_link.py +++ b/frappe/core/doctype/dynamic_link/dynamic_link.py @@ -6,6 +6,21 @@ from frappe.model.document import Document class DynamicLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + link_doctype: DF.Link + link_name: DF.DynamicLink + link_title: DF.ReadOnly | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/error_log/error_log.py b/frappe/core/doctype/error_log/error_log.py index 871ec8ebdd..90f00a1531 100644 --- a/frappe/core/doctype/error_log/error_log.py +++ b/frappe/core/doctype/error_log/error_log.py @@ -8,6 +8,20 @@ from frappe.query_builder.functions import Now class ErrorLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + error: DF.Code | None + method: DF.Data | None + reference_doctype: DF.Link | None + reference_name: DF.Data | None + seen: DF.Check + # end: auto-generated types def onload(self): if not self.seen and not frappe.flags.read_only: self.db_set("seen", 1, update_modified=0) diff --git a/frappe/core/doctype/file/file.py b/frappe/core/doctype/file/file.py index 359425d58c..cc3c2c228e 100755 --- a/frappe/core/doctype/file/file.py +++ b/frappe/core/doctype/file/file.py @@ -30,6 +30,31 @@ URL_PREFIXES = ("http://", "https://") class File(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + attached_to_doctype: DF.Link | None + attached_to_field: DF.Data | None + attached_to_name: DF.Data | None + content_hash: DF.Data | None + file_name: DF.Data | None + file_size: DF.Int + file_url: DF.Code | None + folder: DF.Link | None + is_attachments_folder: DF.Check + is_folder: DF.Check + is_home_folder: DF.Check + is_private: DF.Check + old_parent: DF.Data | None + thumbnail_url: DF.SmallText | None + uploaded_to_dropbox: DF.Check + uploaded_to_google_drive: DF.Check + # end: auto-generated types no_feed_on_delete = True def __init__(self, *args, **kwargs): diff --git a/frappe/core/doctype/has_domain/has_domain.py b/frappe/core/doctype/has_domain/has_domain.py index 0d8257fc33..f56fabe4d7 100644 --- a/frappe/core/doctype/has_domain/has_domain.py +++ b/frappe/core/doctype/has_domain/has_domain.py @@ -5,4 +5,17 @@ from frappe.model.document import Document class HasDomain(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + domain: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/has_role/has_role.py b/frappe/core/doctype/has_role/has_role.py index 8798adf031..07a10c782a 100644 --- a/frappe/core/doctype/has_role/has_role.py +++ b/frappe/core/doctype/has_role/has_role.py @@ -6,6 +6,19 @@ from frappe.model.document import Document class HasRole(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + role: DF.Link | None + # end: auto-generated types def before_insert(self): if frappe.db.exists("Has Role", {"parent": self.parent, "role": self.role}): frappe.throw(frappe._("User '{0}' already has the role '{1}'").format(self.parent, self.role)) diff --git a/frappe/core/doctype/installed_application/installed_application.py b/frappe/core/doctype/installed_application/installed_application.py index 0a1dab8f2e..48a36df29f 100644 --- a/frappe/core/doctype/installed_application/installed_application.py +++ b/frappe/core/doctype/installed_application/installed_application.py @@ -6,4 +6,19 @@ from frappe.model.document import Document class InstalledApplication(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + app_name: DF.Data + app_version: DF.Data + git_branch: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/installed_applications/installed_applications.py b/frappe/core/doctype/installed_applications/installed_applications.py index e3f63e8bb2..eaa68ae39d 100644 --- a/frappe/core/doctype/installed_applications/installed_applications.py +++ b/frappe/core/doctype/installed_applications/installed_applications.py @@ -13,6 +13,17 @@ class InvalidAppOrder(frappe.ValidationError): class InstalledApplications(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.installed_application.installed_application import InstalledApplication + from frappe.types import DF + + installed_applications: DF.Table[InstalledApplication] + # end: auto-generated types def update_versions(self): self.delete_key("installed_applications") for app in frappe.utils.get_installed_apps_info(): diff --git a/frappe/core/doctype/language/language.py b/frappe/core/doctype/language/language.py index b5c5bb7637..003b62a4f5 100644 --- a/frappe/core/doctype/language/language.py +++ b/frappe/core/doctype/language/language.py @@ -10,6 +10,20 @@ from frappe.model.document import Document class Language(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + based_on: DF.Link | None + enabled: DF.Check + flag: DF.Data | None + language_code: DF.Data + language_name: DF.Data + # end: auto-generated types def validate(self): validate_with_regex(self.language_code, "Language Code") diff --git a/frappe/core/doctype/log_setting_user/log_setting_user.py b/frappe/core/doctype/log_setting_user/log_setting_user.py index 830d29e3be..87ea2284bc 100644 --- a/frappe/core/doctype/log_setting_user/log_setting_user.py +++ b/frappe/core/doctype/log_setting_user/log_setting_user.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class LogSettingUser(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + user: DF.Link + # end: auto-generated types pass diff --git a/frappe/core/doctype/log_settings/log_settings.py b/frappe/core/doctype/log_settings/log_settings.py index 623e358b6c..ca929af0d0 100644 --- a/frappe/core/doctype/log_settings/log_settings.py +++ b/frappe/core/doctype/log_settings/log_settings.py @@ -43,6 +43,17 @@ def _supports_log_clearing(doctype: str) -> bool: class LogSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.logs_to_clear.logs_to_clear import LogsToClear + from frappe.types import DF + + logs_to_clear: DF.Table[LogsToClear] + # end: auto-generated types def validate(self): self.remove_unsupported_doctypes() self._deduplicate_entries() diff --git a/frappe/core/doctype/logs_to_clear/logs_to_clear.py b/frappe/core/doctype/logs_to_clear/logs_to_clear.py index 3fb4f8e72a..ded1744769 100644 --- a/frappe/core/doctype/logs_to_clear/logs_to_clear.py +++ b/frappe/core/doctype/logs_to_clear/logs_to_clear.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class LogsToClear(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + days: DF.Int + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + ref_doctype: DF.Link + # end: auto-generated types pass diff --git a/frappe/core/doctype/module_def/module_def.py b/frappe/core/doctype/module_def/module_def.py index c9dac11b69..f0cbda34cd 100644 --- a/frappe/core/doctype/module_def/module_def.py +++ b/frappe/core/doctype/module_def/module_def.py @@ -9,6 +9,20 @@ from frappe.model.document import Document class ModuleDef(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + app_name: DF.Literal + custom: DF.Check + module_name: DF.Data + package: DF.Link | None + restrict_to_domain: DF.Link | None + # end: auto-generated types def on_update(self): """If in `developer_mode`, create folder for module and add in `modules.txt` of app if missing.""" diff --git a/frappe/core/doctype/module_profile/module_profile.py b/frappe/core/doctype/module_profile/module_profile.py index c5c67d3c72..3e1a6ce002 100644 --- a/frappe/core/doctype/module_profile/module_profile.py +++ b/frappe/core/doctype/module_profile/module_profile.py @@ -5,6 +5,18 @@ from frappe.model.document import Document class ModuleProfile(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.block_module.block_module import BlockModule + from frappe.types import DF + + block_modules: DF.Table[BlockModule] + module_profile_name: DF.Data + # end: auto-generated types def onload(self): from frappe.config import get_modules_from_all_apps diff --git a/frappe/core/doctype/navbar_item/navbar_item.py b/frappe/core/doctype/navbar_item/navbar_item.py index 60be154e75..72c5bf37e1 100644 --- a/frappe/core/doctype/navbar_item/navbar_item.py +++ b/frappe/core/doctype/navbar_item/navbar_item.py @@ -6,4 +6,22 @@ from frappe.model.document import Document class NavbarItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action: DF.Data | None + hidden: DF.Check + is_standard: DF.Check + item_label: DF.Data | None + item_type: DF.Literal["Route", "Action", "Separator"] + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + route: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/core/doctype/navbar_settings/navbar_settings.py b/frappe/core/doctype/navbar_settings/navbar_settings.py index 1eba0f8fa7..1f670975af 100644 --- a/frappe/core/doctype/navbar_settings/navbar_settings.py +++ b/frappe/core/doctype/navbar_settings/navbar_settings.py @@ -7,6 +7,20 @@ from frappe.model.document import Document class NavbarSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.navbar_item.navbar_item import NavbarItem + from frappe.types import DF + + app_logo: DF.AttachImage | None + help_dropdown: DF.Table[NavbarItem] + logo_width: DF.Int + settings_dropdown: DF.Table[NavbarItem] + # end: auto-generated types def validate(self): self.validate_standard_navbar_items() diff --git a/frappe/core/doctype/package/package.py b/frappe/core/doctype/package/package.py index c1cb482832..a3be3ea7f4 100644 --- a/frappe/core/doctype/package/package.py +++ b/frappe/core/doctype/package/package.py @@ -8,6 +8,21 @@ from frappe.model.document import Document class Package(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + license: DF.MarkdownEditor | None + license_type: DF.Literal[ + "", "MIT License", "GNU General Public License", "GNU Affero General Public License" + ] + package_name: DF.Data + readme: DF.MarkdownEditor | None + # end: auto-generated types def validate(self): if not self.package_name: self.package_name = self.name.lower().replace(" ", "-") diff --git a/frappe/core/doctype/package_import/package_import.py b/frappe/core/doctype/package_import/package_import.py index 25288603e1..a1c499067d 100644 --- a/frappe/core/doctype/package_import/package_import.py +++ b/frappe/core/doctype/package_import/package_import.py @@ -14,6 +14,19 @@ from frappe.utils import get_files_path class PackageImport(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + activate: DF.Check + attach_package: DF.Attach | None + force: DF.Check + log: DF.Code | None + # end: auto-generated types def validate(self): if self.activate: self.import_package() diff --git a/frappe/core/doctype/package_release/package_release.py b/frappe/core/doctype/package_release/package_release.py index d56023ca0d..8ebe0b3082 100644 --- a/frappe/core/doctype/package_release/package_release.py +++ b/frappe/core/doctype/package_release/package_release.py @@ -11,6 +11,22 @@ from frappe.query_builder.functions import Max class PackageRelease(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + major: DF.Int + minor: DF.Int + package: DF.Link + patch: DF.Int + path: DF.SmallText | None + publish: DF.Check + release_notes: DF.MarkdownEditor | None + # end: auto-generated types def set_version(self): # set the next patch release by default doctype = frappe.qb.DocType("Package Release") diff --git a/frappe/core/doctype/page/page.py b/frappe/core/doctype/page/page.py index 8210875b3a..77029b8c67 100644 --- a/frappe/core/doctype/page/page.py +++ b/frappe/core/doctype/page/page.py @@ -14,6 +14,24 @@ from frappe.model.utils import render_include class Page(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.types import DF + + icon: DF.Data | None + module: DF.Link + page_name: DF.Data + restrict_to_domain: DF.Link | None + roles: DF.Table[HasRole] + standard: DF.Literal["Yes", "No"] + system_page: DF.Check + title: DF.Data | None + # end: auto-generated types def autoname(self): """ Creates a url friendly name for this page. diff --git a/frappe/core/doctype/patch_log/patch_log.py b/frappe/core/doctype/patch_log/patch_log.py index 284a80df35..f5d7caca70 100644 --- a/frappe/core/doctype/patch_log/patch_log.py +++ b/frappe/core/doctype/patch_log/patch_log.py @@ -9,6 +9,18 @@ from frappe.model.document import Document class PatchLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + patch: DF.Code | None + skipped: DF.Check + traceback: DF.Code | None + # end: auto-generated types @frappe.whitelist() def rerun_patch(self): from frappe.modules.patch_handler import run_single diff --git a/frappe/core/doctype/prepared_report/prepared_report.py b/frappe/core/doctype/prepared_report/prepared_report.py index 30efa8eb91..ef8ccce9c1 100644 --- a/frappe/core/doctype/prepared_report/prepared_report.py +++ b/frappe/core/doctype/prepared_report/prepared_report.py @@ -22,6 +22,23 @@ REPORT_TIMEOUT = 25 * 60 class PreparedReport(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + error_message: DF.Text | None + filters: DF.SmallText | None + job_id: DF.Link | None + queued_at: DF.Datetime | None + queued_by: DF.Data | None + report_end_time: DF.Datetime | None + report_name: DF.Data + status: DF.Literal["Error", "Queued", "Completed", "Started"] + # end: auto-generated types @property def queued_by(self): return self.owner diff --git a/frappe/core/doctype/report/report.py b/frappe/core/doctype/report/report.py index c3b42ff882..920fc3f806 100644 --- a/frappe/core/doctype/report/report.py +++ b/frappe/core/doctype/report/report.py @@ -17,6 +17,35 @@ from frappe.utils.safe_exec import check_safe_sql_query, safe_exec class Report(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.core.doctype.report_column.report_column import ReportColumn + from frappe.core.doctype.report_filter.report_filter import ReportFilter + from frappe.types import DF + + add_total_row: DF.Check + columns: DF.Table[ReportColumn] + disabled: DF.Check + filters: DF.Table[ReportFilter] + is_standard: DF.Literal["No", "Yes"] + javascript: DF.Code | None + json: DF.Code | None + letter_head: DF.Link | None + module: DF.Link | None + prepared_report: DF.Check + query: DF.Code | None + ref_doctype: DF.Link + reference_report: DF.Data | None + report_name: DF.Data + report_script: DF.Code | None + report_type: DF.Literal["Report Builder", "Query Report", "Script Report", "Custom Report"] + roles: DF.Table[HasRole] + # end: auto-generated types def validate(self): """only administrator can save standard report""" if not self.module: diff --git a/frappe/core/doctype/report_column/report_column.py b/frappe/core/doctype/report_column/report_column.py index 0d6045d121..6a256c967d 100644 --- a/frappe/core/doctype/report_column/report_column.py +++ b/frappe/core/doctype/report_column/report_column.py @@ -6,4 +6,35 @@ from frappe.model.document import Document class ReportColumn(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + fieldname: DF.Data + fieldtype: DF.Literal[ + "Check", + "Currency", + "Data", + "Date", + "Datetime", + "Duration", + "Dynamic Link", + "Float", + "Fold", + "Int", + "Link", + "Select", + "Time", + ] + label: DF.Data + options: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + width: DF.Int + # end: auto-generated types pass diff --git a/frappe/core/doctype/report_filter/report_filter.py b/frappe/core/doctype/report_filter/report_filter.py index f3a9607e20..ea126d86fe 100644 --- a/frappe/core/doctype/report_filter/report_filter.py +++ b/frappe/core/doctype/report_filter/report_filter.py @@ -6,4 +6,36 @@ from frappe.model.document import Document class ReportFilter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + default: DF.SmallText | None + fieldname: DF.Data + fieldtype: DF.Literal[ + "Check", + "Currency", + "Data", + "Date", + "Datetime", + "Dynamic Link", + "Float", + "Fold", + "Int", + "Link", + "Select", + "Time", + ] + label: DF.Data + mandatory: DF.Check + options: DF.SmallText | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + wildcard_filter: DF.Check + # end: auto-generated types pass diff --git a/frappe/core/doctype/role/role.py b/frappe/core/doctype/role/role.py index 8e5ec269ea..b3ec48d946 100644 --- a/frappe/core/doctype/role/role.py +++ b/frappe/core/doctype/role/role.py @@ -19,6 +19,30 @@ STANDARD_ROLES = ("Administrator", "System Manager", "Script Manager", "All", "G class Role(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + bulk_actions: DF.Check + dashboard: DF.Check + desk_access: DF.Check + disabled: DF.Check + form_sidebar: DF.Check + home_page: DF.Data | None + is_custom: DF.Check + list_sidebar: DF.Check + notifications: DF.Check + restrict_to_domain: DF.Link | None + role_name: DF.Data + search_bar: DF.Check + timeline: DF.Check + two_factor_auth: DF.Check + view_switcher: DF.Check + # end: auto-generated types def before_rename(self, old, new, merge=False): if old in STANDARD_ROLES: frappe.throw(frappe._("Standard roles cannot be renamed")) diff --git a/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py b/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py index 9a3511184d..e8b975f638 100644 --- a/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py +++ b/frappe/core/doctype/role_permission_for_page_and_report/role_permission_for_page_and_report.py @@ -8,6 +8,21 @@ from frappe.utils import cint class RolePermissionforPageandReport(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.types import DF + + enable_prepared_report: DF.Check + page: DF.Link | None + report: DF.Link | None + roles: DF.Table[HasRole] + set_role_for: DF.Literal["", "Page", "Report"] + # end: auto-generated types @frappe.whitelist() def set_report_page_data(self): self.set_custom_roles() diff --git a/frappe/core/doctype/role_profile/role_profile.py b/frappe/core/doctype/role_profile/role_profile.py index a8abd6d1c1..b005a695a4 100644 --- a/frappe/core/doctype/role_profile/role_profile.py +++ b/frappe/core/doctype/role_profile/role_profile.py @@ -6,6 +6,18 @@ from frappe.model.document import Document class RoleProfile(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.types import DF + + role_profile: DF.Data + roles: DF.Table[HasRole] + # end: auto-generated types def autoname(self): """set name as Role Profile name""" self.name = self.role_profile diff --git a/frappe/core/doctype/rq_job/rq_job.py b/frappe/core/doctype/rq_job/rq_job.py index aaae8f6455..b6a6f99b57 100644 --- a/frappe/core/doctype/rq_job/rq_job.py +++ b/frappe/core/doctype/rq_job/rq_job.py @@ -39,6 +39,27 @@ def check_permissions(method): class RQJob(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + arguments: DF.Code | None + ended_at: DF.Datetime | None + exc_info: DF.Code | None + job_id: DF.Data | None + job_name: DF.Data | None + queue: DF.Literal["default", "short", "long"] + started_at: DF.Datetime | None + status: DF.Literal[ + "queued", "started", "finished", "failed", "deferred", "scheduled", "canceled" + ] + time_taken: DF.Duration | None + timeout: DF.Duration | None + # end: auto-generated types def load_from_db(self): try: job = Job.fetch(self.name, connection=get_redis_conn()) diff --git a/frappe/core/doctype/rq_worker/rq_worker.py b/frappe/core/doctype/rq_worker/rq_worker.py index 279d10e68c..d3ea97203e 100644 --- a/frappe/core/doctype/rq_worker/rq_worker.py +++ b/frappe/core/doctype/rq_worker/rq_worker.py @@ -13,6 +13,27 @@ from frappe.utils.background_jobs import get_workers class RQWorker(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + birth_date: DF.Datetime | None + current_job_id: DF.Link | None + failed_job_count: DF.Int + last_heartbeat: DF.Datetime | None + pid: DF.Data | None + queue: DF.Data | None + queue_type: DF.Literal["default", "long", "short"] + status: DF.Data | None + successful_job_count: DF.Int + total_working_time: DF.Duration | None + utilization_percent: DF.Percent + worker_name: DF.Data | None + # end: auto-generated types def load_from_db(self): all_workers = get_workers() diff --git a/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py b/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py index 01fa837af0..40f6823057 100644 --- a/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py +++ b/frappe/core/doctype/scheduled_job_log/scheduled_job_log.py @@ -8,6 +8,18 @@ from frappe.query_builder.functions import Now class ScheduledJobLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + details: DF.Code | None + scheduled_job_type: DF.Link + status: DF.Literal["Scheduled", "Complete", "Failed"] + # end: auto-generated types @staticmethod def clear_old_logs(days=90): table = frappe.qb.DocType("Scheduled Job Log") diff --git a/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py b/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py index 272fbad986..fc84204b37 100644 --- a/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py +++ b/frappe/core/doctype/scheduled_job_type/scheduled_job_type.py @@ -14,6 +14,36 @@ from frappe.utils.background_jobs import enqueue, is_job_enqueued class ScheduledJobType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + create_log: DF.Check + cron_format: DF.Data | None + frequency: DF.Literal[ + "All", + "Hourly", + "Hourly Long", + "Daily", + "Daily Long", + "Weekly", + "Weekly Long", + "Monthly", + "Monthly Long", + "Cron", + "Yearly", + "Annual", + ] + last_execution: DF.Datetime | None + method: DF.Data + next_execution: DF.Datetime | None + server_script: DF.Link | None + stopped: DF.Check + # end: auto-generated types def autoname(self): self.name = ".".join(self.method.split(".")[-2:]) diff --git a/frappe/core/doctype/server_script/server_script.py b/frappe/core/doctype/server_script/server_script.py index 758bd46a76..f5206872f9 100644 --- a/frappe/core/doctype/server_script/server_script.py +++ b/frappe/core/doctype/server_script/server_script.py @@ -12,6 +12,55 @@ from frappe.utils.safe_exec import NamespaceDict, get_safe_globals, safe_exec class ServerScript(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_guest: DF.Check + api_method: DF.Data | None + cron_format: DF.Data | None + disabled: DF.Check + doctype_event: DF.Literal[ + "Before Insert", + "Before Validate", + "Before Save", + "After Insert", + "After Save", + "Before Submit", + "After Submit", + "Before Cancel", + "After Cancel", + "Before Delete", + "After Delete", + "Before Save (Submitted Document)", + "After Save (Submitted Document)", + "On Payment Authorization", + ] + enable_rate_limit: DF.Check + event_frequency: DF.Literal[ + "All", + "Hourly", + "Daily", + "Weekly", + "Monthly", + "Yearly", + "Hourly Long", + "Daily Long", + "Weekly Long", + "Monthly Long", + "Cron", + ] + module: DF.Link | None + rate_limit_count: DF.Int + rate_limit_seconds: DF.Int + reference_doctype: DF.Link | None + script: DF.Code + script_type: DF.Literal["DocType Event", "Scheduler Event", "Permission Query", "API"] + # end: auto-generated types def validate(self): frappe.only_for("Script Manager", True) self.sync_scheduled_jobs() diff --git a/frappe/core/doctype/session_default/session_default.py b/frappe/core/doctype/session_default/session_default.py index 3fada1b5e0..c5697ac848 100644 --- a/frappe/core/doctype/session_default/session_default.py +++ b/frappe/core/doctype/session_default/session_default.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class SessionDefault(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + ref_doctype: DF.Link | None + # end: auto-generated types pass diff --git a/frappe/core/doctype/session_default_settings/session_default_settings.py b/frappe/core/doctype/session_default_settings/session_default_settings.py index 2b0d731920..5df080c4f5 100644 --- a/frappe/core/doctype/session_default_settings/session_default_settings.py +++ b/frappe/core/doctype/session_default_settings/session_default_settings.py @@ -9,6 +9,17 @@ from frappe.model.document import Document class SessionDefaultSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.session_default.session_default import SessionDefault + from frappe.types import DF + + session_defaults: DF.Table[SessionDefault] + # end: auto-generated types pass diff --git a/frappe/core/doctype/sms_parameter/sms_parameter.py b/frappe/core/doctype/sms_parameter/sms_parameter.py index d2c5be6c50..a415f1fc25 100644 --- a/frappe/core/doctype/sms_parameter/sms_parameter.py +++ b/frappe/core/doctype/sms_parameter/sms_parameter.py @@ -5,4 +5,19 @@ from frappe.model.document import Document class SMSParameter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + header: DF.Check + parameter: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + value: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/sms_settings/sms_settings.py b/frappe/core/doctype/sms_settings/sms_settings.py index 0a5536eb9b..0047de1daa 100644 --- a/frappe/core/doctype/sms_settings/sms_settings.py +++ b/frappe/core/doctype/sms_settings/sms_settings.py @@ -8,6 +8,21 @@ from frappe.utils import nowdate class SMSSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.sms_parameter.sms_parameter import SMSParameter + from frappe.types import DF + + message_parameter: DF.Data + parameters: DF.Table[SMSParameter] + receiver_parameter: DF.Data + sms_gateway_url: DF.SmallText + use_post: DF.Check + # end: auto-generated types pass diff --git a/frappe/core/doctype/submission_queue/submission_queue.py b/frappe/core/doctype/submission_queue/submission_queue.py index be0c20fc32..ba2c74c3dd 100644 --- a/frappe/core/doctype/submission_queue/submission_queue.py +++ b/frappe/core/doctype/submission_queue/submission_queue.py @@ -15,6 +15,23 @@ from frappe.utils.data import cint class SubmissionQueue(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + created_at: DF.Datetime | None + ended_at: DF.Datetime | None + enqueued_by: DF.Data | None + exception: DF.LongText | None + job_id: DF.Link | None + ref_docname: DF.DynamicLink | None + ref_doctype: DF.Link | None + status: DF.Literal["Queued", "Finished", "Failed"] + # end: auto-generated types @property def created_at(self): return self.creation diff --git a/frappe/core/doctype/success_action/success_action.py b/frappe/core/doctype/success_action/success_action.py index e3db646a2e..c32fe326f2 100644 --- a/frappe/core/doctype/success_action/success_action.py +++ b/frappe/core/doctype/success_action/success_action.py @@ -5,4 +5,18 @@ from frappe.model.document import Document class SuccessAction(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action_timeout: DF.Int + first_success_message: DF.Data + message: DF.Data + next_actions: DF.Data | None + ref_doctype: DF.Link + # end: auto-generated types pass diff --git a/frappe/core/doctype/system_settings/system_settings.py b/frappe/core/doctype/system_settings/system_settings.py index 4e4b86610a..baa870deab 100644 --- a/frappe/core/doctype/system_settings/system_settings.py +++ b/frappe/core/doctype/system_settings/system_settings.py @@ -9,6 +9,88 @@ from frappe.utils import cint, today class SystemSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_consecutive_login_attempts: DF.Int + allow_error_traceback: DF.Check + allow_guests_to_upload_files: DF.Check + allow_login_after_fail: DF.Int + allow_login_using_mobile_number: DF.Check + allow_login_using_user_name: DF.Check + allow_older_web_view_links: DF.Check + app_name: DF.Data | None + apply_strict_user_permissions: DF.Check + attach_view_link: DF.Check + backup_limit: DF.Int + bypass_2fa_for_retricted_ip_users: DF.Check + bypass_restrict_ip_check_if_2fa_enabled: DF.Check + country: DF.Link | None + currency_precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] + date_format: DF.Literal[ + "yyyy-mm-dd", "dd-mm-yyyy", "dd/mm/yyyy", "dd.mm.yyyy", "mm/dd/yyyy", "mm-dd-yyyy" + ] + deny_multiple_sessions: DF.Check + disable_change_log_notification: DF.Check + disable_document_sharing: DF.Check + disable_standard_email_footer: DF.Check + disable_system_update_notification: DF.Check + disable_user_pass_login: DF.Check + document_share_key_expiry: DF.Int + dormant_days: DF.Int + email_footer_address: DF.SmallText | None + email_retry_limit: DF.Int + enable_onboarding: DF.Check + enable_password_policy: DF.Check + enable_scheduler: DF.Check + enable_telemetry: DF.Check + enable_two_factor_auth: DF.Check + encrypt_backup: DF.Check + first_day_of_the_week: DF.Literal[ + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + ] + float_precision: DF.Literal["", "2", "3", "4", "5", "6", "7", "8", "9"] + force_user_to_reset_password: DF.Int + hide_footer_in_auto_email_reports: DF.Check + language: DF.Link + lifespan_qrcode_image: DF.Int + login_with_email_link: DF.Check + login_with_email_link_expiry: DF.Int + logout_on_password_reset: DF.Check + max_auto_email_report_per_user: DF.Int + minimum_password_score: DF.Literal["2", "3", "4"] + number_format: DF.Literal[ + "#,###.##", + "#.###,##", + "# ###.##", + "# ###,##", + "#'###.##", + "#, ###.##", + "#,##,###.##", + "#,###.###", + "#.###", + "#,###", + ] + otp_issuer_name: DF.Data | None + password_reset_limit: DF.Int + reset_password_link_expiry_duration: DF.Duration | None + reset_password_template: DF.Link | None + rounding_method: DF.Literal[ + "Banker's Rounding (legacy)", "Banker's Rounding", "Commercial Rounding" + ] + session_expiry: DF.Data | None + setup_complete: DF.Check + strip_exif_metadata_from_uploaded_images: DF.Check + time_format: DF.Literal["HH:mm:ss", "HH:mm"] + time_zone: DF.Literal + two_factor_method: DF.Literal["OTP App", "SMS", "Email"] + welcome_email_template: DF.Link | None + # end: auto-generated types def validate(self): from frappe.twofactor import toggle_two_factor_auth diff --git a/frappe/core/doctype/transaction_log/transaction_log.py b/frappe/core/doctype/transaction_log/transaction_log.py index efe9bbddc2..203580a614 100644 --- a/frappe/core/doctype/transaction_log/transaction_log.py +++ b/frappe/core/doctype/transaction_log/transaction_log.py @@ -10,6 +10,25 @@ from frappe.utils import cint, now_datetime class TransactionLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + chaining_hash: DF.SmallText | None + checksum_version: DF.Data | None + data: DF.LongText | None + document_name: DF.Data | None + previous_hash: DF.SmallText | None + reference_doctype: DF.Data | None + row_index: DF.Data | None + timestamp: DF.Datetime | None + transaction_hash: DF.SmallText | None + # end: auto-generated types def before_insert(self): index = get_current_index() self.row_index = index diff --git a/frappe/core/doctype/translation/translation.py b/frappe/core/doctype/translation/translation.py index c8226db5b0..bb5e517160 100644 --- a/frappe/core/doctype/translation/translation.py +++ b/frappe/core/doctype/translation/translation.py @@ -10,6 +10,22 @@ from frappe.utils import is_html, strip_html_tags class Translation(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + context: DF.Data | None + contributed: DF.Check + contribution_docname: DF.Data | None + contribution_status: DF.Literal["", "Pending", "Verified", "Rejected"] + language: DF.Link + source_text: DF.Code + translated_text: DF.Code + # end: auto-generated types def validate(self): if is_html(self.source_text): self.remove_html_from_source() diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 062d3f349f..b1f8777777 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -37,6 +37,80 @@ from frappe.website.utils import is_signup_disabled class User(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.block_module.block_module import BlockModule + from frappe.core.doctype.defaultvalue.defaultvalue import DefaultValue + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.core.doctype.user_email.user_email import UserEmail + from frappe.core.doctype.user_social_login.user_social_login import UserSocialLogin + from frappe.types import DF + + allowed_in_mentions: DF.Check + api_key: DF.Data | None + api_secret: DF.Password | None + banner_image: DF.AttachImage | None + bio: DF.Text | None + birth_date: DF.Date | None + block_modules: DF.Table[BlockModule] + bypass_restrict_ip_check_if_2fa_enabled: DF.Check + defaults: DF.Table[DefaultValue] + desk_theme: DF.Literal["Light", "Dark", "Automatic"] + document_follow_frequency: DF.Literal["Hourly", "Daily", "Weekly"] + document_follow_notify: DF.Check + email: DF.Data + email_signature: DF.SmallText | None + enabled: DF.Check + first_name: DF.Data + follow_assigned_documents: DF.Check + follow_commented_documents: DF.Check + follow_created_documents: DF.Check + follow_liked_documents: DF.Check + follow_shared_documents: DF.Check + full_name: DF.Data | None + gender: DF.Link | None + home_settings: DF.Code | None + interest: DF.SmallText | None + language: DF.Link | None + last_active: DF.Datetime | None + last_ip: DF.ReadOnly | None + last_known_versions: DF.Text | None + last_login: DF.ReadOnly | None + last_name: DF.Data | None + last_password_reset_date: DF.Date | None + last_reset_password_key_generated_on: DF.Datetime | None + location: DF.Data | None + login_after: DF.Int + login_before: DF.Int + logout_all_sessions: DF.Check + middle_name: DF.Data | None + mobile_no: DF.Data | None + module_profile: DF.Link | None + mute_sounds: DF.Check + new_password: DF.Password | None + onboarding_status: DF.SmallText | None + phone: DF.Data | None + redirect_url: DF.SmallText | None + reset_password_key: DF.Data | None + restrict_ip: DF.SmallText | None + role_profile_name: DF.Link | None + roles: DF.Table[HasRole] + send_me_a_copy: DF.Check + send_welcome_email: DF.Check + simultaneous_sessions: DF.Int + social_logins: DF.Table[UserSocialLogin] + thread_notify: DF.Check + time_zone: DF.Literal + unsubscribed: DF.Check + user_emails: DF.Table[UserEmail] + user_image: DF.AttachImage | None + user_type: DF.Link | None + username: DF.Data | None + # end: auto-generated types __new_password = None def __setup__(self): diff --git a/frappe/core/doctype/user_document_type/user_document_type.py b/frappe/core/doctype/user_document_type/user_document_type.py index 731acf582b..3280aecd5d 100644 --- a/frappe/core/doctype/user_document_type/user_document_type.py +++ b/frappe/core/doctype/user_document_type/user_document_type.py @@ -6,4 +6,25 @@ from frappe.model.document import Document class UserDocumentType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amend: DF.Check + cancel: DF.Check + create: DF.Check + delete: DF.Check + document_type: DF.Link + is_custom: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + read: DF.Check + submit: DF.Check + write: DF.Check + # end: auto-generated types pass diff --git a/frappe/core/doctype/user_email/user_email.py b/frappe/core/doctype/user_email/user_email.py index ebca480f47..de9a5176f6 100644 --- a/frappe/core/doctype/user_email/user_email.py +++ b/frappe/core/doctype/user_email/user_email.py @@ -5,4 +5,21 @@ from frappe.model.document import Document class UserEmail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + awaiting_password: DF.Check + email_account: DF.Link + email_id: DF.Data | None + enable_outgoing: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + used_oauth: DF.Check + # end: auto-generated types pass diff --git a/frappe/core/doctype/user_group/user_group.py b/frappe/core/doctype/user_group/user_group.py index 7acdec3aaa..4318114440 100644 --- a/frappe/core/doctype/user_group/user_group.py +++ b/frappe/core/doctype/user_group/user_group.py @@ -8,6 +8,17 @@ from frappe.model.document import Document class UserGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.user_group_member.user_group_member import UserGroupMember + from frappe.types import DF + + user_group_members: DF.TableMultiSelect[UserGroupMember] + # end: auto-generated types def after_insert(self): frappe.cache.delete_key("user_groups") diff --git a/frappe/core/doctype/user_group_member/user_group_member.py b/frappe/core/doctype/user_group_member/user_group_member.py index e9722a07ad..c85278414a 100644 --- a/frappe/core/doctype/user_group_member/user_group_member.py +++ b/frappe/core/doctype/user_group_member/user_group_member.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class UserGroupMember(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + user: DF.Link + # end: auto-generated types pass diff --git a/frappe/core/doctype/user_permission/user_permission.py b/frappe/core/doctype/user_permission/user_permission.py index 805242325f..f52116ed75 100644 --- a/frappe/core/doctype/user_permission/user_permission.py +++ b/frappe/core/doctype/user_permission/user_permission.py @@ -12,6 +12,22 @@ from frappe.utils import cstr class UserPermission(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow: DF.Link + applicable_for: DF.Link | None + apply_to_all_doctypes: DF.Check + for_value: DF.DynamicLink + hide_descendants: DF.Check + is_default: DF.Check + user: DF.Link + # end: auto-generated types def validate(self): self.validate_user_permission() self.validate_default_permission() diff --git a/frappe/core/doctype/user_select_document_type/user_select_document_type.py b/frappe/core/doctype/user_select_document_type/user_select_document_type.py index 9cf2e4856d..5cdd269e5e 100644 --- a/frappe/core/doctype/user_select_document_type/user_select_document_type.py +++ b/frappe/core/doctype/user_select_document_type/user_select_document_type.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class UserSelectDocumentType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_type: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/user_social_login/user_social_login.py b/frappe/core/doctype/user_social_login/user_social_login.py index 4cf3f720cd..e08eefb3f8 100644 --- a/frappe/core/doctype/user_social_login/user_social_login.py +++ b/frappe/core/doctype/user_social_login/user_social_login.py @@ -5,4 +5,19 @@ from frappe.model.document import Document class UserSocialLogin(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + provider: DF.Data | None + userid: DF.Data | None + username: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/core/doctype/user_type/user_type.py b/frappe/core/doctype/user_type/user_type.py index 9660963c19..f5c86b1ae5 100644 --- a/frappe/core/doctype/user_type/user_type.py +++ b/frappe/core/doctype/user_type/user_type.py @@ -10,6 +10,28 @@ from frappe.utils import get_link_to_form class UserType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.user_document_type.user_document_type import UserDocumentType + from frappe.core.doctype.user_select_document_type.user_select_document_type import ( + UserSelectDocumentType, + ) + from frappe.core.doctype.user_type_module.user_type_module import UserTypeModule + from frappe.types import DF + + apply_user_permission_on: DF.Link | None + custom_select_doctypes: DF.Table[UserSelectDocumentType] + is_standard: DF.Check + role: DF.Link | None + select_doctypes: DF.Table[UserSelectDocumentType] + user_doctypes: DF.Table[UserDocumentType] + user_id_field: DF.Literal + user_type_modules: DF.Table[UserTypeModule] + # end: auto-generated types def validate(self): self.set_modules() self.add_select_perm_doctypes() diff --git a/frappe/core/doctype/user_type_module/user_type_module.py b/frappe/core/doctype/user_type_module/user_type_module.py index 1dc7c849e8..9972677690 100644 --- a/frappe/core/doctype/user_type_module/user_type_module.py +++ b/frappe/core/doctype/user_type_module/user_type_module.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class UserTypeModule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + module: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/core/doctype/version/version.py b/frappe/core/doctype/version/version.py index 40ee006a58..d68cda25b5 100644 --- a/frappe/core/doctype/version/version.py +++ b/frappe/core/doctype/version/version.py @@ -9,6 +9,18 @@ from frappe.model.document import Document class Version(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + data: DF.Code | None + docname: DF.Data + ref_doctype: DF.Link + # end: auto-generated types def update_version_info(self, old: Document | None, new: Document) -> bool: """Update changed info and return true if change contains useful data.""" if not old: diff --git a/frappe/core/doctype/view_log/view_log.py b/frappe/core/doctype/view_log/view_log.py index 5dde78d007..441bccedf9 100644 --- a/frappe/core/doctype/view_log/view_log.py +++ b/frappe/core/doctype/view_log/view_log.py @@ -6,6 +6,18 @@ from frappe.model.document import Document class ViewLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + viewed_by: DF.Data | None + # end: auto-generated types @staticmethod def clear_old_logs(days=180): from frappe.query_builder import Interval diff --git a/frappe/custom/doctype/client_script/client_script.py b/frappe/custom/doctype/client_script/client_script.py index e18ad4be5d..ca7b829a12 100644 --- a/frappe/custom/doctype/client_script/client_script.py +++ b/frappe/custom/doctype/client_script/client_script.py @@ -5,6 +5,20 @@ from frappe.model.document import Document class ClientScript(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + dt: DF.Link + enabled: DF.Check + module: DF.Link | None + script: DF.Code | None + view: DF.Literal["List", "Form"] + # end: auto-generated types def on_update(self): frappe.clear_cache(doctype=self.dt) diff --git a/frappe/custom/doctype/custom_field/custom_field.py b/frappe/custom/doctype/custom_field/custom_field.py index ed6296b6f2..b73820a562 100644 --- a/frappe/custom/doctype/custom_field/custom_field.py +++ b/frappe/custom/doctype/custom_field/custom_field.py @@ -13,6 +13,107 @@ from frappe.utils import cstr, random_string class CustomField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_in_quick_entry: DF.Check + allow_on_submit: DF.Check + bold: DF.Check + collapsible: DF.Check + collapsible_depends_on: DF.Code | None + columns: DF.Int + default: DF.Text | None + depends_on: DF.Code | None + description: DF.Text | None + dt: DF.Link + fetch_from: DF.SmallText | None + fetch_if_empty: DF.Check + fieldname: DF.Data | None + fieldtype: DF.Literal[ + "Autocomplete", + "Attach", + "Attach Image", + "Barcode", + "Button", + "Check", + "Code", + "Color", + "Column Break", + "Currency", + "Data", + "Date", + "Datetime", + "Duration", + "Dynamic Link", + "Float", + "Fold", + "Geolocation", + "Heading", + "HTML", + "HTML Editor", + "Icon", + "Image", + "Int", + "JSON", + "Link", + "Long Text", + "Markdown Editor", + "Password", + "Percent", + "Phone", + "Read Only", + "Rating", + "Section Break", + "Select", + "Signature", + "Small Text", + "Tab Break", + "Table", + "Table MultiSelect", + "Text", + "Text Editor", + "Time", + ] + hidden: DF.Check + hide_border: DF.Check + hide_days: DF.Check + hide_seconds: DF.Check + ignore_user_permissions: DF.Check + ignore_xss_filter: DF.Check + in_global_search: DF.Check + in_list_view: DF.Check + in_preview: DF.Check + in_standard_filter: DF.Check + insert_after: DF.Literal + is_system_generated: DF.Check + is_virtual: DF.Check + label: DF.Data | None + length: DF.Int + mandatory_depends_on: DF.Code | None + module: DF.Link | None + no_copy: DF.Check + non_negative: DF.Check + options: DF.SmallText | None + permlevel: DF.Int + precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] + print_hide: DF.Check + print_hide_if_no_value: DF.Check + print_width: DF.Data | None + read_only: DF.Check + read_only_depends_on: DF.Code | None + report_hide: DF.Check + reqd: DF.Check + search_index: DF.Check + sort_options: DF.Check + translatable: DF.Check + unique: DF.Check + width: DF.Data | None + # end: auto-generated types def autoname(self): self.set_fieldname() self.name = self.dt + "-" + self.fieldname diff --git a/frappe/custom/doctype/customize_form/customize_form.py b/frappe/custom/doctype/customize_form/customize_form.py index 868a913ce3..527f53ea71 100644 --- a/frappe/custom/doctype/customize_form/customize_form.py +++ b/frappe/custom/doctype/customize_form/customize_form.py @@ -25,6 +25,63 @@ from frappe.utils import cint class CustomizeForm(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.doctype_action.doctype_action import DocTypeAction + from frappe.core.doctype.doctype_link.doctype_link import DocTypeLink + from frappe.core.doctype.doctype_state.doctype_state import DocTypeState + from frappe.custom.doctype.customize_form_field.customize_form_field import CustomizeFormField + from frappe.types import DF + + actions: DF.Table[DocTypeAction] + allow_auto_repeat: DF.Check + allow_copy: DF.Check + allow_import: DF.Check + autoname: DF.Data | None + default_email_template: DF.Link | None + default_print_format: DF.Link | None + default_view: DF.Literal + doc_type: DF.Link | None + editable_grid: DF.Check + email_append_to: DF.Check + fields: DF.Table[CustomizeFormField] + force_re_route_to_default_view: DF.Check + image_field: DF.Data | None + is_calendar_and_gantt: DF.Check + istable: DF.Check + label: DF.Data | None + links: DF.Table[DocTypeLink] + make_attachments_public: DF.Check + max_attachments: DF.Int + naming_rule: DF.Literal[ + "", + "Set by user", + "By fieldname", + 'By "Naming Series" field', + "Expression", + "Expression (old style)", + "Random", + "By script", + ] + queue_in_background: DF.Check + quick_entry: DF.Check + search_fields: DF.Data | None + sender_field: DF.Data | None + show_preview_popup: DF.Check + show_title_field_in_link: DF.Check + sort_field: DF.Literal + sort_order: DF.Literal["ASC", "DESC"] + states: DF.Table[DocTypeState] + subject_field: DF.Data | None + title_field: DF.Data | None + track_changes: DF.Check + track_views: DF.Check + translated_doctype: DF.Check + # end: auto-generated types def on_update(self): frappe.db.delete("Singles", {"doctype": "Customize Form"}) frappe.db.delete("Customize Form Field") diff --git a/frappe/custom/doctype/customize_form_field/customize_form_field.py b/frappe/custom/doctype/customize_form_field/customize_form_field.py index 468496ca7a..1afb5ad34b 100644 --- a/frappe/custom/doctype/customize_form_field/customize_form_field.py +++ b/frappe/custom/doctype/customize_form_field/customize_form_field.py @@ -5,4 +5,108 @@ from frappe.model.document import Document class CustomizeFormField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_bulk_edit: DF.Check + allow_in_quick_entry: DF.Check + allow_on_submit: DF.Check + bold: DF.Check + collapsible: DF.Check + collapsible_depends_on: DF.Code | None + columns: DF.Int + default: DF.SmallText | None + depends_on: DF.Code | None + description: DF.Text | None + fetch_from: DF.SmallText | None + fetch_if_empty: DF.Check + fieldname: DF.Data | None + fieldtype: DF.Literal[ + "Autocomplete", + "Attach", + "Attach Image", + "Barcode", + "Button", + "Check", + "Code", + "Color", + "Column Break", + "Currency", + "Data", + "Date", + "Datetime", + "Duration", + "Dynamic Link", + "Float", + "Fold", + "Geolocation", + "Heading", + "HTML", + "HTML Editor", + "Icon", + "Image", + "Int", + "Link", + "Long Text", + "Markdown Editor", + "Password", + "Percent", + "Phone", + "Rating", + "Read Only", + "Section Break", + "Select", + "Signature", + "Small Text", + "Tab Break", + "Table", + "Table MultiSelect", + "Text", + "Text Editor", + "Time", + ] + hidden: DF.Check + hide_border: DF.Check + hide_days: DF.Check + hide_seconds: DF.Check + ignore_user_permissions: DF.Check + ignore_xss_filter: DF.Check + in_filter: DF.Check + in_global_search: DF.Check + in_list_view: DF.Check + in_preview: DF.Check + in_standard_filter: DF.Check + is_custom_field: DF.Check + is_system_generated: DF.Check + is_virtual: DF.Check + label: DF.Data | None + length: DF.Int + mandatory_depends_on: DF.Code | None + no_copy: DF.Check + non_negative: DF.Check + options: DF.SmallText | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + permlevel: DF.Int + precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] + print_hide: DF.Check + print_hide_if_no_value: DF.Check + print_width: DF.Data | None + read_only: DF.Check + read_only_depends_on: DF.Code | None + remember_last_selected_value: DF.Check + report_hide: DF.Check + reqd: DF.Check + show_dashboard: DF.Check + sort_options: DF.Check + translatable: DF.Check + unique: DF.Check + width: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/custom/doctype/doctype_layout/doctype_layout.py b/frappe/custom/doctype/doctype_layout/doctype_layout.py index f712853ccd..2589270944 100644 --- a/frappe/custom/doctype/doctype_layout/doctype_layout.py +++ b/frappe/custom/doctype/doctype_layout/doctype_layout.py @@ -12,6 +12,20 @@ if TYPE_CHECKING: class DocTypeLayout(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.custom.doctype.doctype_layout_field.doctype_layout_field import DocTypeLayoutField + from frappe.types import DF + + client_script: DF.Code | None + document_type: DF.Link + fields: DF.Table[DocTypeLayoutField] + route: DF.Data + # end: auto-generated types def validate(self): if not self.route: self.route = slug(self.name) diff --git a/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py b/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py index f2b8c2b40b..470517b589 100644 --- a/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py +++ b/frappe/custom/doctype/doctype_layout_field/doctype_layout_field.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class DocTypeLayoutField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + fieldname: DF.Literal + label: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/custom/doctype/property_setter/property_setter.py b/frappe/custom/doctype/property_setter/property_setter.py index bac616356d..56f3144722 100644 --- a/frappe/custom/doctype/property_setter/property_setter.py +++ b/frappe/custom/doctype/property_setter/property_setter.py @@ -9,6 +9,27 @@ not_allowed_fieldtype_change = ["naming_series"] class PropertySetter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + default_value: DF.Data | None + doc_type: DF.Link + doctype_or_field: DF.Literal[ + "", "DocField", "DocType", "DocType Link", "DocType Action", "DocType State" + ] + field_name: DF.Data | None + is_system_generated: DF.Check + module: DF.Link | None + property: DF.Data + property_type: DF.Data | None + row_name: DF.Data | None + value: DF.SmallText | None + # end: auto-generated types def autoname(self): self.name = "{doctype}-{field}-{property}".format( doctype=self.doc_type, field=self.field_name or self.row_name or "main", property=self.property diff --git a/frappe/desk/doctype/bulk_update/bulk_update.py b/frappe/desk/doctype/bulk_update/bulk_update.py index 535be8155f..526543e825 100644 --- a/frappe/desk/doctype/bulk_update/bulk_update.py +++ b/frappe/desk/doctype/bulk_update/bulk_update.py @@ -10,6 +10,20 @@ from frappe.utils.scheduler import is_scheduler_inactive class BulkUpdate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + condition: DF.SmallText | None + document_type: DF.Link + field: DF.Literal + limit: DF.Int + update_value: DF.SmallText + # end: auto-generated types @frappe.whitelist() def bulk_update(self): self.check_permission("write") diff --git a/frappe/desk/doctype/calendar_view/calendar_view.py b/frappe/desk/doctype/calendar_view/calendar_view.py index 1e187682ec..e5ce017669 100644 --- a/frappe/desk/doctype/calendar_view/calendar_view.py +++ b/frappe/desk/doctype/calendar_view/calendar_view.py @@ -5,4 +5,18 @@ from frappe.model.document import Document class CalendarView(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + all_day: DF.Check + end_date_field: DF.Literal + reference_doctype: DF.Link + start_date_field: DF.Literal + subject_field: DF.Literal + # end: auto-generated types pass diff --git a/frappe/desk/doctype/console_log/console_log.py b/frappe/desk/doctype/console_log/console_log.py index 7e20afb22f..9e243ee19a 100644 --- a/frappe/desk/doctype/console_log/console_log.py +++ b/frappe/desk/doctype/console_log/console_log.py @@ -6,4 +6,14 @@ from frappe.model.document import Document class ConsoleLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + script: DF.Code | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/custom_html_block/custom_html_block.py b/frappe/desk/doctype/custom_html_block/custom_html_block.py index 2b65ceeaf4..3ce7966f6a 100644 --- a/frappe/desk/doctype/custom_html_block/custom_html_block.py +++ b/frappe/desk/doctype/custom_html_block/custom_html_block.py @@ -7,6 +7,21 @@ from frappe.query_builder.utils import DocType class CustomHTMLBlock(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.types import DF + + html: DF.Code | None + private: DF.Check + roles: DF.Table[HasRole] + script: DF.Code | None + style: DF.Code | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/dashboard/dashboard.py b/frappe/desk/doctype/dashboard/dashboard.py index 960431d220..4b5e14e1bd 100644 --- a/frappe/desk/doctype/dashboard/dashboard.py +++ b/frappe/desk/doctype/dashboard/dashboard.py @@ -12,6 +12,24 @@ from frappe.query_builder import DocType class Dashboard(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.dashboard_chart_link.dashboard_chart_link import DashboardChartLink + from frappe.desk.doctype.number_card_link.number_card_link import NumberCardLink + from frappe.types import DF + + cards: DF.Table[NumberCardLink] + chart_options: DF.Code | None + charts: DF.Table[DashboardChartLink] + dashboard_name: DF.Data + is_default: DF.Check + is_standard: DF.Check + module: DF.Link | None + # end: auto-generated types def on_update(self): if self.is_default: # make all other dashboards non-default diff --git a/frappe/desk/doctype/dashboard_chart/dashboard_chart.py b/frappe/desk/doctype/dashboard_chart/dashboard_chart.py index 16f4efea9d..441dbc8d1a 100644 --- a/frappe/desk/doctype/dashboard_chart/dashboard_chart.py +++ b/frappe/desk/doctype/dashboard_chart/dashboard_chart.py @@ -339,6 +339,48 @@ def get_charts_for_user(doctype, txt, searchfield, start, page_len, filters): class DashboardChart(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.desk.doctype.dashboard_chart_field.dashboard_chart_field import DashboardChartField + from frappe.types import DF + + aggregate_function_based_on: DF.Literal + based_on: DF.Literal + chart_name: DF.Data + chart_type: DF.Literal["Count", "Sum", "Average", "Group By", "Custom", "Report"] + color: DF.Color | None + custom_options: DF.Code | None + document_type: DF.Link | None + dynamic_filters_json: DF.Code | None + filters_json: DF.Code + from_date: DF.Date | None + group_by_based_on: DF.Literal + group_by_type: DF.Literal["Count", "Sum", "Average"] + heatmap_year: DF.Literal + is_public: DF.Check + is_standard: DF.Check + last_synced_on: DF.Datetime | None + module: DF.Link | None + number_of_groups: DF.Int + parent_document_type: DF.Link | None + report_name: DF.Link | None + roles: DF.Table[HasRole] + source: DF.Link | None + time_interval: DF.Literal["Yearly", "Quarterly", "Monthly", "Weekly", "Daily"] + timeseries: DF.Check + timespan: DF.Literal["Last Year", "Last Quarter", "Last Month", "Last Week", "Select Date Range"] + to_date: DF.Date | None + type: DF.Literal["Line", "Bar", "Percentage", "Pie", "Donut", "Heatmap"] + use_report_chart: DF.Check + value_based_on: DF.Literal + x_field: DF.Literal + y_axis: DF.Table[DashboardChartField] + # end: auto-generated types def on_update(self): frappe.cache.delete_key(f"chart-data:{self.name}") if frappe.conf.developer_mode and self.is_standard: diff --git a/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py b/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py index adc03663a2..0c0dfb6f64 100644 --- a/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py +++ b/frappe/desk/doctype/dashboard_chart_field/dashboard_chart_field.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class DashboardChartField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + color: DF.Color | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + y_field: DF.Literal + # end: auto-generated types pass diff --git a/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py b/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py index 4d98b69458..d95e9bb436 100644 --- a/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py +++ b/frappe/desk/doctype/dashboard_chart_link/dashboard_chart_link.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class DashboardChartLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + chart: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + width: DF.Literal["Half", "Full"] + # end: auto-generated types pass diff --git a/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py b/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py index 5519ad9097..0ba5a895e9 100644 --- a/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py +++ b/frappe/desk/doctype/dashboard_chart_source/dashboard_chart_source.py @@ -21,6 +21,18 @@ def get_config(name): class DashboardChartSource(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + module: DF.Link + source_name: DF.Data + timeseries: DF.Check + # end: auto-generated types def on_update(self): export_to_files( record_list=[[self.doctype, self.name]], record_module=self.module, create_init=True diff --git a/frappe/desk/doctype/dashboard_settings/dashboard_settings.py b/frappe/desk/doctype/dashboard_settings/dashboard_settings.py index 489beda0bf..387c73f954 100644 --- a/frappe/desk/doctype/dashboard_settings/dashboard_settings.py +++ b/frappe/desk/doctype/dashboard_settings/dashboard_settings.py @@ -10,6 +10,17 @@ from frappe.model.document import Document class DashboardSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + chart_config: DF.Code | None + user: DF.Link | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/desktop_icon/desktop_icon.py b/frappe/desk/doctype/desktop_icon/desktop_icon.py index 0d6e5bb815..524285f85d 100644 --- a/frappe/desk/doctype/desktop_icon/desktop_icon.py +++ b/frappe/desk/doctype/desktop_icon/desktop_icon.py @@ -11,6 +11,33 @@ from frappe.utils.user import UserPermissions class DesktopIcon(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + _doctype: DF.Link | None + _report: DF.Link | None + app: DF.Data | None + blocked: DF.Check + category: DF.Data | None + color: DF.Data | None + custom: DF.Check + description: DF.SmallText | None + force_show: DF.Check + hidden: DF.Check + icon: DF.Data | None + idx: DF.Int + label: DF.Data | None + link: DF.SmallText | None + module_name: DF.Data | None + reverse: DF.Check + standard: DF.Check + type: DF.Literal["module", "list", "link", "page", "query-report"] + # end: auto-generated types def validate(self): if not self.label: self.label = self.module_name diff --git a/frappe/desk/doctype/event/event.py b/frappe/desk/doctype/event/event.py index 5013c4fb3d..5463df6413 100644 --- a/frappe/desk/doctype/event/event.py +++ b/frappe/desk/doctype/event/event.py @@ -38,6 +38,45 @@ communication_mapping = { class Event(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.event_participants.event_participants import EventParticipants + from frappe.types import DF + + add_video_conferencing: DF.Check + all_day: DF.Check + color: DF.Color | None + description: DF.TextEditor | None + ends_on: DF.Datetime | None + event_category: DF.Literal["Event", "Meeting", "Call", "Sent/Received Email", "Other"] + event_participants: DF.Table[EventParticipants] + event_type: DF.Literal["Private", "Public"] + friday: DF.Check + google_calendar: DF.Link | None + google_calendar_event_id: DF.Data | None + google_calendar_id: DF.Data | None + google_meet_link: DF.Data | None + monday: DF.Check + pulled_from_google_calendar: DF.Check + repeat_on: DF.Literal["", "Daily", "Weekly", "Monthly", "Yearly"] + repeat_this_event: DF.Check + repeat_till: DF.Date | None + saturday: DF.Check + send_reminder: DF.Check + sender: DF.Data | None + starts_on: DF.Datetime + status: DF.Literal["Open", "Completed", "Closed", "Cancelled"] + subject: DF.SmallText + sunday: DF.Check + sync_with_google_calendar: DF.Check + thursday: DF.Check + tuesday: DF.Check + wednesday: DF.Check + # end: auto-generated types def validate(self): if not self.starts_on: self.starts_on = now_datetime() diff --git a/frappe/desk/doctype/event_participants/event_participants.py b/frappe/desk/doctype/event_participants/event_participants.py index 869ae4092b..8bd00f1f17 100644 --- a/frappe/desk/doctype/event_participants/event_participants.py +++ b/frappe/desk/doctype/event_participants/event_participants.py @@ -4,4 +4,19 @@ from frappe.model.document import Document class EventParticipants(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reference_docname: DF.DynamicLink + reference_doctype: DF.Link + # end: auto-generated types pass diff --git a/frappe/desk/doctype/form_tour/form_tour.py b/frappe/desk/doctype/form_tour/form_tour.py index bdfdcf7c79..c492871466 100644 --- a/frappe/desk/doctype/form_tour/form_tour.py +++ b/frappe/desk/doctype/form_tour/form_tour.py @@ -10,6 +10,36 @@ from frappe.modules.export_file import export_to_files class FormTour(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.form_tour_step.form_tour_step import FormTourStep + from frappe.types import DF + + dashboard_name: DF.Link | None + first_document: DF.Check + include_name_field: DF.Check + is_standard: DF.Check + list_name: DF.Literal[ + "List", "Report", "Dashboard", "Kanban", "Gantt", "Calendar", "File", "Image", "Inbox", "Map" + ] + module: DF.Link | None + new_document_form: DF.Check + page_name: DF.Link | None + page_route: DF.SmallText | None + reference_doctype: DF.Link | None + report_name: DF.Link | None + save_on_complete: DF.Check + steps: DF.Table[FormTourStep] + title: DF.Data + track_steps: DF.Check + ui_tour: DF.Check + view_name: DF.Literal["Workspaces", "List", "Form", "Tree", "Page"] + workspace_name: DF.Link | None + # end: auto-generated types def before_save(self): if self.is_standard and not self.module: if self.workspace_name: diff --git a/frappe/desk/doctype/form_tour_step/form_tour_step.py b/frappe/desk/doctype/form_tour_step/form_tour_step.py index 9d82ae8527..47f9f96025 100644 --- a/frappe/desk/doctype/form_tour_step/form_tour_step.py +++ b/frappe/desk/doctype/form_tour_step/form_tour_step.py @@ -6,4 +6,52 @@ from frappe.model.document import Document class FormTourStep(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + child_doctype: DF.Data | None + description: DF.HTMLEditor + element_selector: DF.Data | None + fieldname: DF.Literal + fieldtype: DF.Data | None + has_next_condition: DF.Check + hide_buttons: DF.Check + is_table_field: DF.Check + label: DF.Data | None + modal_trigger: DF.Check + next_form_tour: DF.Link | None + next_on_click: DF.Check + next_step_condition: DF.Code | None + offset_x: DF.Int + offset_y: DF.Int + ondemand_description: DF.HTMLEditor | None + parent: DF.Data + parent_element_selector: DF.Data | None + parent_fieldname: DF.Literal + parentfield: DF.Data + parenttype: DF.Data + popover_element: DF.Check + position: DF.Literal[ + "Left", + "Left Center", + "Left Bottom", + "Top", + "Top Center", + "Top Right", + "Right", + "Right Center", + "Right Bottom", + "Bottom", + "Bottom Center", + "Bottom Right", + "Mid Center", + ] + title: DF.Data + ui_tour: DF.Check + # end: auto-generated types pass diff --git a/frappe/desk/doctype/global_search_doctype/global_search_doctype.py b/frappe/desk/doctype/global_search_doctype/global_search_doctype.py index 48fdb3d4d1..10ca85f74e 100644 --- a/frappe/desk/doctype/global_search_doctype/global_search_doctype.py +++ b/frappe/desk/doctype/global_search_doctype/global_search_doctype.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class GlobalSearchDocType(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_type: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/desk/doctype/global_search_settings/global_search_settings.py b/frappe/desk/doctype/global_search_settings/global_search_settings.py index f0bf985550..879cde2910 100644 --- a/frappe/desk/doctype/global_search_settings/global_search_settings.py +++ b/frappe/desk/doctype/global_search_settings/global_search_settings.py @@ -7,6 +7,17 @@ from frappe.model.document import Document class GlobalSearchSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.global_search_doctype.global_search_doctype import GlobalSearchDocType + from frappe.types import DF + + allowed_in_global_search: DF.Table[GlobalSearchDocType] + # end: auto-generated types def validate(self): dts, core_dts, repeated_dts = [], [], [] diff --git a/frappe/desk/doctype/kanban_board/kanban_board.py b/frappe/desk/doctype/kanban_board/kanban_board.py index 508407f76a..4ab9e66f9d 100644 --- a/frappe/desk/doctype/kanban_board/kanban_board.py +++ b/frappe/desk/doctype/kanban_board/kanban_board.py @@ -9,6 +9,24 @@ from frappe.model.document import Document class KanbanBoard(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.kanban_board_column.kanban_board_column import KanbanBoardColumn + from frappe.types import DF + + columns: DF.Table[KanbanBoardColumn] + field_name: DF.Literal + fields: DF.Code | None + filters: DF.Code | None + kanban_board_name: DF.Data + private: DF.Check + reference_doctype: DF.Link + show_labels: DF.Check + # end: auto-generated types def validate(self): self.validate_column_name() diff --git a/frappe/desk/doctype/kanban_board_column/kanban_board_column.py b/frappe/desk/doctype/kanban_board_column/kanban_board_column.py index e57d92857e..73e781965f 100644 --- a/frappe/desk/doctype/kanban_board_column/kanban_board_column.py +++ b/frappe/desk/doctype/kanban_board_column/kanban_board_column.py @@ -5,4 +5,32 @@ from frappe.model.document import Document class KanbanBoardColumn(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + column_name: DF.Data | None + indicator: DF.Literal[ + "Blue", + "Cyan", + "Gray", + "Green", + "Light Blue", + "Orange", + "Pink", + "Purple", + "Red", + "Red", + "Yellow", + ] + order: DF.Code | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + status: DF.Literal["Active", "Archived"] + # end: auto-generated types pass diff --git a/frappe/desk/doctype/list_filter/list_filter.py b/frappe/desk/doctype/list_filter/list_filter.py index e4c59ee9e4..5d2aad5ba0 100644 --- a/frappe/desk/doctype/list_filter/list_filter.py +++ b/frappe/desk/doctype/list_filter/list_filter.py @@ -5,4 +5,17 @@ from frappe.model.document import Document class ListFilter(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + filter_name: DF.Data | None + filters: DF.LongText | None + for_user: DF.Link | None + reference_doctype: DF.Link | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/list_view_settings/list_view_settings.py b/frappe/desk/doctype/list_view_settings/list_view_settings.py index e3b6a60a42..4c1bee8d20 100644 --- a/frappe/desk/doctype/list_view_settings/list_view_settings.py +++ b/frappe/desk/doctype/list_view_settings/list_view_settings.py @@ -6,6 +6,21 @@ from frappe.model.document import Document class ListViewSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + disable_auto_refresh: DF.Check + disable_comment_count: DF.Check + disable_count: DF.Check + disable_sidebar_stats: DF.Check + fields: DF.Code | None + total_fields: DF.Literal["", "4", "5", "6", "7", "8", "9", "10"] + # end: auto-generated types pass diff --git a/frappe/desk/doctype/module_onboarding/module_onboarding.py b/frappe/desk/doctype/module_onboarding/module_onboarding.py index 94805d05b6..adb23074fb 100644 --- a/frappe/desk/doctype/module_onboarding/module_onboarding.py +++ b/frappe/desk/doctype/module_onboarding/module_onboarding.py @@ -8,6 +8,25 @@ from frappe.modules.export_file import export_to_files class ModuleOnboarding(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.onboarding_permission.onboarding_permission import OnboardingPermission + from frappe.desk.doctype.onboarding_step_map.onboarding_step_map import OnboardingStepMap + from frappe.types import DF + + allow_roles: DF.TableMultiSelect[OnboardingPermission] + documentation_url: DF.Data + is_complete: DF.Check + module: DF.Link + steps: DF.Table[OnboardingStepMap] + subtitle: DF.Data + success_message: DF.Data + title: DF.Data + # end: auto-generated types def on_update(self): if frappe.conf.developer_mode: export_to_files(record_list=[["Module Onboarding", self.name]], record_module=self.module) diff --git a/frappe/desk/doctype/note/note.py b/frappe/desk/doctype/note/note.py index 6aba6391cb..ede8ecbc5d 100644 --- a/frappe/desk/doctype/note/note.py +++ b/frappe/desk/doctype/note/note.py @@ -6,6 +6,23 @@ from frappe.model.document import Document class Note(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.note_seen_by.note_seen_by import NoteSeenBy + from frappe.types import DF + + content: DF.TextEditor | None + expire_notification_on: DF.Date | None + notify_on_every_login: DF.Check + notify_on_login: DF.Check + public: DF.Check + seen_by: DF.Table[NoteSeenBy] + title: DF.Data + # end: auto-generated types def validate(self): if self.notify_on_login and not self.expire_notification_on: # expire this notification in a week (default) diff --git a/frappe/desk/doctype/note_seen_by/note_seen_by.py b/frappe/desk/doctype/note_seen_by/note_seen_by.py index 5acdca222e..151ac2e1ff 100644 --- a/frappe/desk/doctype/note_seen_by/note_seen_by.py +++ b/frappe/desk/doctype/note_seen_by/note_seen_by.py @@ -5,4 +5,17 @@ from frappe.model.document import Document class NoteSeenBy(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + user: DF.Link | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/notification_log/notification_log.py b/frappe/desk/doctype/notification_log/notification_log.py index 4d82932555..5485f3939a 100644 --- a/frappe/desk/doctype/notification_log/notification_log.py +++ b/frappe/desk/doctype/notification_log/notification_log.py @@ -11,6 +11,24 @@ from frappe.model.document import Document class NotificationLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + attached_file: DF.Code | None + document_name: DF.Data | None + document_type: DF.Link | None + email_content: DF.TextEditor | None + for_user: DF.Link | None + from_user: DF.Link | None + read: DF.Check + subject: DF.Text | None + type: DF.Literal["Mention", "Energy Point", "Assignment", "Share", "Alert"] + # end: auto-generated types def after_insert(self): frappe.publish_realtime("notification", after_commit=True, user=self.for_user) set_notifications_as_unseen(self.for_user) diff --git a/frappe/desk/doctype/notification_settings/notification_settings.py b/frappe/desk/doctype/notification_settings/notification_settings.py index cd85c7d06d..bb5d002ed2 100644 --- a/frappe/desk/doctype/notification_settings/notification_settings.py +++ b/frappe/desk/doctype/notification_settings/notification_settings.py @@ -6,6 +6,29 @@ from frappe.model.document import Document class NotificationSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.desk.doctype.notification_subscribed_document.notification_subscribed_document import ( + NotificationSubscribedDocument, + ) + from frappe.types import DF + + enable_email_assignment: DF.Check + enable_email_energy_point: DF.Check + enable_email_event_reminders: DF.Check + enable_email_mention: DF.Check + enable_email_notifications: DF.Check + enable_email_share: DF.Check + enabled: DF.Check + energy_points_system_notifications: DF.Check + seen: DF.Check + subscribed_documents: DF.TableMultiSelect[NotificationSubscribedDocument] | None + user: DF.Link | None + # end: auto-generated types def on_update(self): from frappe.desk.notifications import clear_notification_config diff --git a/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py b/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py index 551ee6dc85..5bc6b95155 100644 --- a/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py +++ b/frappe/desk/doctype/notification_subscribed_document/notification_subscribed_document.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class NotificationSubscribedDocument(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/desk/doctype/number_card/number_card.py b/frappe/desk/doctype/number_card/number_card.py index a8e4841953..a3af909c68 100644 --- a/frappe/desk/doctype/number_card/number_card.py +++ b/frappe/desk/doctype/number_card/number_card.py @@ -14,6 +14,34 @@ from frappe.utils import cint class NumberCard(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + aggregate_function_based_on: DF.Literal + color: DF.Color | None + document_type: DF.Link | None + dynamic_filters_json: DF.Code | None + filters_config: DF.Code | None + filters_json: DF.Code | None + function: DF.Literal["Count", "Sum", "Average", "Minimum", "Maximum"] + is_public: DF.Check + is_standard: DF.Check + label: DF.Data + method: DF.Data | None + module: DF.Link | None + parent_document_type: DF.Link | None + report_field: DF.Literal + report_function: DF.Literal["Sum", "Average", "Minimum", "Maximum"] + report_name: DF.Link | None + show_percentage_stats: DF.Check + stats_time_interval: DF.Literal["Daily", "Weekly", "Monthly", "Yearly"] + type: DF.Literal["Document Type", "Report", "Custom"] + # end: auto-generated types def autoname(self): if not self.name: self.name = self.label diff --git a/frappe/desk/doctype/number_card_link/number_card_link.py b/frappe/desk/doctype/number_card_link/number_card_link.py index 16cc7ba4e3..8155a82085 100644 --- a/frappe/desk/doctype/number_card_link/number_card_link.py +++ b/frappe/desk/doctype/number_card_link/number_card_link.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class NumberCardLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + card: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/desk/doctype/onboarding_permission/onboarding_permission.py b/frappe/desk/doctype/onboarding_permission/onboarding_permission.py index d7db13762a..47c6f00647 100644 --- a/frappe/desk/doctype/onboarding_permission/onboarding_permission.py +++ b/frappe/desk/doctype/onboarding_permission/onboarding_permission.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class OnboardingPermission(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + role: DF.Link + # end: auto-generated types pass diff --git a/frappe/desk/doctype/onboarding_step/onboarding_step.py b/frappe/desk/doctype/onboarding_step/onboarding_step.py index b6807b62bd..e21e23ab95 100644 --- a/frappe/desk/doctype/onboarding_step/onboarding_step.py +++ b/frappe/desk/doctype/onboarding_step/onboarding_step.py @@ -9,6 +9,40 @@ from frappe.model.document import Document class OnboardingStep(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action: DF.Literal[ + "Create Entry", "Update Settings", "Show Form Tour", "View Report", "Go to Page", "Watch Video" + ] + action_label: DF.Data | None + callback_message: DF.SmallText | None + callback_title: DF.Data | None + description: DF.MarkdownEditor | None + field: DF.Literal + form_tour: DF.Link | None + intro_video_url: DF.Data | None + is_complete: DF.Check + is_single: DF.Check + is_skipped: DF.Check + path: DF.Data | None + reference_document: DF.Link | None + reference_report: DF.Link | None + report_description: DF.Data | None + report_reference_doctype: DF.Data | None + report_type: DF.Data | None + show_form_tour: DF.Check + show_full_form: DF.Check + title: DF.Data + validate_action: DF.Check + value_to_validate: DF.Data | None + video_url: DF.Data | None + # end: auto-generated types def before_export(self, doc): doc.is_complete = 0 doc.is_skipped = 0 diff --git a/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py b/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py index 8844316e68..0ee27bd634 100644 --- a/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py +++ b/frappe/desk/doctype/onboarding_step_map/onboarding_step_map.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class OnboardingStepMap(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + step: DF.Link + # end: auto-generated types pass diff --git a/frappe/desk/doctype/route_history/route_history.py b/frappe/desk/doctype/route_history/route_history.py index a576ac73f5..9aba975c3a 100644 --- a/frappe/desk/doctype/route_history/route_history.py +++ b/frappe/desk/doctype/route_history/route_history.py @@ -7,6 +7,17 @@ from frappe.model.document import Document class RouteHistory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + 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 diff --git a/frappe/desk/doctype/system_console/system_console.py b/frappe/desk/doctype/system_console/system_console.py index b79fd515b8..76b67e32df 100644 --- a/frappe/desk/doctype/system_console/system_console.py +++ b/frappe/desk/doctype/system_console/system_console.py @@ -9,6 +9,20 @@ from frappe.utils.safe_exec import read_sql, safe_exec class SystemConsole(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + commit: DF.Check + console: DF.Code | None + output: DF.Code | None + show_processlist: DF.Check + type: DF.Literal["Python", "SQL"] + # end: auto-generated types def run(self): frappe.only_for("System Manager") try: diff --git a/frappe/desk/doctype/tag/tag.py b/frappe/desk/doctype/tag/tag.py index c5fe6407b7..b1d45ca8fc 100644 --- a/frappe/desk/doctype/tag/tag.py +++ b/frappe/desk/doctype/tag/tag.py @@ -8,6 +8,16 @@ from frappe.utils import unique class Tag(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/tag_link/tag_link.py b/frappe/desk/doctype/tag_link/tag_link.py index a67e6a62d3..18639b4051 100644 --- a/frappe/desk/doctype/tag_link/tag_link.py +++ b/frappe/desk/doctype/tag_link/tag_link.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class TagLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_name: DF.DynamicLink | None + document_type: DF.Link | None + tag: DF.Link | None + title: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/todo/todo.py b/frappe/desk/doctype/todo/todo.py index 46a826688a..08fc61c727 100644 --- a/frappe/desk/doctype/todo/todo.py +++ b/frappe/desk/doctype/todo/todo.py @@ -11,6 +11,28 @@ exclude_from_linked_with = True class ToDo(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allocated_to: DF.Link | None + assigned_by: DF.Link | None + assigned_by_full_name: DF.ReadOnly | None + assignment_rule: DF.Link | None + color: DF.Color | None + date: DF.Date | None + description: DF.TextEditor + priority: DF.Literal["High", "Medium", "Low"] + reference_name: DF.DynamicLink | None + reference_type: DF.Link | None + role: DF.Link | None + sender: DF.Data | None + status: DF.Literal["Open", "Closed", "Cancelled"] + # end: auto-generated types DocType = "ToDo" def validate(self): diff --git a/frappe/desk/doctype/workspace/workspace.py b/frappe/desk/doctype/workspace/workspace.py index 7b5970a7d6..9bcca88590 100644 --- a/frappe/desk/doctype/workspace/workspace.py +++ b/frappe/desk/doctype/workspace/workspace.py @@ -14,6 +14,42 @@ from frappe.modules.export_file import delete_folder, export_to_files class Workspace(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.core.doctype.has_role.has_role import HasRole + from frappe.desk.doctype.workspace_chart.workspace_chart import WorkspaceChart + from frappe.desk.doctype.workspace_custom_block.workspace_custom_block import ( + WorkspaceCustomBlock, + ) + from frappe.desk.doctype.workspace_link.workspace_link import WorkspaceLink + from frappe.desk.doctype.workspace_number_card.workspace_number_card import WorkspaceNumberCard + from frappe.desk.doctype.workspace_quick_list.workspace_quick_list import WorkspaceQuickList + from frappe.desk.doctype.workspace_shortcut.workspace_shortcut import WorkspaceShortcut + from frappe.types import DF + + charts: DF.Table[WorkspaceChart] + content: DF.LongText | None + custom_blocks: DF.Table[WorkspaceCustomBlock] + for_user: DF.Data | None + hide_custom: DF.Check + is_hidden: DF.Check + label: DF.Data + links: DF.Table[WorkspaceLink] + module: DF.Link | None + number_cards: DF.Table[WorkspaceNumberCard] + parent_page: DF.Data | None + public: DF.Check + quick_lists: DF.Table[WorkspaceQuickList] + restrict_to_domain: DF.Link | None + roles: DF.Table[HasRole] + sequence_id: DF.Float + shortcuts: DF.Table[WorkspaceShortcut] + title: DF.Data + # end: auto-generated types def validate(self): if self.public and not is_workspace_manager() and not disable_saving_as_public(): frappe.throw(_("You need to be Workspace Manager to edit this document")) diff --git a/frappe/desk/doctype/workspace_chart/workspace_chart.py b/frappe/desk/doctype/workspace_chart/workspace_chart.py index 45f4229401..7f9d8eff74 100644 --- a/frappe/desk/doctype/workspace_chart/workspace_chart.py +++ b/frappe/desk/doctype/workspace_chart/workspace_chart.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class WorkspaceChart(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + chart_name: DF.Link + label: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/desk/doctype/workspace_custom_block/workspace_custom_block.py b/frappe/desk/doctype/workspace_custom_block/workspace_custom_block.py index 745844f5c1..933689cc2f 100644 --- a/frappe/desk/doctype/workspace_custom_block/workspace_custom_block.py +++ b/frappe/desk/doctype/workspace_custom_block/workspace_custom_block.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class WorkspaceCustomBlock(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + custom_block_name: DF.Link | None + label: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/desk/doctype/workspace_link/workspace_link.py b/frappe/desk/doctype/workspace_link/workspace_link.py index 5756846f38..e7d6ccf68a 100644 --- a/frappe/desk/doctype/workspace_link/workspace_link.py +++ b/frappe/desk/doctype/workspace_link/workspace_link.py @@ -6,4 +6,27 @@ from frappe.model.document import Document class WorkspaceLink(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + dependencies: DF.Data | None + hidden: DF.Check + icon: DF.Data | None + is_query_report: DF.Check + label: DF.Data + link_count: DF.Int + link_to: DF.DynamicLink | None + link_type: DF.Literal["DocType", "Page", "Report"] + onboard: DF.Check + only_for: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + type: DF.Literal["Link", "Card Break"] + # end: auto-generated types pass diff --git a/frappe/desk/doctype/workspace_number_card/workspace_number_card.py b/frappe/desk/doctype/workspace_number_card/workspace_number_card.py index e972f3f525..0959d8a958 100644 --- a/frappe/desk/doctype/workspace_number_card/workspace_number_card.py +++ b/frappe/desk/doctype/workspace_number_card/workspace_number_card.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class WorkspaceNumberCard(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + label: DF.Data | None + number_card_name: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/desk/doctype/workspace_quick_list/workspace_quick_list.py b/frappe/desk/doctype/workspace_quick_list/workspace_quick_list.py index 9f26424115..35bfb171e1 100644 --- a/frappe/desk/doctype/workspace_quick_list/workspace_quick_list.py +++ b/frappe/desk/doctype/workspace_quick_list/workspace_quick_list.py @@ -6,4 +6,19 @@ from frappe.model.document import Document class WorkspaceQuickList(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_type: DF.Link + label: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + quick_list_filter: DF.Code | None + # end: auto-generated types pass diff --git a/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py b/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py index 49ba37854c..5b7cda15bf 100644 --- a/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py +++ b/frappe/desk/doctype/workspace_shortcut/workspace_shortcut.py @@ -6,4 +6,26 @@ from frappe.model.document import Document class WorkspaceShortcut(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + color: DF.Color | None + doc_view: DF.Literal["", "List", "Report Builder", "Dashboard", "Tree", "New", "Calendar"] + format: DF.Data | None + icon: DF.Data | None + label: DF.Data + link_to: DF.DynamicLink | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + restrict_to_domain: DF.Link | None + stats_filter: DF.Code | None + type: DF.Literal["DocType", "Report", "Page", "Dashboard", "URL"] + url: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.py b/frappe/email/doctype/auto_email_report/auto_email_report.py index 24c69dab7c..0a11de21f3 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.py +++ b/frappe/email/doctype/auto_email_report/auto_email_report.py @@ -27,6 +27,38 @@ from frappe.utils.xlsxutils import make_xlsx class AutoEmailReport(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + data_modified_till: DF.Int + day_of_week: DF.Literal[ + "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" + ] + description: DF.TextEditor | None + dynamic_date_period: DF.Literal[ + "", "Daily", "Weekly", "Monthly", "Quarterly", "Half Yearly", "Yearly" + ] + email_to: DF.SmallText + enabled: DF.Check + filter_meta: DF.Text | None + filters: DF.Text | None + format: DF.Literal["HTML", "XLSX", "CSV"] + frequency: DF.Literal["Daily", "Weekdays", "Weekly", "Monthly"] + from_date_field: DF.Literal + no_of_rows: DF.Int + reference_report: DF.Data | None + report: DF.Link + report_type: DF.ReadOnly | None + send_if_data: DF.Check + sender: DF.Link | None + to_date_field: DF.Literal + user: DF.Link + # end: auto-generated types def autoname(self): self.name = _(self.report) if frappe.db.exists("Auto Email Report", self.name): diff --git a/frappe/email/doctype/document_follow/document_follow.py b/frappe/email/doctype/document_follow/document_follow.py index 6f9d63f3be..4a2933276e 100644 --- a/frappe/email/doctype/document_follow/document_follow.py +++ b/frappe/email/doctype/document_follow/document_follow.py @@ -5,4 +5,16 @@ from frappe.model.document import Document class DocumentFollow(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + ref_docname: DF.DynamicLink + ref_doctype: DF.Link + user: DF.Link + # end: auto-generated types pass diff --git a/frappe/email/doctype/email_account/email_account.py b/frappe/email/doctype/email_account/email_account.py index 3f6051ffc8..75463ebc41 100755 --- a/frappe/email/doctype/email_account/email_account.py +++ b/frappe/email/doctype/email_account/email_account.py @@ -50,6 +50,68 @@ def cache_email_account(cache_name): class EmailAccount(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.email.doctype.imap_folder.imap_folder import IMAPFolder + from frappe.types import DF + + add_signature: DF.Check + always_use_account_email_id_as_sender: DF.Check + always_use_account_name_as_sender_name: DF.Check + append_emails_to_sent_folder: DF.Check + append_to: DF.Link | None + ascii_encode_password: DF.Check + attachment_limit: DF.Int + auth_method: DF.Literal["Basic", "OAuth"] + auto_reply_message: DF.TextEditor | None + awaiting_password: DF.Check + brand_logo: DF.AttachImage | None + connected_app: DF.Link | None + connected_user: DF.Link | None + create_contact: DF.Check + default_incoming: DF.Check + default_outgoing: DF.Check + domain: DF.Link | None + email_account_name: DF.Data | None + email_id: DF.Data + email_server: DF.Data | None + email_sync_option: DF.Literal["ALL", "UNSEEN"] + enable_auto_reply: DF.Check + enable_automatic_linking: DF.Check + enable_incoming: DF.Check + enable_outgoing: DF.Check + footer: DF.TextEditor | None + imap_folder: DF.Table[IMAPFolder] + incoming_port: DF.Data | None + initial_sync_count: DF.Literal["100", "250", "500"] + login_id: DF.Data | None + login_id_is_different: DF.Check + no_failed: DF.Int + no_smtp_authentication: DF.Check + notify_if_unreplied: DF.Check + password: DF.Password | None + send_notification_to: DF.SmallText | None + send_unsubscribe_message: DF.Check + service: DF.Literal[ + "", "GMail", "Sendgrid", "SparkPost", "Yahoo Mail", "Outlook.com", "Yandex.Mail" + ] + signature: DF.TextEditor | None + smtp_port: DF.Data | None + smtp_server: DF.Data | None + track_email_status: DF.Check + uidnext: DF.Int + uidvalidity: DF.Data | None + unreplied_for_mins: DF.Int + use_imap: DF.Check + use_ssl: DF.Check + use_ssl_for_outgoing: DF.Check + use_starttls: DF.Check + use_tls: DF.Check + # end: auto-generated types DOCTYPE = "Email Account" def autoname(self): diff --git a/frappe/email/doctype/email_domain/email_domain.py b/frappe/email/doctype/email_domain/email_domain.py index 528407916a..69a8701dbe 100644 --- a/frappe/email/doctype/email_domain/email_domain.py +++ b/frappe/email/doctype/email_domain/email_domain.py @@ -52,6 +52,27 @@ def handle_error(event): class EmailDomain(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + append_emails_to_sent_folder: DF.Check + attachment_limit: DF.Int + domain_name: DF.Data + email_server: DF.Data + incoming_port: DF.Data | None + smtp_port: DF.Data | None + smtp_server: DF.Data + use_imap: DF.Check + use_ssl: DF.Check + use_ssl_for_outgoing: DF.Check + use_starttls: DF.Check + use_tls: DF.Check + # end: auto-generated types def validate(self): """Validate POP3/IMAP and SMTP connections.""" diff --git a/frappe/email/doctype/email_flag_queue/email_flag_queue.py b/frappe/email/doctype/email_flag_queue/email_flag_queue.py index cf28ce0628..1f20aece88 100644 --- a/frappe/email/doctype/email_flag_queue/email_flag_queue.py +++ b/frappe/email/doctype/email_flag_queue/email_flag_queue.py @@ -5,4 +5,18 @@ from frappe.model.document import Document class EmailFlagQueue(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action: DF.Literal["Read", "Unread"] + communication: DF.Data | None + email_account: DF.Data | None + is_completed: DF.Check + uid: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/email/doctype/email_group/email_group.py b/frappe/email/doctype/email_group/email_group.py index cbe47eaa81..7afd349804 100755 --- a/frappe/email/doctype/email_group/email_group.py +++ b/frappe/email/doctype/email_group/email_group.py @@ -8,6 +8,19 @@ from frappe.utils import parse_addr, validate_email_address class EmailGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + confirmation_email_template: DF.Link | None + title: DF.Data + total_subscribers: DF.Int + welcome_email_template: DF.Link | None + # end: auto-generated types def onload(self): singles = [d.name for d in frappe.get_all("DocType", "name", {"issingle": 1})] self.get("__onload").import_types = [ diff --git a/frappe/email/doctype/email_group_member/email_group_member.py b/frappe/email/doctype/email_group_member/email_group_member.py index c0995d393b..e8694d2284 100644 --- a/frappe/email/doctype/email_group_member/email_group_member.py +++ b/frappe/email/doctype/email_group_member/email_group_member.py @@ -6,6 +6,18 @@ from frappe.model.document import Document class EmailGroupMember(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email: DF.Data + email_group: DF.Link + unsubscribed: DF.Check + # end: auto-generated types def after_delete(self): email_group = frappe.get_doc("Email Group", self.email_group) email_group.update_total_subscribers() diff --git a/frappe/email/doctype/email_queue/email_queue.py b/frappe/email/doctype/email_queue/email_queue.py index 895d8fbe01..2dccd65b4e 100644 --- a/frappe/email/doctype/email_queue/email_queue.py +++ b/frappe/email/doctype/email_queue/email_queue.py @@ -34,6 +34,35 @@ from frappe.utils.verified_command import get_signed_params class EmailQueue(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.email.doctype.email_queue_recipient.email_queue_recipient import EmailQueueRecipient + from frappe.types import DF + + add_unsubscribe_link: DF.Check + attachments: DF.Code | None + communication: DF.Link | None + email_account: DF.Link | None + error: DF.Code | None + expose_recipients: DF.Data | None + message: DF.Code | None + message_id: DF.SmallText | None + priority: DF.Int + recipients: DF.Table[EmailQueueRecipient] + reference_doctype: DF.Link | None + reference_name: DF.Data | None + retry: DF.Int + send_after: DF.Datetime | None + sender: DF.Data | None + show_as_cc: DF.SmallText | None + status: DF.Literal["Not Sent", "Sending", "Sent", "Partially Sent", "Error"] + unsubscribe_method: DF.Data | None + unsubscribe_param: DF.Data | None + # end: auto-generated types DOCTYPE = "Email Queue" def set_recipients(self, recipients): diff --git a/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py b/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py index 705075a862..43b85c9f22 100644 --- a/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py +++ b/frappe/email/doctype/email_queue_recipient/email_queue_recipient.py @@ -6,6 +6,21 @@ from frappe.model.document import Document class EmailQueueRecipient(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + error: DF.Code | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + recipient: DF.Data | None + status: DF.Literal["", "Not Sent", "Sent"] + # end: auto-generated types DOCTYPE = "Email Queue Recipient" def is_mail_to_be_sent(self): diff --git a/frappe/email/doctype/email_rule/email_rule.py b/frappe/email/doctype/email_rule/email_rule.py index ab04632280..8eab691b95 100644 --- a/frappe/email/doctype/email_rule/email_rule.py +++ b/frappe/email/doctype/email_rule/email_rule.py @@ -5,4 +5,15 @@ from frappe.model.document import Document class EmailRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email_id: DF.Data | None + is_spam: DF.Check + # end: auto-generated types pass diff --git a/frappe/email/doctype/email_template/email_template.py b/frappe/email/doctype/email_template/email_template.py index 1ef8ec062b..214879dac4 100644 --- a/frappe/email/doctype/email_template/email_template.py +++ b/frappe/email/doctype/email_template/email_template.py @@ -9,6 +9,19 @@ from frappe.utils.jinja import validate_template class EmailTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + response: DF.TextEditor | None + response_html: DF.Code | None + subject: DF.Data + use_html: DF.Check + # end: auto-generated types @property def response_(self): return self.response_html if self.use_html else self.response diff --git a/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py b/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py index c9ab17d61d..5cfc4a38d1 100644 --- a/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py +++ b/frappe/email/doctype/email_unsubscribe/email_unsubscribe.py @@ -7,6 +7,19 @@ from frappe.model.document import Document class EmailUnsubscribe(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email: DF.Data + global_unsubscribe: DF.Check + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + # end: auto-generated types def validate(self): if not self.global_unsubscribe and not (self.reference_doctype and self.reference_name): frappe.throw(_("Reference DocType and Reference Name are required"), frappe.MandatoryError) diff --git a/frappe/email/doctype/imap_folder/imap_folder.py b/frappe/email/doctype/imap_folder/imap_folder.py index 222d67189c..efbe2073ea 100644 --- a/frappe/email/doctype/imap_folder/imap_folder.py +++ b/frappe/email/doctype/imap_folder/imap_folder.py @@ -6,4 +6,20 @@ from frappe.model.document import Document class IMAPFolder(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + append_to: DF.Link | None + folder_name: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + uidnext: DF.Data | None + uidvalidity: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/email/doctype/newsletter/newsletter.py b/frappe/email/doctype/newsletter/newsletter.py index 63049fe83d..554ea79b08 100644 --- a/frappe/email/doctype/newsletter/newsletter.py +++ b/frappe/email/doctype/newsletter/newsletter.py @@ -15,6 +15,41 @@ from .exceptions import NewsletterAlreadySentError, NewsletterNotSavedError, NoR class Newsletter(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.email.doctype.newsletter_attachment.newsletter_attachment import NewsletterAttachment + from frappe.email.doctype.newsletter_email_group.newsletter_email_group import ( + NewsletterEmailGroup, + ) + from frappe.types import DF + + attachments: DF.Table[NewsletterAttachment] + campaign: DF.Link | None + content_type: DF.Literal["Rich Text", "Markdown", "HTML"] + email_group: DF.Table[NewsletterEmailGroup] + email_sent: DF.Check + email_sent_at: DF.Datetime | None + message: DF.TextEditor | None + message_html: DF.HTMLEditor | None + message_md: DF.MarkdownEditor | None + published: DF.Check + route: DF.Data | None + schedule_send: DF.Datetime | None + schedule_sending: DF.Check + scheduled_to_send: DF.Int + send_from: DF.Data | None + send_unsubscribe_link: DF.Check + send_webview_link: DF.Check + sender_email: DF.Data + sender_name: DF.Data | None + subject: DF.SmallText + total_recipients: DF.Int + total_views: DF.Int + # end: auto-generated types def validate(self): self.route = f"newsletters/{self.name}" self.validate_sender_address() diff --git a/frappe/email/doctype/newsletter_attachment/newsletter_attachment.py b/frappe/email/doctype/newsletter_attachment/newsletter_attachment.py index 01d194fb8d..dcb3753124 100644 --- a/frappe/email/doctype/newsletter_attachment/newsletter_attachment.py +++ b/frappe/email/doctype/newsletter_attachment/newsletter_attachment.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class NewsletterAttachment(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + attachment: DF.Attach + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py b/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py index 41ada8a491..ed3398c2c2 100644 --- a/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py +++ b/frappe/email/doctype/newsletter_email_group/newsletter_email_group.py @@ -5,4 +5,18 @@ from frappe.model.document import Document class NewsletterEmailGroup(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email_group: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + total_subscribers: DF.ReadOnly | None + # end: auto-generated types pass diff --git a/frappe/email/doctype/notification/notification.py b/frappe/email/doctype/notification/notification.py index eb0868a91e..8c939a5e76 100644 --- a/frappe/email/doctype/notification/notification.py +++ b/frappe/email/doctype/notification/notification.py @@ -18,6 +18,52 @@ from frappe.utils.safe_exec import get_safe_globals class Notification(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.email.doctype.notification_recipient.notification_recipient import ( + NotificationRecipient, + ) + from frappe.types import DF + + attach_print: DF.Check + channel: DF.Literal["Email", "Slack", "System Notification", "SMS"] + condition: DF.Code | None + date_changed: DF.Literal + days_in_advance: DF.Int + document_type: DF.Link + enabled: DF.Check + event: DF.Literal[ + "", + "New", + "Save", + "Submit", + "Cancel", + "Days After", + "Days Before", + "Value Change", + "Method", + "Custom", + ] + is_standard: DF.Check + message: DF.Code | None + method: DF.Data | None + module: DF.Link | None + print_format: DF.Link | None + property_value: DF.Data | None + recipients: DF.Table[NotificationRecipient] + send_system_notification: DF.Check + send_to_all_assignees: DF.Check + sender: DF.Link | None + sender_email: DF.Data | None + set_property_after_alert: DF.Literal + slack_webhook_url: DF.Link | None + subject: DF.Data | None + value_changed: DF.Literal + # end: auto-generated types def onload(self): """load message""" if self.is_standard: diff --git a/frappe/email/doctype/notification_recipient/notification_recipient.py b/frappe/email/doctype/notification_recipient/notification_recipient.py index 75bb274599..1a1b397a80 100644 --- a/frappe/email/doctype/notification_recipient/notification_recipient.py +++ b/frappe/email/doctype/notification_recipient/notification_recipient.py @@ -5,4 +5,21 @@ from frappe.model.document import Document class NotificationRecipient(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + bcc: DF.Code | None + cc: DF.Code | None + condition: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + receiver_by_document_field: DF.Literal + receiver_by_role: DF.Link | None + # end: auto-generated types pass diff --git a/frappe/email/doctype/unhandled_email/unhandled_email.py b/frappe/email/doctype/unhandled_email/unhandled_email.py index 1c315e2423..5ac5f3e8a8 100644 --- a/frappe/email/doctype/unhandled_email/unhandled_email.py +++ b/frappe/email/doctype/unhandled_email/unhandled_email.py @@ -6,6 +6,20 @@ from frappe.model.document import Document class UnhandledEmail(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + email_account: DF.Link | None + message_id: DF.Code | None + raw: DF.Code | None + reason: DF.LongText | None + uid: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/geo/doctype/country/country.py b/frappe/geo/doctype/country/country.py index 8b1ec1364f..a2caad81c7 100644 --- a/frappe/geo/doctype/country/country.py +++ b/frappe/geo/doctype/country/country.py @@ -6,6 +6,20 @@ from frappe.model.document import Document, bulk_insert class Country(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + code: DF.Data | None + country_name: DF.Data + date_format: DF.Data | None + time_format: DF.Data | None + time_zones: DF.Text | None + # end: auto-generated types # NOTE: During installation country docs are bulk inserted. pass diff --git a/frappe/geo/doctype/currency/currency.py b/frappe/geo/doctype/currency/currency.py index 51317e8771..3c3e9e923f 100644 --- a/frappe/geo/doctype/currency/currency.py +++ b/frappe/geo/doctype/currency/currency.py @@ -8,6 +8,35 @@ DEFAULT_ENABLED_CURRENCIES = ("INR", "USD", "GBP", "EUR", "AED", "AUD", "JPY", " class Currency(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + currency_name: DF.Data + enabled: DF.Check + fraction: DF.Data | None + fraction_units: DF.Int + number_format: DF.Literal[ + "", + "#,###.##", + "#.###,##", + "# ###.##", + "# ###,##", + "#'###.##", + "#, ###.##", + "#,##,###.##", + "#,###.###", + "#.###", + "#,###", + ] + smallest_currency_fraction_value: DF.Currency + symbol: DF.Data | None + symbol_on_right: DF.Check + # end: auto-generated types # NOTE: During installation country docs are bulk inserted. def validate(self): frappe.clear_cache() diff --git a/frappe/integrations/doctype/connected_app/connected_app.py b/frappe/integrations/doctype/connected_app/connected_app.py index 536b63fe7b..d571b2ba00 100644 --- a/frappe/integrations/doctype/connected_app/connected_app.py +++ b/frappe/integrations/doctype/connected_app/connected_app.py @@ -18,6 +18,29 @@ os.environ["OAUTHLIB_RELAX_TOKEN_SCOPE"] = "1" class ConnectedApp(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.integrations.doctype.oauth_scope.oauth_scope import OAuthScope + from frappe.integrations.doctype.query_parameters.query_parameters import QueryParameters + from frappe.types import DF + + authorization_uri: DF.SmallText | None + client_id: DF.Data | None + client_secret: DF.Password | None + introspection_uri: DF.Data | None + openid_configuration: DF.Data | None + provider_name: DF.Data + query_parameters: DF.Table[QueryParameters] + redirect_uri: DF.Data | None + revocation_uri: DF.Data | None + scopes: DF.Table[OAuthScope] + token_uri: DF.Data | None + userinfo_uri: DF.Data | None + # end: auto-generated types """Connect to a remote oAuth Server. Retrieve and store user's access token in a Token Cache. """ diff --git a/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py b/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py index c213ba8340..21920e8235 100644 --- a/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py +++ b/frappe/integrations/doctype/dropbox_settings/dropbox_settings.py @@ -24,6 +24,26 @@ ignore_list = [".DS_Store"] class DropboxSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + app_access_key: DF.Data | None + app_secret_key: DF.Password | None + backup_frequency: DF.Literal["", "Daily", "Weekly"] + dropbox_access_token: DF.Password | None + dropbox_refresh_token: DF.Password | None + enabled: DF.Check + file_backup: DF.Check + limit_no_of_backups: DF.Check + no_of_backups: DF.Int + send_email_for_successful_backup: DF.Check + send_notifications_to: DF.Data + # end: auto-generated types def onload(self): if not self.app_access_key and frappe.conf.dropbox_access_key: self.set_onload("dropbox_setup_via_site_config", 1) diff --git a/frappe/integrations/doctype/google_calendar/google_calendar.py b/frappe/integrations/doctype/google_calendar/google_calendar.py index 2593a21e51..14a5cb5e7c 100644 --- a/frappe/integrations/doctype/google_calendar/google_calendar.py +++ b/frappe/integrations/doctype/google_calendar/google_calendar.py @@ -65,6 +65,24 @@ framework_days = { class GoogleCalendar(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + authorization_code: DF.Password | None + calendar_name: DF.Data + enable: DF.Check + google_calendar_id: DF.Data | None + next_sync_token: DF.Password | None + pull_from_google_calendar: DF.Check + push_to_google_calendar: DF.Check + refresh_token: DF.Password | None + user: DF.Link + # end: auto-generated types def validate(self): google_settings = frappe.get_single("Google Settings") if not google_settings.enable: diff --git a/frappe/integrations/doctype/google_contacts/google_contacts.py b/frappe/integrations/doctype/google_contacts/google_contacts.py index 7c845da330..4edaaf6a8d 100644 --- a/frappe/integrations/doctype/google_contacts/google_contacts.py +++ b/frappe/integrations/doctype/google_contacts/google_contacts.py @@ -13,6 +13,23 @@ from frappe.model.document import Document class GoogleContacts(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + authorization_code: DF.Password | None + email_id: DF.Data + enable: DF.Check + last_sync_on: DF.Datetime | None + next_sync_token: DF.Password | None + pull_from_google_contacts: DF.Check + push_to_google_contacts: DF.Check + refresh_token: DF.Password | None + # end: auto-generated types def validate(self): if not frappe.db.get_single_value("Google Settings", "enable"): frappe.throw(_("Enable Google API in Google Settings.")) diff --git a/frappe/integrations/doctype/google_drive/google_drive.py b/frappe/integrations/doctype/google_drive/google_drive.py index fbb970de46..aa85bac06d 100644 --- a/frappe/integrations/doctype/google_drive/google_drive.py +++ b/frappe/integrations/doctype/google_drive/google_drive.py @@ -22,6 +22,25 @@ from frappe.utils.backups import new_backup class GoogleDrive(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + authorization_code: DF.Data | None + backup_folder_id: DF.Data | None + backup_folder_name: DF.Data + email: DF.Data + enable: DF.Check + file_backup: DF.Check + frequency: DF.Literal["", "Daily", "Weekly"] + last_backup_on: DF.Datetime | None + refresh_token: DF.Data | None + send_email_for_successful_backup: DF.Check + # end: auto-generated types def validate(self): doc_before_save = self.get_doc_before_save() if doc_before_save and doc_before_save.backup_folder_name != self.backup_folder_name: diff --git a/frappe/integrations/doctype/google_settings/google_settings.py b/frappe/integrations/doctype/google_settings/google_settings.py index e464e0d090..a5b2a919ed 100644 --- a/frappe/integrations/doctype/google_settings/google_settings.py +++ b/frappe/integrations/doctype/google_settings/google_settings.py @@ -6,6 +6,21 @@ from frappe.model.document import Document class GoogleSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + api_key: DF.Data | None + app_id: DF.Data | None + client_id: DF.Data | None + client_secret: DF.Password | None + enable: DF.Check + google_drive_picker_enabled: DF.Check + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/integration_request/integration_request.py b/frappe/integrations/doctype/integration_request/integration_request.py index 7ca185bd70..2254b09c74 100644 --- a/frappe/integrations/doctype/integration_request/integration_request.py +++ b/frappe/integrations/doctype/integration_request/integration_request.py @@ -9,6 +9,27 @@ from frappe.model.document import Document class IntegrationRequest(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + data: DF.Code | None + error: DF.Code | None + integration_request_service: DF.Data | None + is_remote_request: DF.Check + output: DF.Code | None + reference_docname: DF.DynamicLink | None + reference_doctype: DF.Link | None + request_description: DF.Data | None + request_headers: DF.Code | None + request_id: DF.Data | None + status: DF.Literal["", "Queued", "Authorized", "Completed", "Cancelled", "Failed"] + url: DF.Data | None + # end: auto-generated types def autoname(self): if self.flags._name: self.name = self.flags._name diff --git a/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py b/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py index 853cfc96a1..f653d8da61 100644 --- a/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py +++ b/frappe/integrations/doctype/ldap_group_mapping/ldap_group_mapping.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class LDAPGroupMapping(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + erpnext_role: DF.Link + ldap_group: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/ldap_settings/ldap_settings.py b/frappe/integrations/doctype/ldap_settings/ldap_settings.py index 5b8ad1c901..84ea3cc8ab 100644 --- a/frappe/integrations/doctype/ldap_settings/ldap_settings.py +++ b/frappe/integrations/doctype/ldap_settings/ldap_settings.py @@ -25,6 +25,44 @@ if TYPE_CHECKING: class LDAPSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.integrations.doctype.ldap_group_mapping.ldap_group_mapping import LDAPGroupMapping + from frappe.types import DF + + base_dn: DF.Data + default_role: DF.Link | None + default_user_type: DF.Link + do_not_create_new_user: DF.Check + enabled: DF.Check + ldap_custom_group_search: DF.Data | None + ldap_directory_server: DF.Literal["", "Active Directory", "OpenLDAP", "Custom"] + ldap_email_field: DF.Data + ldap_first_name_field: DF.Data + ldap_group_field: DF.Data | None + ldap_group_member_attribute: DF.Data | None + ldap_group_objectclass: DF.Data | None + ldap_groups: DF.Table[LDAPGroupMapping] + ldap_last_name_field: DF.Data | None + ldap_middle_name_field: DF.Data | None + ldap_mobile_field: DF.Data | None + ldap_phone_field: DF.Data | None + ldap_search_path_group: DF.Data + ldap_search_path_user: DF.Data + ldap_search_string: DF.Data + ldap_server_url: DF.Data + ldap_username_field: DF.Data + local_ca_certs_file: DF.Data | None + local_private_key_file: DF.Data | None + local_server_certificate_file: DF.Data | None + password: DF.Password + require_trusted_certificate: DF.Literal["No", "Yes"] + ssl_tls_mode: DF.Literal["Off", "StartTLS"] + # end: auto-generated types def validate(self): self.default_user_type = self.default_user_type or "Website User" diff --git a/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py b/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py index 431d27bc04..cfc9009b0a 100644 --- a/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py +++ b/frappe/integrations/doctype/oauth_authorization_code/oauth_authorization_code.py @@ -6,4 +6,23 @@ from frappe.model.document import Document class OAuthAuthorizationCode(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + authorization_code: DF.Data | None + client: DF.Link | None + code_challenge: DF.Data | None + code_challenge_method: DF.Literal["", "s256", "plain"] + expiration_time: DF.Datetime | None + nonce: DF.Data | None + redirect_uri_bound_to_authorization_code: DF.Data | None + scopes: DF.Text | None + user: DF.Link | None + validity: DF.Literal["Valid", "Invalid"] + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py b/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py index 2a17035571..f393d2bd77 100644 --- a/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py +++ b/frappe/integrations/doctype/oauth_bearer_token/oauth_bearer_token.py @@ -6,6 +6,23 @@ from frappe.model.document import Document class OAuthBearerToken(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + access_token: DF.Data | None + client: DF.Link | None + expiration_time: DF.Datetime | None + expires_in: DF.Int + refresh_token: DF.Data | None + scopes: DF.Text | None + status: DF.Literal["Active", "Revoked"] + user: DF.Link | None + # end: auto-generated types def validate(self): if not self.expiration_time: self.expiration_time = frappe.utils.datetime.datetime.strptime( diff --git a/frappe/integrations/doctype/oauth_client/oauth_client.py b/frappe/integrations/doctype/oauth_client/oauth_client.py index ab40467751..d026822981 100644 --- a/frappe/integrations/doctype/oauth_client/oauth_client.py +++ b/frappe/integrations/doctype/oauth_client/oauth_client.py @@ -7,6 +7,25 @@ from frappe.model.document import Document class OAuthClient(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + app_name: DF.Data + client_id: DF.Data | None + client_secret: DF.Data | None + default_redirect_uri: DF.Data + grant_type: DF.Literal["Authorization Code", "Implicit"] + redirect_uris: DF.Text | None + response_type: DF.Literal["Code", "Token"] + scopes: DF.Text + skip_authorization: DF.Check + user: DF.Link | None + # end: auto-generated types def validate(self): self.client_id = self.name if not self.client_secret: diff --git a/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py b/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py index 5a918db587..0958786cbb 100644 --- a/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py +++ b/frappe/integrations/doctype/oauth_provider_settings/oauth_provider_settings.py @@ -7,6 +7,16 @@ from frappe.model.document import Document class OAuthProviderSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + skip_authorization: DF.Literal["Force", "Auto"] + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/oauth_scope/oauth_scope.py b/frappe/integrations/doctype/oauth_scope/oauth_scope.py index 1db49a3818..8ab50d01fe 100644 --- a/frappe/integrations/doctype/oauth_scope/oauth_scope.py +++ b/frappe/integrations/doctype/oauth_scope/oauth_scope.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class OAuthScope(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + scope: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/query_parameters/query_parameters.py b/frappe/integrations/doctype/query_parameters/query_parameters.py index b501c0c3e8..e69329176e 100644 --- a/frappe/integrations/doctype/query_parameters/query_parameters.py +++ b/frappe/integrations/doctype/query_parameters/query_parameters.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class QueryParameters(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + key: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + value: DF.Data + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py b/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py index 568ff71b00..1b583a2bd6 100755 --- a/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py +++ b/frappe/integrations/doctype/s3_backup_settings/s3_backup_settings.py @@ -21,6 +21,24 @@ from frappe.utils.background_jobs import enqueue class S3BackupSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + access_key_id: DF.Data + backup_files: DF.Check + bucket: DF.Data + enabled: DF.Check + endpoint_url: DF.Data | None + frequency: DF.Literal["Daily", "Weekly", "Monthly", "None"] + notify_email: DF.Data + secret_access_key: DF.Password + send_email_for_successful_backup: DF.Check + # end: auto-generated types def validate(self): if not self.enabled: return diff --git a/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py b/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py index d71d7075a6..ff5f8e9761 100644 --- a/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py +++ b/frappe/integrations/doctype/slack_webhook_url/slack_webhook_url.py @@ -20,6 +20,18 @@ error_messages = { class SlackWebhookURL(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + show_document_link: DF.Check + webhook_name: DF.Data + webhook_url: DF.Data + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/social_login_key/social_login_key.py b/frappe/integrations/doctype/social_login_key/social_login_key.py index 46a86a65c8..3994413d57 100644 --- a/frappe/integrations/doctype/social_login_key/social_login_key.py +++ b/frappe/integrations/doctype/social_login_key/social_login_key.py @@ -33,6 +33,32 @@ class ClientSecretNotSetError(frappe.ValidationError): class SocialLoginKey(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + access_token_url: DF.Data | None + api_endpoint: DF.Data | None + api_endpoint_args: DF.Code | None + auth_url_data: DF.Code | None + authorize_url: DF.Data | None + base_url: DF.Data | None + client_id: DF.Data | None + client_secret: DF.Password | None + custom_base_url: DF.Check + enable_social_login: DF.Check + icon: DF.Data | None + provider_name: DF.Data + redirect_url: DF.Data | None + social_login_provider: DF.Literal[ + "Custom", "Facebook", "Frappe", "GitHub", "Google", "Office 365", "Salesforce", "fairlogin" + ] + user_id_property: DF.Data | None + # end: auto-generated types def autoname(self): self.name = frappe.scrub(self.provider_name) diff --git a/frappe/integrations/doctype/token_cache/token_cache.py b/frappe/integrations/doctype/token_cache/token_cache.py index b79dfe0abf..4c566352f5 100644 --- a/frappe/integrations/doctype/token_cache/token_cache.py +++ b/frappe/integrations/doctype/token_cache/token_cache.py @@ -12,6 +12,26 @@ from frappe.utils import cint, cstr, get_system_timezone class TokenCache(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.integrations.doctype.oauth_scope.oauth_scope import OAuthScope + from frappe.types import DF + + access_token: DF.Password | None + connected_app: DF.Link | None + expires_in: DF.Int + provider_name: DF.Data | None + refresh_token: DF.Password | None + scopes: DF.Table[OAuthScope] + state: DF.Data | None + success_uri: DF.Data | None + token_type: DF.Data | None + user: DF.Link | None + # end: auto-generated types def get_auth_header(self): if self.access_token: headers = {"Authorization": "Bearer " + self.get_password("access_token")} diff --git a/frappe/integrations/doctype/webhook/webhook.py b/frappe/integrations/doctype/webhook/webhook.py index 5b8c653198..b724f18f7e 100644 --- a/frappe/integrations/doctype/webhook/webhook.py +++ b/frappe/integrations/doctype/webhook/webhook.py @@ -20,6 +20,42 @@ WEBHOOK_SECRET_HEADER = "X-Frappe-Webhook-Signature" class Webhook(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.integrations.doctype.webhook_data.webhook_data import WebhookData + from frappe.integrations.doctype.webhook_header.webhook_header import WebhookHeader + from frappe.types import DF + + condition: DF.SmallText | None + enable_security: DF.Check + enabled: DF.Check + is_dynamic_url: DF.Check + meets_condition: DF.Data | None + preview_document: DF.DynamicLink | None + preview_request_body: DF.Code | None + request_method: DF.Literal["POST", "PUT", "DELETE"] + request_structure: DF.Literal["", "Form URL-Encoded", "JSON"] + request_url: DF.Data + timeout: DF.Int + webhook_data: DF.Table[WebhookData] + webhook_docevent: DF.Literal[ + "after_insert", + "on_update", + "on_submit", + "on_cancel", + "on_trash", + "on_update_after_submit", + "on_change", + ] + webhook_doctype: DF.Link + webhook_headers: DF.Table[WebhookHeader] + webhook_json: DF.Code | None + webhook_secret: DF.Password | None + # end: auto-generated types def validate(self): self.validate_docevent() self.validate_condition() diff --git a/frappe/integrations/doctype/webhook_data/webhook_data.py b/frappe/integrations/doctype/webhook_data/webhook_data.py index 39016cb864..7461115dc5 100644 --- a/frappe/integrations/doctype/webhook_data/webhook_data.py +++ b/frappe/integrations/doctype/webhook_data/webhook_data.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class WebhookData(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + fieldname: DF.Literal + key: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/webhook_header/webhook_header.py b/frappe/integrations/doctype/webhook_header/webhook_header.py index f5f85d1afe..a313ebf495 100644 --- a/frappe/integrations/doctype/webhook_header/webhook_header.py +++ b/frappe/integrations/doctype/webhook_header/webhook_header.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class WebhookHeader(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + key: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + value: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py b/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py index 175215f4d4..0b0b9aa060 100644 --- a/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py +++ b/frappe/integrations/doctype/webhook_request_log/webhook_request_log.py @@ -6,6 +6,23 @@ from frappe.model.document import Document class WebhookRequestLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + data: DF.Code | None + error: DF.Text | None + headers: DF.Code | None + reference_document: DF.Data | None + response: DF.Code | None + url: DF.Data | None + user: DF.Link | None + webhook: DF.Link | None + # end: auto-generated types @staticmethod def clear_old_logs(days=30): from frappe.query_builder import Interval diff --git a/frappe/printing/doctype/letter_head/letter_head.py b/frappe/printing/doctype/letter_head/letter_head.py index c48fd1fe25..ca6241584d 100644 --- a/frappe/printing/doctype/letter_head/letter_head.py +++ b/frappe/printing/doctype/letter_head/letter_head.py @@ -8,6 +8,30 @@ from frappe.utils import flt, is_image class LetterHead(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + align: DF.Literal["Left", "Right", "Center"] + content: DF.HTMLEditor | None + disabled: DF.Check + footer: DF.HTMLEditor | None + footer_align: DF.Literal["Left", "Right", "Center"] + footer_image: DF.AttachImage | None + footer_image_height: DF.Float + footer_image_width: DF.Float + footer_source: DF.Literal["Image", "HTML"] + image: DF.AttachImage | None + image_height: DF.Float + image_width: DF.Float + is_default: DF.Check + letter_head_name: DF.Data + source: DF.Literal["Image", "HTML"] + # end: auto-generated types def before_insert(self): # for better UX, let user set from attachment self.source = "Image" diff --git a/frappe/printing/doctype/network_printer_settings/network_printer_settings.py b/frappe/printing/doctype/network_printer_settings/network_printer_settings.py index 3e0b8f0c2e..273ad9c4d1 100644 --- a/frappe/printing/doctype/network_printer_settings/network_printer_settings.py +++ b/frappe/printing/doctype/network_printer_settings/network_printer_settings.py @@ -7,6 +7,18 @@ from frappe.model.document import Document class NetworkPrinterSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + port: DF.Int + printer_name: DF.Literal + server_ip: DF.Data + # end: auto-generated types @frappe.whitelist() def get_printers_list(self, ip="localhost", port=631): printer_list = [] diff --git a/frappe/printing/doctype/print_format/print_format.py b/frappe/printing/doctype/print_format/print_format.py index 599a16bee3..e1ad28ef7b 100644 --- a/frappe/printing/doctype/print_format/print_format.py +++ b/frappe/printing/doctype/print_format/print_format.py @@ -12,6 +12,42 @@ from frappe.utils.weasyprint import download_pdf, get_html class PrintFormat(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + absolute_value: DF.Check + align_labels_right: DF.Check + css: DF.Code | None + custom_format: DF.Check + default_print_language: DF.Link | None + disabled: DF.Check + doc_type: DF.Link + font: DF.Data | None + font_size: DF.Int + format_data: DF.Code | None + html: DF.Code | None + line_breaks: DF.Check + margin_bottom: DF.Float + margin_left: DF.Float + margin_right: DF.Float + margin_top: DF.Float + module: DF.Link | None + page_number: DF.Literal[ + "Hide", "Top Left", "Top Center", "Top Right", "Bottom Left", "Bottom Center", "Bottom Right" + ] + print_format_builder: DF.Check + print_format_builder_beta: DF.Check + print_format_type: DF.Literal["Jinja", "JS"] + raw_commands: DF.Code | None + raw_printing: DF.Check + show_section_headings: DF.Check + standard: DF.Literal["No", "Yes"] + # end: auto-generated types def onload(self): templates = frappe.get_all( "Print Format Field Template", diff --git a/frappe/printing/doctype/print_format_field_template/print_format_field_template.py b/frappe/printing/doctype/print_format_field_template/print_format_field_template.py index cc938da34f..e83850a8c4 100644 --- a/frappe/printing/doctype/print_format_field_template/print_format_field_template.py +++ b/frappe/printing/doctype/print_format_field_template/print_format_field_template.py @@ -7,6 +7,21 @@ from frappe.model.document import Document class PrintFormatFieldTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_type: DF.Link + field: DF.Data | None + module: DF.Link | None + standard: DF.Check + template: DF.Code | None + template_file: DF.Data | None + # end: auto-generated types def validate(self): if self.standard and not (frappe.conf.developer_mode or frappe.flags.in_patch): frappe.throw(_("Enable developer mode to create a standard Print Template")) diff --git a/frappe/printing/doctype/print_heading/print_heading.py b/frappe/printing/doctype/print_heading/print_heading.py index 9daee06f03..7a652befd7 100644 --- a/frappe/printing/doctype/print_heading/print_heading.py +++ b/frappe/printing/doctype/print_heading/print_heading.py @@ -6,4 +6,15 @@ from frappe.model.document import Document class PrintHeading(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + print_heading: DF.Data + # end: auto-generated types pass diff --git a/frappe/printing/doctype/print_settings/print_settings.py b/frappe/printing/doctype/print_settings/print_settings.py index 36eaac2e68..555d3243d1 100644 --- a/frappe/printing/doctype/print_settings/print_settings.py +++ b/frappe/printing/doctype/print_settings/print_settings.py @@ -8,6 +8,64 @@ from frappe.utils import cint class PrintSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + add_draft_heading: DF.Check + allow_page_break_inside_tables: DF.Check + allow_print_for_cancelled: DF.Check + allow_print_for_draft: DF.Check + enable_print_server: DF.Check + enable_raw_printing: DF.Check + font: DF.Literal[ + "Default", "Helvetica Neue", "Arial", "Helvetica", "Inter", "Verdana", "Monospace" + ] + font_size: DF.Float + pdf_page_height: DF.Float + pdf_page_size: DF.Literal[ + "A0", + "A1", + "A2", + "A3", + "A4", + "A5", + "A6", + "A7", + "A8", + "A9", + "B0", + "B1", + "B2", + "B3", + "B4", + "B5", + "B6", + "B7", + "B8", + "B9", + "B10", + "C5E", + "Comm10E", + "DLE", + "Executive", + "Folio", + "Ledger", + "Legal", + "Letter", + "Tabloid", + "Custom", + ] + pdf_page_width: DF.Float + print_style: DF.Link | None + repeat_header_footer: DF.Check + send_print_as_pdf: DF.Check + with_letterhead: DF.Check + # end: auto-generated types def validate(self): if self.pdf_page_size == "Custom" and not (self.pdf_page_height and self.pdf_page_width): frappe.throw(_("Page height and width cannot be zero")) diff --git a/frappe/printing/doctype/print_style/print_style.py b/frappe/printing/doctype/print_style/print_style.py index 2b0fbfe929..e3141e7472 100644 --- a/frappe/printing/doctype/print_style/print_style.py +++ b/frappe/printing/doctype/print_style/print_style.py @@ -6,6 +6,20 @@ from frappe.model.document import Document class PrintStyle(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + css: DF.Code + disabled: DF.Check + preview: DF.AttachImage | None + print_style_name: DF.Data + standard: DF.Check + # end: auto-generated types def validate(self): if ( self.standard == 1 diff --git a/frappe/social/doctype/energy_point_log/energy_point_log.py b/frappe/social/doctype/energy_point_log/energy_point_log.py index a9b013b0e1..9ba64642ff 100644 --- a/frappe/social/doctype/energy_point_log/energy_point_log.py +++ b/frappe/social/doctype/energy_point_log/energy_point_log.py @@ -19,6 +19,25 @@ from frappe.utils import cint, get_fullname, get_link_to_form, getdate class EnergyPointLog(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + points: DF.Int + reason: DF.Text | None + reference_doctype: DF.Link | None + reference_name: DF.Data | None + revert_of: DF.Link | None + reverted: DF.Check + rule: DF.Link | None + seen: DF.Check + type: DF.Literal["Auto", "Appreciation", "Criticism", "Review", "Revert"] + user: DF.Link + # end: auto-generated types def validate(self): self.map_milestone_reference() if self.type in ["Appreciation", "Criticism"] and self.user == self.owner: diff --git a/frappe/social/doctype/energy_point_rule/energy_point_rule.py b/frappe/social/doctype/energy_point_rule/energy_point_rule.py index 1057ac2749..71835563c7 100644 --- a/frappe/social/doctype/energy_point_rule/energy_point_rule.py +++ b/frappe/social/doctype/energy_point_rule/energy_point_rule.py @@ -14,6 +14,27 @@ from frappe.social.doctype.energy_point_settings.energy_point_settings import ( class EnergyPointRule(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + apply_only_once: DF.Check + condition: DF.Code | None + enabled: DF.Check + field_to_check: DF.Literal + for_assigned_users: DF.Check + for_doc_event: DF.Literal["New", "Submit", "Cancel", "Value Change", "Custom"] + max_points: DF.Int + multiplier_field: DF.Literal + points: DF.Int + reference_doctype: DF.Link + rule_name: DF.Data + user_field: DF.Literal + # end: auto-generated types def on_update(self): frappe.cache_manager.clear_doctype_map("Energy Point Rule", self.reference_doctype) diff --git a/frappe/social/doctype/energy_point_settings/energy_point_settings.py b/frappe/social/doctype/energy_point_settings/energy_point_settings.py index 4156aa0094..a83840420d 100644 --- a/frappe/social/doctype/energy_point_settings/energy_point_settings.py +++ b/frappe/social/doctype/energy_point_settings/energy_point_settings.py @@ -8,6 +8,20 @@ from frappe.utils import add_to_date, getdate, today class EnergyPointSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.social.doctype.review_level.review_level import ReviewLevel + from frappe.types import DF + + enabled: DF.Check + last_point_allocation_date: DF.Date | None + point_allocation_periodicity: DF.Literal["Daily", "Weekly", "Monthly"] + review_levels: DF.Table[ReviewLevel] + # end: auto-generated types pass diff --git a/frappe/social/doctype/review_level/review_level.py b/frappe/social/doctype/review_level/review_level.py index 9734d45118..8c59b0b7bf 100644 --- a/frappe/social/doctype/review_level/review_level.py +++ b/frappe/social/doctype/review_level/review_level.py @@ -6,4 +6,19 @@ from frappe.model.document import Document class ReviewLevel(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + level_name: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + review_points: DF.Int + role: DF.Link + # end: auto-generated types pass diff --git a/frappe/website/doctype/about_us_settings/about_us_settings.py b/frappe/website/doctype/about_us_settings/about_us_settings.py index 4989f96d00..4860a533b1 100644 --- a/frappe/website/doctype/about_us_settings/about_us_settings.py +++ b/frappe/website/doctype/about_us_settings/about_us_settings.py @@ -8,6 +8,25 @@ from frappe.model.document import Document class AboutUsSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.about_us_team_member.about_us_team_member import AboutUsTeamMember + from frappe.website.doctype.company_history.company_history import CompanyHistory + + company_history: DF.Table[CompanyHistory] + company_history_heading: DF.Data | None + company_introduction: DF.TextEditor | None + footer: DF.TextEditor | None + page_title: DF.Data | None + team_members: DF.Table[AboutUsTeamMember] + team_members_heading: DF.Data | None + team_members_subtitle: DF.SmallText | None + # end: auto-generated types def on_update(self): from frappe.website.utils import clear_cache diff --git a/frappe/website/doctype/about_us_team_member/about_us_team_member.py b/frappe/website/doctype/about_us_team_member/about_us_team_member.py index 93a867faa1..777e139174 100644 --- a/frappe/website/doctype/about_us_team_member/about_us_team_member.py +++ b/frappe/website/doctype/about_us_team_member/about_us_team_member.py @@ -8,4 +8,19 @@ from frappe.model.document import Document class AboutUsTeamMember(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + bio: DF.SmallText + full_name: DF.Data + image_link: DF.Attach | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/website/doctype/blog_category/blog_category.py b/frappe/website/doctype/blog_category/blog_category.py index 31212ac61b..a3b584af4a 100644 --- a/frappe/website/doctype/blog_category/blog_category.py +++ b/frappe/website/doctype/blog_category/blog_category.py @@ -6,6 +6,20 @@ from frappe.website.website_generator import WebsiteGenerator class BlogCategory(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.SmallText | None + preview_image: DF.AttachImage | None + published: DF.Check + route: DF.Data | None + title: DF.Data + # end: auto-generated types def autoname(self): # to override autoname of WebsiteGenerator self.name = self.scrub(self.title) diff --git a/frappe/website/doctype/blog_post/blog_post.py b/frappe/website/doctype/blog_post/blog_post.py index 685c4837f4..3778884090 100644 --- a/frappe/website/doctype/blog_post/blog_post.py +++ b/frappe/website/doctype/blog_post/blog_post.py @@ -24,6 +24,36 @@ from frappe.website.website_generator import WebsiteGenerator class BlogPost(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + blog_category: DF.Link + blog_intro: DF.SmallText | None + blogger: DF.Link + content: DF.TextEditor | None + content_html: DF.HTMLEditor | None + content_md: DF.MarkdownEditor | None + content_type: DF.Literal["Markdown", "Rich Text", "HTML"] + disable_comments: DF.Check + disable_likes: DF.Check + email_sent: DF.Check + enable_email_notification: DF.Check + featured: DF.Check + hide_cta: DF.Check + meta_description: DF.SmallText | None + meta_image: DF.AttachImage | None + meta_title: DF.Data | None + published: DF.Check + published_on: DF.Date | None + read_time: DF.Int + route: DF.Data | None + title: DF.Data + # end: auto-generated types @frappe.whitelist() def make_route(self): if not self.route: diff --git a/frappe/website/doctype/blog_settings/blog_settings.py b/frappe/website/doctype/blog_settings/blog_settings.py index 6b1d7b6323..741f3ff951 100644 --- a/frappe/website/doctype/blog_settings/blog_settings.py +++ b/frappe/website/doctype/blog_settings/blog_settings.py @@ -8,6 +8,28 @@ from frappe.model.document import Document class BlogSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_guest_to_comment: DF.Check + blog_introduction: DF.SmallText | None + blog_title: DF.Data | None + browse_by_category: DF.Check + comment_limit: DF.Int + cta_label: DF.Data | None + cta_url: DF.Data | None + enable_social_sharing: DF.Check + like_limit: DF.Int + preview_image: DF.AttachImage | None + show_cta_in_blog: DF.Check + subtitle: DF.Data | None + title: DF.Data | None + # end: auto-generated types def on_update(self): from frappe.website.utils import clear_cache diff --git a/frappe/website/doctype/blogger/blogger.py b/frappe/website/doctype/blogger/blogger.py index fc48bf2800..ce23993d42 100644 --- a/frappe/website/doctype/blogger/blogger.py +++ b/frappe/website/doctype/blogger/blogger.py @@ -9,6 +9,21 @@ from frappe.model.document import Document class Blogger(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + avatar: DF.AttachImage | None + bio: DF.SmallText | None + disabled: DF.Check + full_name: DF.Data + short_name: DF.Data + user: DF.Link | None + # end: auto-generated types def validate(self): if self.user and not frappe.db.exists("User", self.user): # for data import diff --git a/frappe/website/doctype/color/color.py b/frappe/website/doctype/color/color.py index f720e86314..78e4eba589 100644 --- a/frappe/website/doctype/color/color.py +++ b/frappe/website/doctype/color/color.py @@ -6,4 +6,14 @@ from frappe.model.document import Document class Color(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + color: DF.Color + # end: auto-generated types pass diff --git a/frappe/website/doctype/company_history/company_history.py b/frappe/website/doctype/company_history/company_history.py index 366c43ce03..16036b095e 100644 --- a/frappe/website/doctype/company_history/company_history.py +++ b/frappe/website/doctype/company_history/company_history.py @@ -8,4 +8,18 @@ from frappe.model.document import Document class CompanyHistory(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + highlight: DF.Text | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + year: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/website/doctype/contact_us_settings/contact_us_settings.py b/frappe/website/doctype/contact_us_settings/contact_us_settings.py index 36bbedb57c..a0e181b8f7 100644 --- a/frappe/website/doctype/contact_us_settings/contact_us_settings.py +++ b/frappe/website/doctype/contact_us_settings/contact_us_settings.py @@ -8,6 +8,30 @@ from frappe.model.document import Document class ContactUsSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + address_line1: DF.Data | None + address_line2: DF.Data | None + address_title: DF.Data | None + city: DF.Data | None + country: DF.Data | None + disable_contact_us: DF.Check + email_id: DF.Data | None + forward_to_email: DF.Data | None + heading: DF.Data | None + introduction: DF.TextEditor | None + phone: DF.Data | None + pincode: DF.Data | None + query_options: DF.SmallText | None + skype: DF.Data | None + state: DF.Data | None + # end: auto-generated types def on_update(self): from frappe.website.utils import clear_cache diff --git a/frappe/website/doctype/discussion_reply/discussion_reply.py b/frappe/website/doctype/discussion_reply/discussion_reply.py index 17903ace2d..b4d1e22695 100644 --- a/frappe/website/doctype/discussion_reply/discussion_reply.py +++ b/frappe/website/doctype/discussion_reply/discussion_reply.py @@ -7,6 +7,17 @@ from frappe.realtime import get_website_room class DiscussionReply(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + reply: DF.LongText | None + topic: DF.Link | None + # end: auto-generated types def on_update(self): frappe.publish_realtime( event="update_message", diff --git a/frappe/website/doctype/discussion_topic/discussion_topic.py b/frappe/website/doctype/discussion_topic/discussion_topic.py index ddc4933548..45e15e9537 100644 --- a/frappe/website/doctype/discussion_topic/discussion_topic.py +++ b/frappe/website/doctype/discussion_topic/discussion_topic.py @@ -6,6 +6,18 @@ from frappe.model.document import Document class DiscussionTopic(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + reference_docname: DF.DynamicLink | None + reference_doctype: DF.Link | None + title: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/website/doctype/help_article/help_article.py b/frappe/website/doctype/help_article/help_article.py index 108f3cb615..1af2beb03c 100644 --- a/frappe/website/doctype/help_article/help_article.py +++ b/frappe/website/doctype/help_article/help_article.py @@ -9,6 +9,25 @@ from frappe.website.website_generator import WebsiteGenerator class HelpArticle(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + author: DF.Data | None + category: DF.Link + content: DF.TextEditor + helpful: DF.Int + level: DF.Literal["Beginner", "Intermediate", "Expert"] + likes: DF.Int + not_helpful: DF.Int + published: DF.Check + route: DF.Data | None + title: DF.Data + # end: auto-generated types def validate(self): self.set_route() diff --git a/frappe/website/doctype/help_category/help_category.py b/frappe/website/doctype/help_category/help_category.py index 741b958aa6..98d88181b0 100644 --- a/frappe/website/doctype/help_category/help_category.py +++ b/frappe/website/doctype/help_category/help_category.py @@ -7,6 +7,20 @@ from frappe.website.website_generator import WebsiteGenerator class HelpCategory(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + category_description: DF.Text | None + category_name: DF.Data + help_articles: DF.Int + published: DF.Check + route: DF.Data | None + # end: auto-generated types website = frappe._dict(condition_field="published", page_title_field="category_name") def before_insert(self): diff --git a/frappe/website/doctype/marketing_campaign/marketing_campaign.py b/frappe/website/doctype/marketing_campaign/marketing_campaign.py index ef23a182e7..b3967d9c92 100644 --- a/frappe/website/doctype/marketing_campaign/marketing_campaign.py +++ b/frappe/website/doctype/marketing_campaign/marketing_campaign.py @@ -6,4 +6,14 @@ from frappe.model.document import Document class MarketingCampaign(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + campaign_description: DF.SmallText | None + # end: auto-generated types pass diff --git a/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py b/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py index 4b9166a66a..63ed5c24ed 100644 --- a/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py +++ b/frappe/website/doctype/personal_data_deletion_request/personal_data_deletion_request.py @@ -14,6 +14,22 @@ from frappe.utils.verified_command import get_signed_params, verify_request class PersonalDataDeletionRequest(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.personal_data_deletion_step.personal_data_deletion_step import ( + PersonalDataDeletionStep, + ) + + anonymization_matrix: DF.Code | None + deletion_steps: DF.Table[PersonalDataDeletionStep] + email: DF.Data + status: DF.Literal["Pending Verification", "Pending Approval", "On Hold", "Deleted"] + # end: auto-generated types def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py b/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py index 7657d3f188..c4f40356d6 100644 --- a/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py +++ b/frappe/website/doctype/personal_data_deletion_step/personal_data_deletion_step.py @@ -6,4 +6,21 @@ from frappe.model.document import Document class PersonalDataDeletionStep(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + document_type: DF.Data + fields: DF.SmallText | None + filtered_by: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + partial: DF.Check + status: DF.Literal["Pending", "Deleted"] + # end: auto-generated types pass diff --git a/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py b/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py index 80441019fc..bd7d358bd8 100644 --- a/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py +++ b/frappe/website/doctype/personal_data_download_request/personal_data_download_request.py @@ -10,6 +10,18 @@ from frappe.utils.verified_command import get_signed_params class PersonalDataDownloadRequest(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + amended_from: DF.Link | None + user: DF.Link + user_name: DF.Data | None + # end: auto-generated types def after_insert(self): personal_data = get_user_data(self.user) diff --git a/frappe/website/doctype/portal_menu_item/portal_menu_item.py b/frappe/website/doctype/portal_menu_item/portal_menu_item.py index de628e1554..d7ce7c707f 100644 --- a/frappe/website/doctype/portal_menu_item/portal_menu_item.py +++ b/frappe/website/doctype/portal_menu_item/portal_menu_item.py @@ -6,4 +6,22 @@ from frappe.model.document import Document class PortalMenuItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + enabled: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reference_doctype: DF.Link | None + role: DF.Link | None + route: DF.Data + target: DF.Data | None + title: DF.Data + # end: auto-generated types pass diff --git a/frappe/website/doctype/portal_settings/portal_settings.py b/frappe/website/doctype/portal_settings/portal_settings.py index 8b0f4cd958..78c2b2d20d 100644 --- a/frappe/website/doctype/portal_settings/portal_settings.py +++ b/frappe/website/doctype/portal_settings/portal_settings.py @@ -6,6 +6,21 @@ from frappe.model.document import Document class PortalSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.portal_menu_item.portal_menu_item import PortalMenuItem + + custom_menu: DF.Table[PortalMenuItem] + default_portal_home: DF.Data | None + default_role: DF.Link | None + hide_standard_menu: DF.Check + menu: DF.Table[PortalMenuItem] + # end: auto-generated types def add_item(self, item): """insert new portal menu item if route is not set, or role is different""" exists = [d for d in self.get("menu", []) if d.get("route") == item.get("route")] diff --git a/frappe/website/doctype/social_link_settings/social_link_settings.py b/frappe/website/doctype/social_link_settings/social_link_settings.py index c659a0a716..5bf75d544e 100644 --- a/frappe/website/doctype/social_link_settings/social_link_settings.py +++ b/frappe/website/doctype/social_link_settings/social_link_settings.py @@ -6,4 +6,19 @@ from frappe.model.document import Document class SocialLinkSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + background_color: DF.Color | None + color: DF.Color | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + social_link_type: DF.Literal["", "facebook", "linkedin", "twitter", "email"] + # end: auto-generated types pass diff --git a/frappe/website/doctype/top_bar_item/top_bar_item.py b/frappe/website/doctype/top_bar_item/top_bar_item.py index 5730dc7962..13eaf77113 100644 --- a/frappe/website/doctype/top_bar_item/top_bar_item.py +++ b/frappe/website/doctype/top_bar_item/top_bar_item.py @@ -6,4 +6,22 @@ from frappe.model.document import Document class TopBarItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + icon: DF.AttachImage | None + label: DF.Data + open_in_new_tab: DF.Check + parent: DF.Data + parent_label: DF.Literal + parentfield: DF.Data + parenttype: DF.Data + right: DF.Check + url: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/website/doctype/web_form/web_form.py b/frappe/website/doctype/web_form/web_form.py index 75f8793b4a..619692cc1d 100644 --- a/frappe/website/doctype/web_form/web_form.py +++ b/frappe/website/doctype/web_form/web_form.py @@ -18,6 +18,54 @@ from frappe.website.website_generator import WebsiteGenerator class WebForm(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.web_form_field.web_form_field import WebFormField + from frappe.website.doctype.web_form_list_column.web_form_list_column import WebFormListColumn + + allow_comments: DF.Check + allow_delete: DF.Check + allow_edit: DF.Check + allow_incomplete: DF.Check + allow_multiple: DF.Check + allow_print: DF.Check + anonymous: DF.Check + apply_document_permissions: DF.Check + banner_image: DF.AttachImage | None + breadcrumbs: DF.Code | None + button_label: DF.Data | None + client_script: DF.Code | None + condition: DF.Code | None + custom_css: DF.Code | None + doc_type: DF.Link + introduction_text: DF.TextEditor | None + is_standard: DF.Check + list_columns: DF.Table[WebFormListColumn] + list_title: DF.Data | None + login_required: DF.Check + max_attachment_size: DF.Int + meta_description: DF.SmallText | None + meta_image: DF.AttachImage | None + meta_title: DF.Data | None + module: DF.Link | None + print_format: DF.Link | None + published: DF.Check + route: DF.Data | None + show_attachments: DF.Check + show_list: DF.Check + show_sidebar: DF.Check + success_message: DF.Text | None + success_title: DF.Data | None + success_url: DF.Data | None + title: DF.Data + web_form_fields: DF.Table[WebFormField] + website_sidebar: DF.Link | None + # end: auto-generated types website = frappe._dict(no_cache=1) def validate(self): diff --git a/frappe/website/doctype/web_form_field/web_form_field.py b/frappe/website/doctype/web_form_field/web_form_field.py index 51e13aa3a7..c6fa4f5dc9 100644 --- a/frappe/website/doctype/web_form_field/web_form_field.py +++ b/frappe/website/doctype/web_form_field/web_form_field.py @@ -6,4 +6,59 @@ from frappe.model.document import Document class WebFormField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_read_on_all_link_options: DF.Check + default: DF.Data | None + depends_on: DF.Code | None + description: DF.Text | None + fieldname: DF.Literal + fieldtype: DF.Literal[ + "Attach", + "Attach Image", + "Check", + "Currency", + "Color", + "Data", + "Date", + "Datetime", + "Duration", + "Float", + "HTML", + "Int", + "Link", + "Password", + "Phone", + "Rating", + "Select", + "Signature", + "Small Text", + "Text", + "Text Editor", + "Table", + "Time", + "Section Break", + "Column Break", + "Page Break", + ] + hidden: DF.Check + label: DF.Data | None + mandatory_depends_on: DF.Code | None + max_length: DF.Int + max_value: DF.Int + options: DF.Text | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + read_only: DF.Check + read_only_depends_on: DF.Code | None + reqd: DF.Check + show_in_filter: DF.Check + # end: auto-generated types pass diff --git a/frappe/website/doctype/web_form_list_column/web_form_list_column.py b/frappe/website/doctype/web_form_list_column/web_form_list_column.py index 9aff5f1ecc..210159bb5b 100644 --- a/frappe/website/doctype/web_form_list_column/web_form_list_column.py +++ b/frappe/website/doctype/web_form_list_column/web_form_list_column.py @@ -6,4 +6,20 @@ from frappe.model.document import Document class WebFormListColumn(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + fieldname: DF.Literal + fieldtype: DF.Data | None + label: DF.Data | None + name: DF.Int | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/website/doctype/web_page/web_page.py b/frappe/website/doctype/web_page/web_page.py index 02e419001c..dc9f004b3b 100644 --- a/frappe/website/doctype/web_page/web_page.py +++ b/frappe/website/doctype/web_page/web_page.py @@ -25,6 +25,46 @@ H_TAG_PATTERN = re.compile("") class WebPage(WebsiteGenerator): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.web_page_block.web_page_block import WebPageBlock + + breadcrumbs: DF.Code | None + content_type: DF.Literal["Rich Text", "Markdown", "HTML", "Page Builder", "Slideshow"] + context_script: DF.Code | None + css: DF.Code | None + dynamic_route: DF.Check + dynamic_template: DF.Check + enable_comments: DF.Check + end_date: DF.Datetime | None + full_width: DF.Check + header: DF.HTMLEditor | None + idx: DF.Int + insert_style: DF.Check + javascript: DF.Code | None + main_section: DF.TextEditor | None + main_section_html: DF.HTMLEditor | None + main_section_md: DF.MarkdownEditor | None + meta_description: DF.SmallText | None + meta_image: DF.AttachImage | None + meta_title: DF.Data | None + module: DF.Link | None + page_blocks: DF.Table[WebPageBlock] + published: DF.Check + route: DF.Data | None + show_sidebar: DF.Check + show_title: DF.Check + slideshow: DF.Link | None + start_date: DF.Datetime | None + text_align: DF.Literal["Left", "Center", "Right"] + title: DF.Data + website_sidebar: DF.Link | None + # end: auto-generated types def validate(self): self.validate_dates() self.set_route() diff --git a/frappe/website/doctype/web_page_block/web_page_block.py b/frappe/website/doctype/web_page_block/web_page_block.py index e700986739..df82d71748 100644 --- a/frappe/website/doctype/web_page_block/web_page_block.py +++ b/frappe/website/doctype/web_page_block/web_page_block.py @@ -6,4 +6,29 @@ from frappe.model.document import Document class WebPageBlock(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + add_background_image: DF.Check + add_border_at_bottom: DF.Check + add_border_at_top: DF.Check + add_bottom_padding: DF.Check + add_container: DF.Check + add_shade: DF.Check + add_top_padding: DF.Check + background_image: DF.AttachImage | None + css_class: DF.SmallText | None + hide_block: DF.Check + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + section_id: DF.Data | None + web_template: DF.Link | None + web_template_values: DF.Code | None + # end: auto-generated types pass diff --git a/frappe/website/doctype/web_page_view/web_page_view.py b/frappe/website/doctype/web_page_view/web_page_view.py index b284dc095c..21b1c00a1f 100644 --- a/frappe/website/doctype/web_page_view/web_page_view.py +++ b/frappe/website/doctype/web_page_view/web_page_view.py @@ -9,6 +9,26 @@ from frappe.model.document import Document class WebPageView(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + browser: DF.Data | None + browser_version: DF.Data | None + campaign: DF.Data | None + is_unique: DF.Data | None + medium: DF.Data | None + path: DF.Data | None + referrer: DF.Data | None + source: DF.Data | None + time_zone: DF.Data | None + user_agent: DF.Data | None + visitor_id: DF.Data | None + # end: auto-generated types @staticmethod def clear_old_logs(days=180): from frappe.query_builder import Interval diff --git a/frappe/website/doctype/web_template/web_template.py b/frappe/website/doctype/web_template/web_template.py index a0eb7be16a..34e0015037 100644 --- a/frappe/website/doctype/web_template/web_template.py +++ b/frappe/website/doctype/web_template/web_template.py @@ -12,6 +12,21 @@ from frappe.website.utils import clear_cache class WebTemplate(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.web_template_field.web_template_field import WebTemplateField + + fields: DF.Table[WebTemplateField] + module: DF.Link | None + standard: DF.Check + template: DF.Code | None + type: DF.Literal["Component", "Section", "Navbar", "Footer"] + # end: auto-generated types def validate(self): if self.standard and not (frappe.conf.developer_mode or frappe.flags.in_patch): frappe.throw(_("Enable developer mode to create a standard Web Template")) diff --git a/frappe/website/doctype/web_template_field/web_template_field.py b/frappe/website/doctype/web_template_field/web_template_field.py index e86e630e81..e8e6b5abd5 100644 --- a/frappe/website/doctype/web_template_field/web_template_field.py +++ b/frappe/website/doctype/web_template_field/web_template_field.py @@ -6,4 +6,35 @@ from frappe.model.document import Document class WebTemplateField(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + default: DF.SmallText | None + fieldname: DF.Data | None + fieldtype: DF.Literal[ + "Attach Image", + "Check", + "Data", + "Int", + "Link", + "Select", + "Small Text", + "Text", + "Markdown Editor", + "Section Break", + "Column Break", + "Table Break", + ] + label: DF.Data + options: DF.SmallText | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + reqd: DF.Check + # end: auto-generated types pass diff --git a/frappe/website/doctype/website_meta_tag/website_meta_tag.py b/frappe/website/doctype/website_meta_tag/website_meta_tag.py index 56b5f4f37b..e0004212c2 100644 --- a/frappe/website/doctype/website_meta_tag/website_meta_tag.py +++ b/frappe/website/doctype/website_meta_tag/website_meta_tag.py @@ -6,6 +6,20 @@ from frappe.model.document import Document class WebsiteMetaTag(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + key: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + value: DF.Text + # end: auto-generated types def get_content(self): # can't have new lines in meta content return (self.value or "").replace("\n", " ") diff --git a/frappe/website/doctype/website_route_meta/website_route_meta.py b/frappe/website/doctype/website_route_meta/website_route_meta.py index 12ae682a48..f874e6fd6c 100644 --- a/frappe/website/doctype/website_route_meta/website_route_meta.py +++ b/frappe/website/doctype/website_route_meta/website_route_meta.py @@ -5,6 +5,17 @@ from frappe.model.document import Document class WebsiteRouteMeta(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.website_meta_tag.website_meta_tag import WebsiteMetaTag + + meta_tags: DF.Table[WebsiteMetaTag] + # end: auto-generated types def autoname(self): if self.name and self.name.startswith("/"): self.name = self.name[1:] diff --git a/frappe/website/doctype/website_route_redirect/website_route_redirect.py b/frappe/website/doctype/website_route_redirect/website_route_redirect.py index f84e68d2b2..32949fb229 100644 --- a/frappe/website/doctype/website_route_redirect/website_route_redirect.py +++ b/frappe/website/doctype/website_route_redirect/website_route_redirect.py @@ -6,4 +6,18 @@ from frappe.model.document import Document class WebsiteRouteRedirect(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + source: DF.SmallText + target: DF.SmallText + # end: auto-generated types pass diff --git a/frappe/website/doctype/website_script/website_script.py b/frappe/website/doctype/website_script/website_script.py index f2764caf91..9d044a394e 100644 --- a/frappe/website/doctype/website_script/website_script.py +++ b/frappe/website/doctype/website_script/website_script.py @@ -8,6 +8,16 @@ from frappe.model.document import Document class WebsiteScript(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + javascript: DF.Code | None + # end: auto-generated types def on_update(self): """clear cache""" frappe.clear_cache(user="Guest") diff --git a/frappe/website/doctype/website_settings/website_settings.py b/frappe/website/doctype/website_settings/website_settings.py index 0295ac03e4..931acb87cf 100644 --- a/frappe/website/doctype/website_settings/website_settings.py +++ b/frappe/website/doctype/website_settings/website_settings.py @@ -11,6 +11,59 @@ from frappe.website.utils import get_boot_data class WebsiteSettings(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.top_bar_item.top_bar_item import TopBarItem + from frappe.website.doctype.website_route_redirect.website_route_redirect import ( + WebsiteRouteRedirect, + ) + + address: DF.SmallText | None + app_logo: DF.AttachImage | None + app_name: DF.Data | None + auto_account_deletion: DF.Int + banner_html: DF.Code | None + banner_image: DF.AttachImage | None + brand_html: DF.Code | None + call_to_action: DF.Data | None + call_to_action_url: DF.Data | None + copyright: DF.Data | None + disable_signup: DF.Check + enable_google_indexing: DF.Check + enable_view_tracking: DF.Check + favicon: DF.Attach | None + footer_items: DF.Table[TopBarItem] + footer_logo: DF.AttachImage | None + footer_powered: DF.SmallText | None + footer_template: DF.Link | None + footer_template_values: DF.Code | None + google_analytics_anonymize_ip: DF.Check + google_analytics_id: DF.Data | None + head_html: DF.Code | None + hide_footer_signup: DF.Check + hide_login: DF.Check + home_page: DF.Data | None + indexing_authorization_code: DF.Data | None + indexing_refresh_token: DF.Data | None + navbar_search: DF.Check + navbar_template: DF.Link | None + navbar_template_values: DF.Code | None + robots_txt: DF.Code | None + route_redirects: DF.Table[WebsiteRouteRedirect] + show_account_deletion_link: DF.Check + show_language_picker: DF.Check + splash_image: DF.AttachImage | None + subdomain: DF.SmallText | None + title_prefix: DF.Data | None + top_bar_items: DF.Table[TopBarItem] + website_theme: DF.Link | None + website_theme_image_link: DF.Code | None + # end: auto-generated types def validate(self): self.validate_top_bar_items() self.validate_footer_items() diff --git a/frappe/website/doctype/website_sidebar/website_sidebar.py b/frappe/website/doctype/website_sidebar/website_sidebar.py index f120db1e87..648652a838 100644 --- a/frappe/website/doctype/website_sidebar/website_sidebar.py +++ b/frappe/website/doctype/website_sidebar/website_sidebar.py @@ -6,6 +6,18 @@ from frappe.model.document import Document class WebsiteSidebar(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.website_sidebar_item.website_sidebar_item import WebsiteSidebarItem + + sidebar_items: DF.Table[WebsiteSidebarItem] + title: DF.Data + # end: auto-generated types def get_items(self): items = frappe.get_all( "Website Sidebar Item", diff --git a/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py b/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py index febbafcaf7..931628b5f4 100644 --- a/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py +++ b/frappe/website/doctype/website_sidebar_item/website_sidebar_item.py @@ -6,4 +6,19 @@ from frappe.model.document import Document class WebsiteSidebarItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + group: DF.Data | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + route: DF.Data | None + title: DF.Data + # end: auto-generated types pass diff --git a/frappe/website/doctype/website_slideshow/website_slideshow.py b/frappe/website/doctype/website_slideshow/website_slideshow.py index e9571b69df..797270b61c 100644 --- a/frappe/website/doctype/website_slideshow/website_slideshow.py +++ b/frappe/website/doctype/website_slideshow/website_slideshow.py @@ -9,6 +9,21 @@ from frappe.model.document import Document class WebsiteSlideshow(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.website_slideshow_item.website_slideshow_item import ( + WebsiteSlideshowItem, + ) + + header: DF.HTMLEditor | None + slideshow_items: DF.Table[WebsiteSlideshowItem] + slideshow_name: DF.Data + # end: auto-generated types def validate(self): self.validate_images() diff --git a/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py b/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py index b1ab84a294..7ed0a381cc 100644 --- a/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py +++ b/frappe/website/doctype/website_slideshow_item/website_slideshow_item.py @@ -8,4 +8,20 @@ from frappe.model.document import Document class WebsiteSlideshowItem(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + description: DF.Text | None + heading: DF.Data | None + image: DF.Attach | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + url: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/website/doctype/website_theme/website_theme.py b/frappe/website/doctype/website_theme/website_theme.py index 178e872c2f..bf0dd35c3a 100644 --- a/frappe/website/doctype/website_theme/website_theme.py +++ b/frappe/website/doctype/website_theme/website_theme.py @@ -14,6 +14,38 @@ from frappe.utils import get_path class WebsiteTheme(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.website.doctype.website_theme_ignore_app.website_theme_ignore_app import ( + WebsiteThemeIgnoreApp, + ) + + background_color: DF.Link | None + button_gradients: DF.Check + button_rounded_corners: DF.Check + button_shadows: DF.Check + custom: DF.Check + custom_overrides: DF.Code | None + custom_scss: DF.Code | None + dark_color: DF.Link | None + font_properties: DF.Data | None + font_size: DF.Data | None + google_font: DF.Data | None + ignored_apps: DF.Table[WebsiteThemeIgnoreApp] + js: DF.Code | None + light_color: DF.Link | None + module: DF.Link + primary_color: DF.Link | None + text_color: DF.Link | None + theme: DF.Data + theme_scss: DF.Code | None + theme_url: DF.Data | None + # end: auto-generated types def validate(self): self.validate_if_customizable() self.generate_bootstrap_theme() diff --git a/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py b/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py index 8c3f962b91..56f84148e0 100644 --- a/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py +++ b/frappe/website/doctype/website_theme_ignore_app/website_theme_ignore_app.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class WebsiteThemeIgnoreApp(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + app: DF.Data + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + # end: auto-generated types pass diff --git a/frappe/workflow/doctype/workflow/workflow.py b/frappe/workflow/doctype/workflow/workflow.py index c28d5e4cd9..6529a13f3d 100644 --- a/frappe/workflow/doctype/workflow/workflow.py +++ b/frappe/workflow/doctype/workflow/workflow.py @@ -8,6 +8,28 @@ from frappe.model.document import Document class Workflow(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.workflow.doctype.workflow_document_state.workflow_document_state import ( + WorkflowDocumentState, + ) + from frappe.workflow.doctype.workflow_transition.workflow_transition import WorkflowTransition + + document_type: DF.Link + is_active: DF.Check + override_status: DF.Check + send_email_alert: DF.Check + states: DF.Table[WorkflowDocumentState] + transitions: DF.Table[WorkflowTransition] + workflow_data: DF.JSON | None + workflow_name: DF.Data + workflow_state_field: DF.Data + # end: auto-generated types def validate(self): self.set_active() self.create_custom_field_for_workflow_state() diff --git a/frappe/workflow/doctype/workflow_action/workflow_action.py b/frappe/workflow/doctype/workflow_action/workflow_action.py index 7a7d95ab7d..6bfc620f7f 100644 --- a/frappe/workflow/doctype/workflow_action/workflow_action.py +++ b/frappe/workflow/doctype/workflow_action/workflow_action.py @@ -23,6 +23,26 @@ from frappe.utils.verified_command import get_signed_params, verify_request class WorkflowAction(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + from frappe.workflow.doctype.workflow_action_permitted_role.workflow_action_permitted_role import ( + WorkflowActionPermittedRole, + ) + + completed_by: DF.Link | None + completed_by_role: DF.Link | None + permitted_roles: DF.TableMultiSelect[WorkflowActionPermittedRole] | None + reference_doctype: DF.Link | None + reference_name: DF.DynamicLink | None + status: DF.Literal["Open", "Completed"] + user: DF.Link | None + workflow_state: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py b/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py index 95c7aa7cee..f6d21783b3 100644 --- a/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py +++ b/frappe/workflow/doctype/workflow_action_master/workflow_action_master.py @@ -5,4 +5,14 @@ from frappe.model.document import Document class WorkflowActionMaster(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + workflow_action_name: DF.Data + # end: auto-generated types pass diff --git a/frappe/workflow/doctype/workflow_action_permitted_role/workflow_action_permitted_role.py b/frappe/workflow/doctype/workflow_action_permitted_role/workflow_action_permitted_role.py index 4266d96b7e..926dc77ca6 100644 --- a/frappe/workflow/doctype/workflow_action_permitted_role/workflow_action_permitted_role.py +++ b/frappe/workflow/doctype/workflow_action_permitted_role/workflow_action_permitted_role.py @@ -6,4 +6,17 @@ from frappe.model.document import Document class WorkflowActionPermittedRole(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + role: DF.Link | None + # end: auto-generated types pass diff --git a/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py b/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py index 9da45ef278..2484e8c49c 100644 --- a/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py +++ b/frappe/workflow/doctype/workflow_document_state/workflow_document_state.py @@ -6,4 +6,24 @@ from frappe.model.document import Document class WorkflowDocumentState(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + allow_edit: DF.Link + doc_status: DF.Literal["0", "1", "2"] + is_optional_state: DF.Check + message: DF.Text | None + next_action_email_template: DF.Link | None + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + state: DF.Link + update_field: DF.Literal + update_value: DF.Data | None + # end: auto-generated types pass diff --git a/frappe/workflow/doctype/workflow_state/workflow_state.py b/frappe/workflow/doctype/workflow_state/workflow_state.py index 8ee56e9803..c7d263c684 100644 --- a/frappe/workflow/doctype/workflow_state/workflow_state.py +++ b/frappe/workflow/doctype/workflow_state/workflow_state.py @@ -6,4 +6,158 @@ from frappe.model.document import Document class WorkflowState(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + icon: DF.Literal[ + "", + "glass", + "music", + "search", + "envelope", + "heart", + "star", + "star-empty", + "user", + "film", + "th-large", + "th", + "th-list", + "ok", + "remove", + "zoom-in", + "zoom-out", + "off", + "signal", + "cog", + "trash", + "home", + "file", + "time", + "road", + "download-alt", + "download", + "upload", + "inbox", + "play-circle", + "repeat", + "refresh", + "list-alt", + "lock", + "flag", + "headphones", + "volume-off", + "volume-down", + "volume-up", + "qrcode", + "barcode", + "tag", + "tags", + "book", + "bookmark", + "print", + "camera", + "font", + "bold", + "italic", + "text-height", + "text-width", + "align-left", + "align-center", + "align-right", + "align-justify", + "list", + "indent-left", + "indent-right", + "facetime-video", + "picture", + "pencil", + "map-marker", + "adjust", + "tint", + "edit", + "share", + "check", + "move", + "step-backward", + "fast-backward", + "backward", + "play", + "pause", + "stop", + "forward", + "fast-forward", + "step-forward", + "eject", + "chevron-left", + "chevron-right", + "plus-sign", + "minus-sign", + "remove-sign", + "ok-sign", + "question-sign", + "info-sign", + "screenshot", + "remove-circle", + "ok-circle", + "ban-circle", + "arrow-left", + "arrow-right", + "arrow-up", + "arrow-down", + "share-alt", + "resize-full", + "resize-small", + "plus", + "minus", + "asterisk", + "exclamation-sign", + "gift", + "leaf", + "fire", + "eye-open", + "eye-close", + "warning-sign", + "plane", + "calendar", + "random", + "comment", + "magnet", + "chevron-up", + "chevron-down", + "retweet", + "shopping-cart", + "folder-close", + "folder-open", + "resize-vertical", + "resize-horizontal", + "hdd", + "bullhorn", + "bell", + "certificate", + "thumbs-up", + "thumbs-down", + "hand-right", + "hand-left", + "hand-up", + "hand-down", + "circle-arrow-right", + "circle-arrow-left", + "circle-arrow-up", + "circle-arrow-down", + "globe", + "wrench", + "tasks", + "filter", + "briefcase", + "fullscreen", + ] + style: DF.Literal["", "Primary", "Info", "Success", "Warning", "Danger", "Inverse"] + workflow_state_name: DF.Data + # end: auto-generated types pass diff --git a/frappe/workflow/doctype/workflow_transition/workflow_transition.py b/frappe/workflow/doctype/workflow_transition/workflow_transition.py index 2649fd7bde..817f8ed6a5 100644 --- a/frappe/workflow/doctype/workflow_transition/workflow_transition.py +++ b/frappe/workflow/doctype/workflow_transition/workflow_transition.py @@ -6,4 +6,22 @@ from frappe.model.document import Document class WorkflowTransition(Document): + # begin: auto-generated types + # This code is auto-generated. Do not modify anything in this block. + + from typing import TYPE_CHECKING + + if TYPE_CHECKING: + from frappe.types import DF + + action: DF.Link + allow_self_approval: DF.Check + allowed: DF.Link + condition: DF.Code | None + next_state: DF.Link + parent: DF.Data + parentfield: DF.Data + parenttype: DF.Data + state: DF.Link + # end: auto-generated types pass