Skip to content

Commit

Permalink
Merge PR #1764 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by alexis-via
  • Loading branch information
OCA-git-bot committed Dec 23, 2024
2 parents 686c172 + 148de35 commit f30fb3b
Show file tree
Hide file tree
Showing 16 changed files with 741 additions and 0 deletions.
116 changes: 116 additions & 0 deletions partner_disable_gravatar/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
========================
Partner Disable Gravatar
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8a15855fe9e00817f4cda5548ae132468644a31bed227be7a730a71dc3a41a61
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-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%2Fpartner--contact-lightgray.png?logo=github
:target: https://github.com/OCA/partner-contact/tree/17.0/partner_disable_gravatar
:alt: OCA/partner-contact
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_disable_gravatar
: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/partner-contact&target_branch=17.0
:alt: Try me on Runboat

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

A new feature has been introduced in Odoo v10 in the *base* module: when
you enter an email address in the form view of a partner, Odoo will send
a query to `gravatar.com <https://www.gravatar.com/>`__ to get a picture
corresponding to the email address.

`Gravatar <//www.gravatar.com/>`__, which stands for *Globally
Recognized Avatar*, is a website where any user can open an account and
register a correspondance between his email address and a picture. That
way, his picture/avatar will be automatically set on all websites that
are connected to gravatar.com: he won't have to manually configure his
picture/avatar on every website.

In Odoo, when you enter an email address in the form view of a partner
(i.e. triggered via the *onchange* on the *email* field) and this
partner doesn't have any image yet in Odoo, Odoo will automatically send
an HTTPS query to
[`www.gravatar.com](https://www.gravatar.com/) <http://www.gravatar.com](https://www.gravatar.com/)>`__
with an MD5 hash of the email of the partner. If it receives an answer
from gravatar.com in the form of a picture within the 5 seconds timeout,
it will set this picture on the *image* field of the partner in Odoo.

Some people may consider it as a cool feature to easily get picture on
partners with no effort.

But other people may consider this as an annoying feature that adds
unnecessary network trafic or, worse, as a leak of information. With
this feature, gravatar.com is notified of all the email addresses added
in the Odoo database, so it may be considered as a leak of information
to a third party company (gravatar.com is operated by `Automattic
Inc. <https://automattic.com/contact/>`__, an American company). The
problem is that there is no way to disable this feature via a
configuration parameter of Odoo. This module brings a solution to this
problem: once installed, it disables the feature.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/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/partner-contact/issues/new?body=module:%20partner_disable_gravatar%0Aversion:%2017.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
-------

* Akretion

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

- Alexis de Lattre <[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.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/17.0/partner_disable_gravatar>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions partner_disable_gravatar/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions partner_disable_gravatar/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2018-2020 Akretion France (https://akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Partner Disable Gravatar",
"version": "17.0.1.0.0",
"category": "Tools",
"license": "AGPL-3",
"summary": "Disable automatic connection to gravatar.com",
"author": "Akretion, Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/partner-contact",
"depends": ["web"],
"installable": True,
}
22 changes: 22 additions & 0 deletions partner_disable_gravatar/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_disable_gravatar
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-11-04 14:44+0000\n"
"Last-Translator: Maria Sparenberg <[email protected]>\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: partner_disable_gravatar
#: model:ir.model,name:partner_disable_gravatar.model_res_partner
msgid "Contact"
msgstr "Kontakt"
22 changes: 22 additions & 0 deletions partner_disable_gravatar/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_disable_gravatar
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-06 15:39+0000\n"
"Last-Translator: Rémi <[email protected]>\n"
"Language-Team: none\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: partner_disable_gravatar
#: model:ir.model,name:partner_disable_gravatar.model_res_partner
msgid "Contact"
msgstr "Contact"
31 changes: 31 additions & 0 deletions partner_disable_gravatar/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_disable_gravatar
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-12-13 00:44+0000\n"
"Last-Translator: Sergio Zanchetta <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: partner_disable_gravatar
#: model:ir.model,name:partner_disable_gravatar.model_res_partner
msgid "Contact"
msgstr "Contatto"

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
19 changes: 19 additions & 0 deletions partner_disable_gravatar/i18n/partner_disable_gravatar.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_disable_gravatar
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: partner_disable_gravatar
#: model:ir.model,name:partner_disable_gravatar.model_res_partner
msgid "Contact"
msgstr ""
1 change: 1 addition & 0 deletions partner_disable_gravatar/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_partner
12 changes: 12 additions & 0 deletions partner_disable_gravatar/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2018-2020 Akretion France (https://akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models


class ResPartner(models.Model):
_inherit = "res.partner"

def _get_gravatar_image(self, email):
return False
3 changes: 3 additions & 0 deletions partner_disable_gravatar/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions partner_disable_gravatar/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Alexis de Lattre \<<[email protected]>\>
32 changes: 32 additions & 0 deletions partner_disable_gravatar/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
A new feature has been introduced in Odoo v10 in the *base* module: when
you enter an email address in the form view of a partner, Odoo will send
a query to [gravatar.com](https://www.gravatar.com/) to get a picture
corresponding to the email address.

[Gravatar](//www.gravatar.com/), which stands for *Globally Recognized
Avatar*, is a website where any user can open an account and register a
correspondance between his email address and a picture. That way, his
picture/avatar will be automatically set on all websites that are
connected to gravatar.com: he won't have to manually configure his
picture/avatar on every website.

In Odoo, when you enter an email address in the form view of a partner
(i.e. triggered via the *onchange* on the *email* field) and this
partner doesn't have any image yet in Odoo, Odoo will automatically send
an HTTPS query to [www.gravatar.com](https://www.gravatar.com/) with an
MD5 hash of the email of the partner. If it receives an answer from
gravatar.com in the form of a picture within the 5 seconds timeout, it
will set this picture on the *image* field of the partner in Odoo.

Some people may consider it as a cool feature to easily get picture on
partners with no effort.

But other people may consider this as an annoying feature that adds
unnecessary network trafic or, worse, as a leak of information. With
this feature, gravatar.com is notified of all the email addresses added
in the Odoo database, so it may be considered as a leak of information
to a third party company (gravatar.com is operated by [Automattic
Inc.](https://automattic.com/contact/), an American company). The
problem is that there is no way to disable this feature via a
configuration parameter of Odoo. This module brings a solution to this
problem: once installed, it disables the feature.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f30fb3b

Please sign in to comment.