Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions social_media_calendar/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================
Social Media Calendar
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9ef0613fac59ec66dcecfb14f4bff101e89925782f08418a3cf3b64bdf731cd0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/19.0/social_media_calendar
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-19-0/social-19-0-social_media_calendar
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module provides the functionality to display posts in the calendar
view.

**Table of contents**

.. contents::
:local:

Usage
=====

Calendar view
-------------

1. Go to Social Media > Posts
2. Click on the Calendar icon to open the calendar view
3. Click on a Post and a view with the post details will open.

Colors by publication status
----------------------------

The calendar view will show the posts in different colors depending on
their publication status:

- Draft

|POST_DRAFT|

- Planned

|POST_PLANNED|

- Publishing

|POST_PUBLISHING|

- Published

|POST_PUBLISHED|

- Cancelled

|POST_CANCELLED|

- Calendar view by color

|POSTS_CALENDAR|

.. |POST_DRAFT| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_calendar/static/img/readme/POST_DRAFT.png
.. |POST_PLANNED| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_calendar/static/img/readme/POST_PLANNED.png
.. |POST_PUBLISHING| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_calendar/static/img/readme/POST_PUBLISHING.png
.. |POST_PUBLISHED| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_calendar/static/img/readme/POST_PUBLISHED.png
.. |POST_CANCELLED| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_calendar/static/img/readme/POST_CANCELLED.png
.. |POSTS_CALENDAR| image:: https://raw.githubusercontent.com/OCA/social/19.0/social_media_calendar/static/img/readme/POSTS_CALENDAR.png

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20social_media_calendar%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* BinhexTeam

Contributors
------------

- [Binhex] (https://www.binhex.cloud):

- Edilio Escalona Almira [email protected]

- [Trobz] (https://trobz.com/):

- Khanh (Dinh Van) [email protected]

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/social <https://github.com/OCA/social/tree/19.0/social_media_calendar>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions social_media_calendar/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
16 changes: 16 additions & 0 deletions social_media_calendar/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Social Media Calendar",
"summary": """Module for social media calendar integration.""",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "BinhexTeam,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"depends": ["social_media_base", "calendar"],
"data": [
"views/social_post_views.xml",
],
"exclude": ["social"],
"auto_install": True,
}
4 changes: 4 additions & 0 deletions social_media_calendar/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import social_post
32 changes: 32 additions & 0 deletions social_media_calendar/models/social_post.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright 2025 Binhex <https://www.binhex.cloud>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class SocialPost(models.Model):
_inherit = "social.post"

date_calendar = fields.Date(compute="_compute_date_calendar", store=True)
color = fields.Integer(compute="_compute_color")

@api.depends("state")
def _compute_color(self):
for post in self:
if post.state == "planned":
post.color = 2
elif post.state == "publishing":
post.color = 6
elif post.state == "published":
post.color = 10
elif post.state == "cancelled":
post.color = 0
else:
post.color = 4

@api.depends("create_date", "send_post_date", "published_date")
def _compute_date_calendar(self):
for post in self:
post.date_calendar = (
post.published_date or post.send_post_date or post.create_date
)
3 changes: 3 additions & 0 deletions social_media_calendar/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions social_media_calendar/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- [Binhex] (https://www.binhex.cloud):
- Edilio Escalona Almira <[email protected]>

- [Trobz] (https://trobz.com/):
- Khanh (Dinh Van) [email protected]
1 change: 1 addition & 0 deletions social_media_calendar/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module provides the functionality to display posts in the calendar view.
31 changes: 31 additions & 0 deletions social_media_calendar/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Calendar view
-------------------

1. Go to Social Media > Posts
2. Click on the Calendar icon to open the calendar view
3. Click on a Post and a view with the post details will open.

Colors by publication status
---------------------------

The calendar view will show the posts in different colors depending on their publication status:

- Draft

![POST_DRAFT](../static/img/readme/POST_DRAFT.png)
- Planned

![POST_PLANNED](../static/img/readme/POST_PLANNED.png)
- Publishing

![POST_PUBLISHING](../static/img/readme/POST_PUBLISHING.png)
- Published

![POST_PUBLISHED](../static/img/readme/POST_PUBLISHED.png)
- Cancelled

![POST_CANCELLED](../static/img/readme/POST_CANCELLED.png)

- Calendar view by color

![POSTS_CALENDAR](../static/img/readme/POSTS_CALENDAR.png)
Loading
Loading