From 6eb20132d15f48ba3d7a92f6f961fe979ba8876b Mon Sep 17 00:00:00 2001 From: Trinh Anh Ngoc Date: Wed, 26 Mar 2025 16:30:51 +0700 Subject: [PATCH] Update stubs --- odoo-stubs/fields.pyi | 8 ++++---- odoo-stubs/tools/mail.pyi | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/odoo-stubs/fields.pyi b/odoo-stubs/fields.pyi index 1ec5019..9bf0f7e 100644 --- a/odoo-stubs/fields.pyi +++ b/odoo-stubs/fields.pyi @@ -276,10 +276,10 @@ class Datetime(Field[datetime.datetime]): type: str column_type: tuple[str, str] column_cast_from: tuple[str] - start_of = date_utils.start_of - end_of = date_utils.end_of - add = date_utils.add - subtract = date_utils.subtract + start_of = staticmethod(date_utils.start_of) + end_of = staticmethod(date_utils.end_of) + add = staticmethod(date_utils.add) + subtract = staticmethod(date_utils.subtract) @staticmethod def now(*args) -> datetime.datetime: ... @staticmethod diff --git a/odoo-stubs/tools/mail.pyi b/odoo-stubs/tools/mail.pyi index 253f097..c6e7944 100644 --- a/odoo-stubs/tools/mail.pyi +++ b/odoo-stubs/tools/mail.pyi @@ -27,6 +27,7 @@ HTML_TAG_URL_REGEX: str def validate_url(url: str) -> str: ... def is_html_empty(html_content: str) -> bool: ... def html_keep_url(text: str) -> str: ... +def create_link(url: str, label: str) -> str: ... def html2plaintext( html: str, body_id: str | None = ..., encoding: str = ... ) -> str: ...