Skip to content

Commit

Permalink
[IMP] mail_environment_google_gmail: pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SilvioC2C committed Oct 14, 2024
1 parent 9021865 commit d01b91d
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 77 deletions.
65 changes: 35 additions & 30 deletions mail_environment_google_gmail/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Mail configuration with server_environment for Google Gmail
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
:target: https://github.com/OCA/server-env/tree/15.0/mail_environment_google_gmail
:target: https://github.com/OCA/server-env/tree/17.0/mail_environment_google_gmail
:alt: OCA/server-env
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-env-15-0/server-env-15-0-mail_environment_google_gmail
:target: https://translation.odoo-community.org/projects/server-env-17-0/server-env-17-0-mail_environment_google_gmail
: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/server-env&target_branch=15.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -38,62 +38,67 @@ This module allows to configure Gmail outgoing servers with server-env.
Configuration
=============

Example of config file ::
Example of config file :

[ir.config_parameter]
google_gmail_client_id = YOUR_GMAIL_API_CLIENT_ID
google_gmail_client_secret = YOUR_GMAIL_API_CLIENT_SECRET
::

[outgoing_mail.gmail_smtp_server]
smtp_host = smtp.gmail.com
smtp_port = 587
smtp_user = example@gmail.com
smtp_encryption = starttls
use_google_gmail_service = True
google_gmail_authorization_code = YOUR_ACCOUNT_AUTH_CODE
google_gmail_refresh_token = YOUR_REFRESH_TOKEN
[ir.config_parameter]
google_gmail_client_id = YOUR_GMAIL_API_CLIENT_ID
google_gmail_client_secret = YOUR_GMAIL_API_CLIENT_SECRET

[outgoing_mail.gmail_smtp_server]
smtp_host = smtp.gmail.com
smtp_port = 587
smtp_user = example@gmail.com
smtp_encryption = starttls
use_google_gmail_service = True
google_gmail_authorization_code = YOUR_ACCOUNT_AUTH_CODE
google_gmail_refresh_token = YOUR_REFRESH_TOKEN

These two are global parameters, in core they're configured in General
Settings:

These two are global parameters, in core they're configured in General Settings:

* `YOUR_GMAIL_API_CLIENT_ID`: The client ID of your Google API project.
* `YOUR_GMAIL_API_CLIENT_SECRET`: The client secret of your Google API project.
- \`YOUR_GMAIL_API_CLIENT_ID\`: The client ID of your Google API
project.
- \`YOUR_GMAIL_API_CLIENT_SECRET\`: The client secret of your Google
API project.

These two are account-specific parameters:

* `YOUR_ACCOUNT_AUTH_CODE`: In core, there's a button that opens an URL to generate it.
* `YOUR_REFRESH_TOKEN`: In core, it's generated automatically when the
`google_gmail_authorization_code` is written. It's not shown on the form, but I recommend
having Odoo generate it and extract it from there, before setting up the server-env.
- \`YOUR_ACCOUNT_AUTH_CODE\`: In core, there's a button that opens an
URL to generate it.
- \`YOUR_REFRESH_TOKEN\`: In core, it's generated automatically when
the google_gmail_authorization_code is written. It's not shown on the
form, but I recommend having Odoo generate it and extract it from
there, before setting up the server-env.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/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/server-env/issues/new?body=module:%20mail_environment_google_gmail%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20mail_environment_google_gmail%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
~~~~~~~
-------

* Camptocamp

Contributors
~~~~~~~~~~~~
------------

* `Camptocamp <https://www.camptocamp.com>`_
- `Camptocamp <https://www.camptocamp.com>`__

* Iván Todorovich <ivan.todorovich@camptocamp.com>
- Iván Todorovich <ivan.todorovich@camptocamp.com>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -113,6 +118,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ivantodorovich|

This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/15.0/mail_environment_google_gmail>`_ project on GitHub.
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/17.0/mail_environment_google_gmail>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions mail_environment_google_gmail/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
31 changes: 31 additions & 0 deletions mail_environment_google_gmail/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Example of config file :

[ir.config_parameter]
google_gmail_client_id = YOUR_GMAIL_API_CLIENT_ID
google_gmail_client_secret = YOUR_GMAIL_API_CLIENT_SECRET

[outgoing_mail.gmail_smtp_server]
smtp_host = smtp.gmail.com
smtp_port = 587
smtp_user = example@gmail.com
smtp_encryption = starttls
use_google_gmail_service = True
google_gmail_authorization_code = YOUR_ACCOUNT_AUTH_CODE
google_gmail_refresh_token = YOUR_REFRESH_TOKEN

These two are global parameters, in core they're configured in General
Settings:

- \`YOUR_GMAIL_API_CLIENT_ID\`: The client ID of your Google API
project.
- \`YOUR_GMAIL_API_CLIENT_SECRET\`: The client secret of your Google API
project.

These two are account-specific parameters:

- \`YOUR_ACCOUNT_AUTH_CODE\`: In core, there's a button that opens an
URL to generate it.
- \`YOUR_REFRESH_TOKEN\`: In core, it's generated automatically when the
google_gmail_authorization_code is written. It's not shown on the
form, but I recommend having Odoo generate it and extract it from
there, before setting up the server-env.
28 changes: 0 additions & 28 deletions mail_environment_google_gmail/readme/CONFIGURE.rst

This file was deleted.

3 changes: 3 additions & 0 deletions mail_environment_google_gmail/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Camptocamp](https://www.camptocamp.com)

> - Iván Todorovich \<<ivan.todorovich@camptocamp.com>\>
3 changes: 0 additions & 3 deletions mail_environment_google_gmail/readme/CONTRIBUTORS.rst

This file was deleted.

39 changes: 23 additions & 16 deletions mail_environment_google_gmail/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Mail configuration with server_environment for Google Gmail</h
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5635acb0fde6b9d916f7ce3b6c1bab560bc579f1b3c80f918ce67fc5c2555ed9
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/15.0/mail_environment_google_gmail"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-15-0/server-env-15-0-mail_environment_google_gmail"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-env&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-env/tree/17.0/mail_environment_google_gmail"><img alt="OCA/server-env" src="https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-env-17-0/server-env-17-0-mail_environment_google_gmail"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-env&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to configure Gmail outgoing servers with server-env.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -386,7 +386,7 @@ <h1 class="title">Mail configuration with server_environment for Google Gmail</h
</div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>Example of config file</p>
<p>Example of config file :</p>
<pre class="literal-block">
[ir.config_parameter]
google_gmail_client_id = YOUR_GMAIL_API_CLIENT_ID
Expand All @@ -401,25 +401,30 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
google_gmail_authorization_code = YOUR_ACCOUNT_AUTH_CODE
google_gmail_refresh_token = YOUR_REFRESH_TOKEN
</pre>
<p>These two are global parameters, in core they’re configured in General Settings:</p>
<p>These two are global parameters, in core they’re configured in General
Settings:</p>
<ul class="simple">
<li><cite>YOUR_GMAIL_API_CLIENT_ID</cite>: The client ID of your Google API project.</li>
<li><cite>YOUR_GMAIL_API_CLIENT_SECRET</cite>: The client secret of your Google API project.</li>
<li>`YOUR_GMAIL_API_CLIENT_ID`: The client ID of your Google API
project.</li>
<li>`YOUR_GMAIL_API_CLIENT_SECRET`: The client secret of your Google
API project.</li>
</ul>
<p>These two are account-specific parameters:</p>
<ul class="simple">
<li><cite>YOUR_ACCOUNT_AUTH_CODE</cite>: In core, there’s a button that opens an URL to generate it.</li>
<li><cite>YOUR_REFRESH_TOKEN</cite>: In core, it’s generated automatically when the
<cite>google_gmail_authorization_code</cite> is written. It’s not shown on the form, but I recommend
having Odoo generate it and extract it from there, before setting up the server-env.</li>
<li>`YOUR_ACCOUNT_AUTH_CODE`: In core, there’s a button that opens an
URL to generate it.</li>
<li>`YOUR_REFRESH_TOKEN`: In core, it’s generated automatically when
the google_gmail_authorization_code is written. It’s not shown on the
form, but I recommend having Odoo generate it and extract it from
there, before setting up the server-env.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-env/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20mail_environment_google_gmail%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/server-env/issues/new?body=module:%20mail_environment_google_gmail%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -445,13 +450,15 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/ivantodorovich"><img alt="ivantodorovich" src="https://github.com/ivantodorovich.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/15.0/mail_environment_google_gmail">OCA/server-env</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-env/tree/17.0/mail_environment_google_gmail">OCA/server-env</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down

0 comments on commit d01b91d

Please sign in to comment.