Skip to content

Commit 8d6cf95

Browse files
committed
[ADD] New module website_company_mastodon_link.
Add Mastodon social network on website pages and snippets
1 parent 43463b5 commit 8d6cf95

File tree

16 files changed

+822
-0
lines changed

16 files changed

+822
-0
lines changed
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
===============================
2+
Website - Company Mastodon Link
3+
===============================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e734ac518bf3febed981e3bdafae77abd3dce4afad703b2857fd069cc618ff23
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/18.0/website_company_mastodon_link
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-18-0/website-18-0-website_company_mastodon_link
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=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module adds Company Mastodon links on websites.
32+
33+
|website|
34+
35+
.. |website| image:: https://raw.githubusercontent.com/OCA/website/18.0/website_company_mastodon_link/static/description/img/website.png
36+
37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
42+
Known issues / Roadmap
43+
======================
44+
45+
- For unknown reason, if you make a change in the footer of the website,
46+
the mastodon icon is duplicated, and has to be removed manually.
47+
48+
- Change website form view to put ``social_mastodon`` field in 'Social
49+
Media' page, once https://github.com/odoo/odoo/pull/237668 is merged.
50+
51+
Bug Tracker
52+
===========
53+
54+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/website/issues>`_.
55+
In case of trouble, please check there if your issue has already been reported.
56+
If you spotted it first, help us to smash it by providing a detailed and welcomed
57+
`feedback <https://github.com/OCA/website/issues/new?body=module:%20website_company_mastodon_link%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
58+
59+
Do not contact contributors directly about support or help with technical issues.
60+
61+
Credits
62+
=======
63+
64+
Authors
65+
-------
66+
67+
* GRAP
68+
69+
Contributors
70+
------------
71+
72+
- Sylvain LE GAL <[email protected]>
73+
74+
Maintainers
75+
-----------
76+
77+
This module is maintained by the OCA.
78+
79+
.. image:: https://odoo-community.org/logo.png
80+
:alt: Odoo Community Association
81+
:target: https://odoo-community.org
82+
83+
OCA, or the Odoo Community Association, is a nonprofit organization whose
84+
mission is to support the collaborative development of Odoo features and
85+
promote its widespread use.
86+
87+
.. |maintainer-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
88+
:target: https://github.com/legalsylvain
89+
:alt: legalsylvain
90+
91+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
92+
93+
|maintainer-legalsylvain|
94+
95+
This module is part of the `OCA/website <https://github.com/OCA/website/tree/18.0/website_company_mastodon_link>`_ project on GitHub.
96+
97+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 - Today: GRAP https://www.grap.coop
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3+
{
4+
"name": "Website - Company Mastodon Link",
5+
"summary": "Display Company Mastodon Link" " on Website",
6+
"version": "18.0.1.0.0",
7+
"author": "GRAP, Odoo Community Association (OCA)",
8+
"maintainers": ["legalsylvain"],
9+
"website": "https://github.com/OCA/website",
10+
"license": "AGPL-3",
11+
"category": "Website",
12+
"depends": ["website", "res_company_mastodon_link", "base_fontawesome"],
13+
"data": [
14+
"templates/website_templates.xml",
15+
"templates/s_social_media.xml",
16+
"templates/s_mega_menu_odoo_menu.xml",
17+
"views/view_website.xml",
18+
],
19+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#. module: website_company_mastodon_link
2+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.footer_custom
3+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.header_social_links
4+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.s_mega_menu_odoo_menu
5+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.s_social_media
6+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.template_footer_centered
7+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.template_footer_headline
8+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.template_footer_links
9+
msgid "Mastodon"
10+
msgstr ""
11+
12+
#. module: website_company_mastodon_link
13+
#: model:ir.model.fields,field_description:website_company_mastodon_link.field_website__social_mastodon
14+
msgid "Mastodon Account"
15+
msgstr "Compte Mastodon"
16+
17+
#. module: website_company_mastodon_link
18+
#: model_terms:ir.ui.view,arch_db:website_company_mastodon_link.view_website_form
19+
msgid "Social Media"
20+
msgstr "Réseaux sociaux"
21+
22+
#. module: website_company_mastodon_link
23+
#: model:ir.model,name:website_company_mastodon_link.model_website
24+
msgid "Website"
25+
msgstr "Site Web"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import website
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2025 - Today: GRAP https://www.grap.coop
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3+
4+
from odoo import fields, models
5+
6+
7+
class Website(models.Model):
8+
_inherit = "website"
9+
10+
social_mastodon = fields.Char(
11+
"Mastodon Account", default=lambda x: x._default_social_mastodon()
12+
)
13+
14+
def _default_social_mastodon(self):
15+
return self.env.ref("base.main_company").social_mastodon
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Sylvain LE GAL \<<[email protected]>\>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This module adds Company Mastodon links on websites.
2+
3+
![website](../static/description/img/website.png)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* For unknown reason, if you make a change in the footer of the website,
2+
the mastodon icon is duplicated, and has to be removed manually.
3+
4+
* Change website form view to put `social_mastodon` field in 'Social Media'
5+
page, once https://github.com/odoo/odoo/pull/237668 is merged.
6+

0 commit comments

Comments
 (0)