Thursday, November 20, 2025
1 change · master
Enhancements to existing features
Website content such as blog posts, pages, events, products, jobs, and courses can now be scheduled for publication more consistently. This prevents followers and search engines from being notified before content is actually available, reducing broken links and improving launch timing.
Original PR description
*: website_blog, website_event, website_event_track, website_event_exhibitor, website_event_sale, website_hr_recruitment, website_sale, website_slides Since [1], when scheduling a "blog post" to be…
*: website_blog, website_event, website_event_track, website_event_exhibitor, website_event_sale, website_hr_recruitment, website_sale, website_slides Since [1], when scheduling a "blog post" to be published on a specific date (in the future) by changing the "publishing date", a notification was sent to all blog followers directly, even though the post was not yet accessible. Additionally, the sitemap.xml indicated this post as available, which made crawlers index it even though it returned a 404. This commit introduces a new way of managing web publication scheduling (blog posts, e-commerce products, web pages, events...) by modifying the WebsitePublishedMixin and adding three fields: The "published_date" field is added to default website pages, accurately tracking the date and time of publication. The "publish_on" field is introduced to track scheduled publication dates. This field allows users to specify the date and time for automatic publication of content, improving efficiency in disseminating information while optimizing resource allocation. It is now possible to use this functionality for all models inheriting from this mixin. A "_check_for_action_post_publish" method has been implemented to be replaced in child models to trigger a procedure just before publishing a page and to record the "published_date". This allows, for example, sending a notification to users only if the page has never been published before. This behavior is managed through the use of a "cron_trigger" linked to a static cron that checks if a web page has a "publish_on" field in the past. In this case, the page is published and calls the function to publish the page. Upgrade PR : - https://github.com/odoo/upgrade/pull/5903 [1]: https://github.com/odoo/odoo/commit/a4d8cf9 task-3650652