|
| 1 | +========================== |
| 2 | +Blog Scheduled Publication |
| 3 | +========================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:132329775a846e3e9b5c3c742d03461131d87458a9e8d56b104671807883642c |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Beta |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwebsite-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/website/tree/16.0/website_blog_scheduled_publication |
| 21 | + :alt: OCA/website |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/website-16-0/website-16-0-website_blog_scheduled_publication |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/website&target_branch=16.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +This module allows you to schedule blog posts for automatic publication at a specific date and time. |
| 32 | + |
| 33 | +Features |
| 34 | +-------- |
| 35 | + |
| 36 | +* **Scheduled Publication Date**: Add a datetime field to schedule when posts should be published |
| 37 | +* **Quick Publish Button**: One-click immediate publication from the form view |
| 38 | +* **Schedule Wizard**: User-friendly wizard to set the publication date |
| 39 | +* **Visual Feedback**: Information banner displays scheduled date on the form |
| 40 | +* **Smart Publication Logic**: Automatically prevents immediate publication if a future date is set |
| 41 | +* **Automatic Cron Job**: Runs every hour to publish scheduled posts |
| 42 | +* **Notification System**: Sends notifications to blog followers when posts are published |
| 43 | +* **Search Filters**: Filter and group posts by publication or scheduled dates |
| 44 | + |
| 45 | +Technical Details |
| 46 | +----------------- |
| 47 | + |
| 48 | +* Extends ``blog.post`` model with scheduling fields and methods |
| 49 | +* Includes a transient model ``blog.post.schedule.date`` for the scheduling wizard |
| 50 | +* Inherits and enhances form and search views from ``website_blog`` |
| 51 | +* The cron job uses ``_publish_scheduled_posts()`` method to process scheduled posts |
| 52 | +* Handles edge cases like setting past dates, clearing scheduled dates, and multiple record writes |
| 53 | + |
| 54 | +**Table of contents** |
| 55 | + |
| 56 | +.. contents:: |
| 57 | + :local: |
| 58 | + |
| 59 | +Configuration |
| 60 | +============= |
| 61 | + |
| 62 | +To use this module, you need to: |
| 63 | + |
| 64 | +#. Install the module from Apps menu |
| 65 | +#. Go to **Website > Content > Blog Posts** |
| 66 | +#. Create or edit a blog post |
| 67 | +#. In the "Publishing Options" section, you will find the "Scheduled Publication Date" field |
| 68 | +#. Set a future date and time when you want the post to be published |
| 69 | +#. Save the post |
| 70 | + |
| 71 | +The post will be automatically published when the scheduled date and time arrives. |
| 72 | + |
| 73 | +Note: The cron job that publishes scheduled posts runs every hour. If you need more frequent checks, you can adjust the cron job interval in **Settings > Technical > Automation > Scheduled Actions**. |
| 74 | + |
| 75 | +Usage |
| 76 | +===== |
| 77 | + |
| 78 | +Scheduling a Blog Post |
| 79 | +====================== |
| 80 | + |
| 81 | +Using the Form View |
| 82 | +------------------- |
| 83 | + |
| 84 | +1. Go to **Website > Content > Blog Posts** |
| 85 | +2. Open a blog post form |
| 86 | +3. You will see two buttons in the button box: |
| 87 | + |
| 88 | + * **Publish**: Click to publish the post immediately |
| 89 | + * **Schedule**: Click to open the scheduling wizard |
| 90 | + |
| 91 | +4. When clicking "Schedule", a dialog will appear asking for the publication date |
| 92 | +5. Select the desired date and time, then click "Schedule" |
| 93 | +6. The post will display an information banner showing the scheduled publication date |
| 94 | + |
| 95 | +Using the Schedule Type Field |
| 96 | +----------------------------- |
| 97 | + |
| 98 | +In the blog post form, you can also set the "Scheduled Publication Date" field directly: |
| 99 | + |
| 100 | +* Set the date field to a future date and time |
| 101 | +* The post will automatically be scheduled for that time |
| 102 | +* The post will remain unpublished until the scheduled time |
| 103 | + |
| 104 | +Viewing Scheduled Posts |
| 105 | +----------------------- |
| 106 | + |
| 107 | +Use the search filters to find scheduled posts: |
| 108 | + |
| 109 | +* **Published**: Filter to show only published posts |
| 110 | +* **Not Published**: Filter to show unpublished posts (including scheduled ones) |
| 111 | + |
| 112 | +You can also group posts by: |
| 113 | + |
| 114 | +* **Publication Date**: Group by the actual publication date |
| 115 | +* **Scheduled Publication Date**: Group by the scheduled publication date |
| 116 | + |
| 117 | +Automatic Publication |
| 118 | +--------------------- |
| 119 | + |
| 120 | +A cron job runs every hour to publish posts that have reached their scheduled time: |
| 121 | + |
| 122 | +* Posts are automatically published when the scheduled date/time arrives |
| 123 | +* Notifications are sent to blog followers when posts are published |
| 124 | +* The scheduled date is cleared after publication |
| 125 | + |
| 126 | +Immediate Publication |
| 127 | +--------------------- |
| 128 | + |
| 129 | +If you need to publish a scheduled post immediately: |
| 130 | + |
| 131 | +1. Open the blog post form |
| 132 | +2. Click the "Publish" button |
| 133 | +3. Confirm the action in the dialog |
| 134 | +4. The post will be published immediately and the scheduled date will be cleared |
| 135 | + |
| 136 | +Bug Tracker |
| 137 | +=========== |
| 138 | + |
| 139 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/website/issues>`_. |
| 140 | +In case of trouble, please check there if your issue has already been reported. |
| 141 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 142 | +`feedback <https://github.com/OCA/website/issues/new?body=module:%20website_blog_scheduled_publication%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 143 | + |
| 144 | +Do not contact contributors directly about support or help with technical issues. |
| 145 | + |
| 146 | +Credits |
| 147 | +======= |
| 148 | + |
| 149 | +Authors |
| 150 | +~~~~~~~ |
| 151 | + |
| 152 | +* Escodoo |
| 153 | + |
| 154 | +Contributors |
| 155 | +~~~~~~~~~~~~ |
| 156 | + |
| 157 | +* `Escodoo <https://www.escodoo.com.br>`_: |
| 158 | + |
| 159 | + * Marcel Savegnago <marcel.savegnago@escodoo.com.br> |
| 160 | + |
| 161 | +Maintainers |
| 162 | +~~~~~~~~~~~ |
| 163 | + |
| 164 | +This module is maintained by the OCA. |
| 165 | + |
| 166 | +.. image:: https://odoo-community.org/logo.png |
| 167 | + :alt: Odoo Community Association |
| 168 | + :target: https://odoo-community.org |
| 169 | + |
| 170 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 171 | +mission is to support the collaborative development of Odoo features and |
| 172 | +promote its widespread use. |
| 173 | + |
| 174 | +.. |maintainer-marcelsavegnago| image:: https://github.com/marcelsavegnago.png?size=40px |
| 175 | + :target: https://github.com/marcelsavegnago |
| 176 | + :alt: marcelsavegnago |
| 177 | + |
| 178 | +Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: |
| 179 | + |
| 180 | +|maintainer-marcelsavegnago| |
| 181 | + |
| 182 | +This module is part of the `OCA/website <https://github.com/OCA/website/tree/16.0/website_blog_scheduled_publication>`_ project on GitHub. |
| 183 | + |
| 184 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments