From 2325791bf05caac38034af4d474bef9fd2d3d3aa Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 2 Mar 2026 12:52:47 +0000 Subject: [PATCH 01/31] [UPD] Update mail_gateway_whatsapp.pot --- README.md | 2 +- mail_gateway_whatsapp/README.rst | 8 ++- mail_gateway_whatsapp/__manifest__.py | 2 +- mail_gateway_whatsapp/i18n/es.po | 68 +++++++++++++++++++ mail_gateway_whatsapp/i18n/it.po | 68 +++++++++++++++++++ .../i18n/mail_gateway_whatsapp.pot | 65 ++++++++++++++++++ .../static/description/index.html | 38 ++++++----- 7 files changed, 231 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 53b27cc1b8..351e4679d9 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ addon | version | maintainers | summary [mail_activity_unlink_log](mail_activity_unlink_log/) | 18.0.1.0.0 | | Leave a message when an activity is unlinked [mail_gateway](mail_gateway/) | 18.0.1.0.7 | | Base module for gateway communications [mail_gateway_telegram](mail_gateway_telegram/) | 18.0.1.0.0 | | Set a gateway for telegram -[mail_gateway_whatsapp](mail_gateway_whatsapp/) | 18.0.2.0.0 | | Set a gateway for whatsapp +[mail_gateway_whatsapp](mail_gateway_whatsapp/) | 18.0.2.1.0 | | Set a gateway for WhatsApp [mail_notification_with_history](mail_notification_with_history/) | 18.0.1.0.0 | TDu | Add the previous chatter discussion into new email notifications. [mail_thread_create_nolog](mail_thread_create_nolog/) | 18.0.1.0.2 | sebalix | Display a fake (non-stored) create log in the chatter. [res_company_mastodon_link](res_company_mastodon_link/) | 18.0.1.0.0 | legalsylvain | Add mastodon url at company model diff --git a/mail_gateway_whatsapp/README.rst b/mail_gateway_whatsapp/README.rst index c1784fe572..f861b57126 100644 --- a/mail_gateway_whatsapp/README.rst +++ b/mail_gateway_whatsapp/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ===================== Mail Whatsapp Gateway ===================== @@ -7,13 +11,13 @@ Mail Whatsapp Gateway !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:4ee06a5c364db930d1fedaefa2e7057e0e138c11172ea18628d563590879339a + !! source digest: sha256:84112b6980c403a273849337ad1f8850e107cb28eea26a01d73d862faa849019 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |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 diff --git a/mail_gateway_whatsapp/__manifest__.py b/mail_gateway_whatsapp/__manifest__.py index e4a8401119..b5ca799d40 100644 --- a/mail_gateway_whatsapp/__manifest__.py +++ b/mail_gateway_whatsapp/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Mail Whatsapp Gateway", "summary": "Set a gateway for WhatsApp", - "version": "18.0.2.0.0", + "version": "18.0.2.1.0", "license": "AGPL-3", "author": "Creu Blanca, Dixmit, Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", diff --git a/mail_gateway_whatsapp/i18n/es.po b/mail_gateway_whatsapp/i18n/es.po index 1d6c42b17a..deaf2509be 100644 --- a/mail_gateway_whatsapp/i18n/es.po +++ b/mail_gateway_whatsapp/i18n/es.po @@ -481,6 +481,7 @@ msgstr "" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__gateway_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_whatsapp_composer__gateway_id +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form msgid "Gateway" msgstr "Gateway" @@ -629,6 +630,11 @@ msgstr "" msgid "Indonesian" msgstr "" +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "Insert here the Jinja expression to get the partner ID" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__ga msgid "Irish" @@ -872,6 +878,11 @@ msgstr "" msgid "Only dynamic urls may have a placeholder." msgstr "" +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "Partner" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__state__paused msgid "Paused" @@ -1022,6 +1033,14 @@ msgstr "Enviar" msgid "Send Whatsapp Message" msgstr "Envíe un mensaje de Whatsapp" +#. module: mail_gateway_whatsapp +#. odoo-python +#: code:addons/mail_gateway_whatsapp/models/ir_actions_server.py:0 +msgid "" +"Sending WhatsApp message can only be done on a non transient mail.thread " +"model" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__sequence msgid "Sequence" @@ -1032,6 +1051,11 @@ msgstr "" msgid "Serbian" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model,name:mail_gateway_whatsapp.model_ir_actions_server +msgid "Server Action" +msgstr "" + #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view msgid "Setting webhook and version" @@ -1183,10 +1207,30 @@ msgid "Turkish" msgstr "" #. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__state +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__state #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__button_type msgid "Type" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,help:mail_gateway_whatsapp.field_ir_actions_server__state +#: model:ir.model.fields,help:mail_gateway_whatsapp.field_ir_cron__state +msgid "" +"Type of server action. The following values are available:\n" +"- 'Update a Record': update the values of a record\n" +"- 'Create Activity': create an activity (Discuss)\n" +"- 'Send Email': post a message, a note or send an email (Discuss)\n" +"- 'Send SMS': send SMS, log them on documents (SMS)- 'Add/Remove Followers': " +"add or remove followers to a record (Discuss)\n" +"- 'Create Record': create a new record with new values\n" +"- 'Execute Code': a block of Python code that will be executed\n" +"- 'Send Webhook Notification': send a POST request to an external system, " +"also known as a Webhook\n" +"- 'Execute Existing Actions': define an action that triggers several other " +"server actions\n" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__uk msgid "Ukrainian" @@ -1306,6 +1350,16 @@ msgstr "" msgid "WhatsApp Templates" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__ir_actions_server__state__whatsapp +msgid "WhatsApp message" +msgstr "" + +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "WhatsApp template" +msgstr "" + #. module: mail_gateway_whatsapp #. odoo-javascript #: code:addons/mail_gateway_whatsapp/static/src/components/send_whatsapp_button/send_whatsapp_button.xml:0 @@ -1327,17 +1381,31 @@ msgstr "" msgid "Whatsapp From Phone" msgstr "Teléfono origen de Whatsapp" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_gateway_id +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_gateway_id +msgid "Whatsapp Gateway" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_mail_gateway_whatsapp msgid "Whatsapp Gateway services" msgstr "Servicios de gateway de Whatsapp" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_partner +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_partner +msgid "Whatsapp Partner" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_gateway__whatsapp_security_key msgid "Whatsapp Security Key" msgstr "Clave de seguridad de Whatsapp" #. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_template_id +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_template_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_compose_gateway_message__whatsapp_template_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_gateway__whatsapp_template_ids msgid "Whatsapp Template" diff --git a/mail_gateway_whatsapp/i18n/it.po b/mail_gateway_whatsapp/i18n/it.po index d5808bc5bf..7a8e0c6c1b 100644 --- a/mail_gateway_whatsapp/i18n/it.po +++ b/mail_gateway_whatsapp/i18n/it.po @@ -481,6 +481,7 @@ msgstr "Francese" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__gateway_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_whatsapp_composer__gateway_id +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form msgid "Gateway" msgstr "Gateway" @@ -630,6 +631,11 @@ msgstr "" msgid "Indonesian" msgstr "Indonesiano" +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "Insert here the Jinja expression to get the partner ID" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__ga msgid "Irish" @@ -873,6 +879,11 @@ msgstr "" msgid "Only dynamic urls may have a placeholder." msgstr "" +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "Partner" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__state__paused msgid "Paused" @@ -1021,6 +1032,14 @@ msgstr "Invia" msgid "Send Whatsapp Message" msgstr "Invia messaggio Whatsapp" +#. module: mail_gateway_whatsapp +#. odoo-python +#: code:addons/mail_gateway_whatsapp/models/ir_actions_server.py:0 +msgid "" +"Sending WhatsApp message can only be done on a non transient mail.thread " +"model" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__sequence msgid "Sequence" @@ -1031,6 +1050,11 @@ msgstr "" msgid "Serbian" msgstr "Serbo" +#. module: mail_gateway_whatsapp +#: model:ir.model,name:mail_gateway_whatsapp.model_ir_actions_server +msgid "Server Action" +msgstr "" + #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view msgid "Setting webhook and version" @@ -1184,10 +1208,30 @@ msgid "Turkish" msgstr "Turco" #. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__state +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__state #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__button_type msgid "Type" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,help:mail_gateway_whatsapp.field_ir_actions_server__state +#: model:ir.model.fields,help:mail_gateway_whatsapp.field_ir_cron__state +msgid "" +"Type of server action. The following values are available:\n" +"- 'Update a Record': update the values of a record\n" +"- 'Create Activity': create an activity (Discuss)\n" +"- 'Send Email': post a message, a note or send an email (Discuss)\n" +"- 'Send SMS': send SMS, log them on documents (SMS)- 'Add/Remove Followers': " +"add or remove followers to a record (Discuss)\n" +"- 'Create Record': create a new record with new values\n" +"- 'Execute Code': a block of Python code that will be executed\n" +"- 'Send Webhook Notification': send a POST request to an external system, " +"also known as a Webhook\n" +"- 'Execute Existing Actions': define an action that triggers several other " +"server actions\n" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__uk msgid "Ukrainian" @@ -1307,6 +1351,16 @@ msgstr "" msgid "WhatsApp Templates" msgstr "Modelli WathsApp" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__ir_actions_server__state__whatsapp +msgid "WhatsApp message" +msgstr "" + +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "WhatsApp template" +msgstr "" + #. module: mail_gateway_whatsapp #. odoo-javascript #: code:addons/mail_gateway_whatsapp/static/src/components/send_whatsapp_button/send_whatsapp_button.xml:0 @@ -1328,17 +1382,31 @@ msgstr "Compositore Whattsapp" msgid "Whatsapp From Phone" msgstr "Whatsapp da telefono" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_gateway_id +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_gateway_id +msgid "Whatsapp Gateway" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_mail_gateway_whatsapp msgid "Whatsapp Gateway services" msgstr "Servizi gateway Whatsapp" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_partner +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_partner +msgid "Whatsapp Partner" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_gateway__whatsapp_security_key msgid "Whatsapp Security Key" msgstr "Chiave sicurezza Whatsapp" #. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_template_id +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_template_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_compose_gateway_message__whatsapp_template_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_gateway__whatsapp_template_ids msgid "Whatsapp Template" diff --git a/mail_gateway_whatsapp/i18n/mail_gateway_whatsapp.pot b/mail_gateway_whatsapp/i18n/mail_gateway_whatsapp.pot index dca9a23b2d..6f15c4c3af 100644 --- a/mail_gateway_whatsapp/i18n/mail_gateway_whatsapp.pot +++ b/mail_gateway_whatsapp/i18n/mail_gateway_whatsapp.pot @@ -466,6 +466,7 @@ msgstr "" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__gateway_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_whatsapp_composer__gateway_id +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form msgid "Gateway" msgstr "" @@ -595,6 +596,11 @@ msgstr "" msgid "Indonesian" msgstr "" +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "Insert here the Jinja expression to get the partner ID" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__ga msgid "Irish" @@ -831,6 +837,11 @@ msgstr "" msgid "Only dynamic urls may have a placeholder." msgstr "" +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "Partner" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__state__paused msgid "Paused" @@ -977,6 +988,14 @@ msgstr "" msgid "Send Whatsapp Message" msgstr "" +#. module: mail_gateway_whatsapp +#. odoo-python +#: code:addons/mail_gateway_whatsapp/models/ir_actions_server.py:0 +msgid "" +"Sending WhatsApp message can only be done on a non transient mail.thread " +"model" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__sequence msgid "Sequence" @@ -987,6 +1006,11 @@ msgstr "" msgid "Serbian" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model,name:mail_gateway_whatsapp.model_ir_actions_server +msgid "Server Action" +msgstr "" + #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view msgid "Setting webhook and version" @@ -1136,10 +1160,27 @@ msgid "Turkish" msgstr "" #. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__state +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__state #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__button_type msgid "Type" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,help:mail_gateway_whatsapp.field_ir_actions_server__state +#: model:ir.model.fields,help:mail_gateway_whatsapp.field_ir_cron__state +msgid "" +"Type of server action. The following values are available:\n" +"- 'Update a Record': update the values of a record\n" +"- 'Create Activity': create an activity (Discuss)\n" +"- 'Send Email': post a message, a note or send an email (Discuss)\n" +"- 'Send SMS': send SMS, log them on documents (SMS)- 'Add/Remove Followers': add or remove followers to a record (Discuss)\n" +"- 'Create Record': create a new record with new values\n" +"- 'Execute Code': a block of Python code that will be executed\n" +"- 'Send Webhook Notification': send a POST request to an external system, also known as a Webhook\n" +"- 'Execute Existing Actions': define an action that triggers several other server actions\n" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__uk msgid "Ukrainian" @@ -1259,6 +1300,16 @@ msgstr "" msgid "WhatsApp Templates" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__ir_actions_server__state__whatsapp +msgid "WhatsApp message" +msgstr "" + +#. module: mail_gateway_whatsapp +#: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form +msgid "WhatsApp template" +msgstr "" + #. module: mail_gateway_whatsapp #. odoo-javascript #: code:addons/mail_gateway_whatsapp/static/src/components/send_whatsapp_button/send_whatsapp_button.xml:0 @@ -1280,17 +1331,31 @@ msgstr "" msgid "Whatsapp From Phone" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_gateway_id +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_gateway_id +msgid "Whatsapp Gateway" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_mail_gateway_whatsapp msgid "Whatsapp Gateway services" msgstr "" +#. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_partner +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_partner +msgid "Whatsapp Partner" +msgstr "" + #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_gateway__whatsapp_security_key msgid "Whatsapp Security Key" msgstr "" #. module: mail_gateway_whatsapp +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_template_id +#: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_template_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_compose_gateway_message__whatsapp_template_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_gateway__whatsapp_template_ids msgid "Whatsapp Template" diff --git a/mail_gateway_whatsapp/static/description/index.html b/mail_gateway_whatsapp/static/description/index.html index 26a161d2a3..966c8026ed 100644 --- a/mail_gateway_whatsapp/static/description/index.html +++ b/mail_gateway_whatsapp/static/description/index.html @@ -3,7 +3,7 @@ -Mail Whatsapp Gateway +README.rst -
-

Mail Whatsapp Gateway

+
+ + +Odoo Community Association + +
+

Mail Whatsapp Gateway

-

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

This module allows to respond whatsapp chats.

This way, a group of users can respond customers or any other set of partners in an integrated way.

@@ -394,9 +399,9 @@

Mail Whatsapp Gateway

-

Configuration

+

Configuration

-

First steps

+

First steps

You need to create a WhatsApp Business Account (WABA), a Meta App and define a phone number. You can follow this steps.

@@ -405,7 +410,7 @@

First steps

In order to make the webhook accessible, the system must be public.

-

Configure the gateway

+

Configure the gateway

Once you have created the Meta App, you need to add the gateway and webhook. In order to make it you must follow this steps:

-

Usage

+

Usage

  1. Access Gateway
  2. Wait until someone starts a conversation.
  3. @@ -446,7 +451,7 @@

    Usage

-

Known issues / Roadmap

+

Known issues / Roadmap

WhatsApp templates

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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 @@ -462,16 +467,16 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Creu Blanca
  • Dixmit
-

Contributors

+

Contributors

-

Other credits

+

Other credits

This work has been funded by AEOdoo (Asociación Española de Odoo - https://www.aeodoo.org)

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -505,5 +510,6 @@

Maintainers

+
From 4ade4f83861d032585df432257517167c9bf17a2 Mon Sep 17 00:00:00 2001 From: mymage Date: Mon, 2 Mar 2026 13:12:09 +0000 Subject: [PATCH 02/31] Translated using Weblate (Italian) Currently translated at 100.0% (254 of 254 strings) Translation: social-18.0/social-18.0-mail_gateway_whatsapp Translate-URL: https://translation.odoo-community.org/projects/social-18-0/social-18-0-mail_gateway_whatsapp/it/ --- mail_gateway_whatsapp/i18n/it.po | 117 ++++++++++++++++++------------- 1 file changed, 70 insertions(+), 47 deletions(-) diff --git a/mail_gateway_whatsapp/i18n/it.po b/mail_gateway_whatsapp/i18n/it.po index 7a8e0c6c1b..164159c946 100644 --- a/mail_gateway_whatsapp/i18n/it.po +++ b/mail_gateway_whatsapp/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-01-09 13:06+0000\n" +"PO-Revision-Date: 2026-03-02 18:45+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.6.2\n" +"X-Generator: Weblate 5.15.2\n" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view @@ -37,19 +37,19 @@ msgstr "" #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "A maximum of 1 Call Number button is allowed." -msgstr "" +msgstr "È consentito al massimo un solo pulsante di chiamata numero." #. module: mail_gateway_whatsapp #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "A maximum of 10 buttons is allowed." -msgstr "" +msgstr "È consentito un massimo di 10 pulsanti." #. module: mail_gateway_whatsapp #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "A maximum of 2 URL buttons is allowed." -msgstr "" +msgstr "È consentito un massimo di due pulsanti URL." #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view @@ -100,12 +100,12 @@ msgstr "Albanese" #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "All dynamic urls must have a placeholder." -msgstr "" +msgstr "Tutti gli URL dinamici devono avere un segnaposto." #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__model_id msgid "Applies to" -msgstr "" +msgstr "Si applica a" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__state__approved @@ -175,6 +175,7 @@ msgstr "Richiesto il contenuto" #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "Body variables should start at 1 and not skip any number, missing %d" msgstr "" +"Le variabili del corpo devono iniziare da 1 e non saltare numeri, manca %d" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__bg @@ -185,35 +186,35 @@ msgstr "Bulgaro" #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_variable__button_id #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template_variable__line_type__button msgid "Button" -msgstr "" +msgstr "Pulsante" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__name msgid "Button Text" -msgstr "" +msgstr "Testo pulsante" #. module: mail_gateway_whatsapp #: model:ir.model.constraint,message:mail_gateway_whatsapp.constraint_mail_whatsapp_template_button_unique_name_per_template msgid "Button name must be unique by template" -msgstr "" +msgstr "Il nome pulsante deve essere univoco per modello" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__button_ids #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.view_mail_whatsapp_template_form msgid "Buttons" -msgstr "" +msgstr "Pulsanti" #. module: mail_gateway_whatsapp #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "Buttons may only contain one placeholder." -msgstr "" +msgstr "I pulsanti possono contenere un solo segnaposto." #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__call_number #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template_button__button_type__phone_number msgid "Call Number" -msgstr "" +msgstr "Numero chiamata" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.whatsapp_composer_form_view @@ -386,7 +387,7 @@ msgstr "Olandese" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template_button__url_type__dynamic msgid "Dynamic" -msgstr "" +msgstr "Dinamico" #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_mail_thread @@ -421,13 +422,15 @@ msgstr "Esporta modello" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_variable__field_name msgid "Field" -msgstr "" +msgstr "Campo" #. module: mail_gateway_whatsapp #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "Field template variables %(variables)s must be associated with a field." msgstr "" +"Le variabili modello campo %(variables)s devono essere associate con un " +"campo." #. module: mail_gateway_whatsapp #: model:ir.model.fields,help:mail_gateway_whatsapp.field_res_partner__phone_sanitized @@ -634,7 +637,7 @@ msgstr "Indonesiano" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form msgid "Insert here the Jinja expression to get the partner ID" -msgstr "" +msgstr "Inserire qui l'espressione Jinja per ottenere l'ID del partner" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__ga @@ -730,7 +733,7 @@ msgstr "Limite superato" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_variable__line_type msgid "Line Type" -msgstr "" +msgstr "Tipo riga" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__lt @@ -806,7 +809,7 @@ msgstr "Il tipo MIME no è valido" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_variable__model msgid "Model Name" -msgstr "" +msgstr "Nome modello" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__name @@ -877,12 +880,12 @@ msgstr "" #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "Only dynamic urls may have a placeholder." -msgstr "" +msgstr "Solo gli URL dinamici devono avere un segnaposto." #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form msgid "Partner" -msgstr "" +msgstr "Partner" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__state__paused @@ -923,13 +926,13 @@ msgstr "Telefono/cellulare" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_variable__name msgid "Placeholder" -msgstr "" +msgstr "Segnaposto" #. module: mail_gateway_whatsapp #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "Please enter a valid URL in the format 'https://www.example.com'." -msgstr "" +msgstr "Inserire un URL valido nel formato 'https://www.example.com'." #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__pl @@ -959,7 +962,7 @@ msgstr "Punjabi" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template_button__button_type__quick_reply msgid "Quick Reply" -msgstr "" +msgstr "Risposta rapida" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__state__rejected @@ -969,7 +972,7 @@ msgstr "Respinto" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__model msgid "Related model" -msgstr "" +msgstr "Modello correlato" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__ro @@ -984,7 +987,7 @@ msgstr "Russo" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_variable__sample_value msgid "Sample Value" -msgstr "" +msgstr "Valore esempio" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_res_partner__phone_sanitized @@ -1039,11 +1042,13 @@ msgid "" "Sending WhatsApp message can only be done on a non transient mail.thread " "model" msgstr "" +"L'invio di un messaggio WhatsApp può essere fatto solo in un modello " +"mail.thread non transitorio" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__sequence msgid "Sequence" -msgstr "" +msgstr "Sequenza" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__sr @@ -1053,7 +1058,7 @@ msgstr "Serbo" #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_ir_actions_server msgid "Server Action" -msgstr "" +msgstr "Azione server" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view @@ -1113,7 +1118,7 @@ msgstr "Stato" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template_button__url_type__static msgid "Static" -msgstr "" +msgstr "Statica" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__sw @@ -1170,6 +1175,8 @@ msgid "" "Template variable should be in format {{number}}. Cannot parse '%" "(placeholder)s'" msgstr "" +"La variabile modello dovrebbe essere nel formato {{number}}. Impossibile " +"decodificare '%(placeholder)s'" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view @@ -1185,13 +1192,13 @@ msgstr "Tailandese" #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "The placeholder for a button can only be {{1}}." -msgstr "" +msgstr "Il segnaposto per un pulsante può essere solo {{1}}." #. module: mail_gateway_whatsapp #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "There should be exactly 1 variable in the header." -msgstr "" +msgstr "Deve esserci solo una variabile nella testata." #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.view_mail_whatsapp_template_form @@ -1212,7 +1219,7 @@ msgstr "Turco" #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__state #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__button_type msgid "Type" -msgstr "" +msgstr "Tipo" #. module: mail_gateway_whatsapp #: model:ir.model.fields,help:mail_gateway_whatsapp.field_ir_actions_server__state @@ -1231,6 +1238,20 @@ msgid "" "- 'Execute Existing Actions': define an action that triggers several other " "server actions\n" msgstr "" +"Tipi si azioni server. Sono disponibili i seguenti valori:\n" +"- 'Aggiorna record': aggiorna il valore di un record\n" +"- 'Crea attività': crea una attività (Discussione)\n" +"- 'Invia e.mail': inserisce un messaggio, una nota o invia una e-mail " +"(Discussione)\n" +"- 'Invia SMS': invia SMS, ne tiene traccia nei documenti (SMS)\n" +"- 'Aggiungi/rimuovi chi segue': aggiunge o rimuove chi segue un record " +"(Discussione)\n" +"- 'Crea record': crea un nuovo record con valori nuovi\n" +"- 'Esegui codice': un blocco di codice Python che verrà eseguito\n" +"- 'Invia notifica webhook': invia una richiesta POST ad un sistema esterno, " +"conosciuto come un webhook\n" +"- 'Esegue azioni esistenti': definisce una azione che esegue diverse altre " +"azioni\n" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__uk @@ -1251,7 +1272,7 @@ msgstr "Urdu" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__url_type msgid "Url Type" -msgstr "" +msgstr "Tipo URL" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__category__utility @@ -1266,24 +1287,24 @@ msgstr "Uzbeco" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__variable_ids msgid "Variable" -msgstr "" +msgstr "Variabile" #. module: mail_gateway_whatsapp #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "Variable in the header should be used as {{1}}" -msgstr "" +msgstr "La variabile in testata dovrebbe essere usata come {{1}}" #. module: mail_gateway_whatsapp #: model:ir.model.constraint,message:mail_gateway_whatsapp.constraint_mail_whatsapp_template_variable_name_type_template_unique msgid "Variable names must be unique by template" -msgstr "" +msgstr "I nomi delle variabili devono essere univoci per modello" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template__variable_ids #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.view_mail_whatsapp_template_form msgid "Variables" -msgstr "" +msgstr "Variabili" #. module: mail_gateway_whatsapp #. odoo-python @@ -1292,6 +1313,8 @@ msgid "" "Variables %(field_names)s do not seem to be valid field path for model %" "(model_name)s." msgstr "" +"Le variabili %(field_names)s non sembrano essere percorsi campo validi per " +"il modello %(model_name)s." #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view @@ -1306,7 +1329,7 @@ msgstr "Vietnamita" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template_button__button_type__url msgid "Visit Website" -msgstr "" +msgstr "Visita sito web" #. module: mail_gateway_whatsapp #. odoo-python @@ -1318,12 +1341,12 @@ msgstr "Modelli WathsApp" #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "We were not able to fetch value of field: %(field)s" -msgstr "" +msgstr "Non si è riusciti a ottenere il valore del campo: %(field)s" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_whatsapp_template_button__website_url msgid "Website Url" -msgstr "" +msgstr "URL sito web" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_gateway__gateway_type__whatsapp @@ -1339,12 +1362,12 @@ msgstr "Per importare i modelli è richiesto l'account WathsApp." #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_mail_whatsapp_template_button msgid "WhatsApp Template Button" -msgstr "" +msgstr "Pulsante modello WhatsApp" #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_mail_whatsapp_template_variable msgid "WhatsApp Template Variable" -msgstr "" +msgstr "Variabile modello WhatsApp" #. module: mail_gateway_whatsapp #: model:ir.actions.act_window,name:mail_gateway_whatsapp.action_mail_whatsapp_template_gateway @@ -1354,12 +1377,12 @@ msgstr "Modelli WathsApp" #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__ir_actions_server__state__whatsapp msgid "WhatsApp message" -msgstr "" +msgstr "Messaggio WhatsApp" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.ir_actions_server_view_form msgid "WhatsApp template" -msgstr "" +msgstr "Modello WathsApp" #. module: mail_gateway_whatsapp #. odoo-javascript @@ -1386,7 +1409,7 @@ msgstr "Whatsapp da telefono" #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_gateway_id #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_gateway_id msgid "Whatsapp Gateway" -msgstr "" +msgstr "Gateway WhatsApp" #. module: mail_gateway_whatsapp #: model:ir.model,name:mail_gateway_whatsapp.model_mail_gateway_whatsapp @@ -1397,7 +1420,7 @@ msgstr "Servizi gateway Whatsapp" #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_actions_server__whatsapp_partner #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_ir_cron__whatsapp_partner msgid "Whatsapp Partner" -msgstr "" +msgstr "Partner WhatsApp" #. module: mail_gateway_whatsapp #: model:ir.model.fields,field_description:mail_gateway_whatsapp.field_mail_gateway__whatsapp_security_key @@ -1431,7 +1454,7 @@ msgstr "Informazioni configurazione Whatsapp" #. odoo-python #: code:addons/mail_gateway_whatsapp/models/mail_whatsapp_template.py:0 msgid "You can not select field of %(model)s." -msgstr "" +msgstr "Non si può selezionare il campo del modello %(model)s." #. module: mail_gateway_whatsapp #: model:ir.model.fields.selection,name:mail_gateway_whatsapp.selection__mail_whatsapp_template__language__zu @@ -1441,7 +1464,7 @@ msgstr "Zulu" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.view_mail_whatsapp_template_form msgid "e.g. https://www.example.com" -msgstr "" +msgstr "es. https://www.example.com" #. module: mail_gateway_whatsapp #: model_terms:ir.ui.view,arch_db:mail_gateway_whatsapp.mail_gateway_form_view From 1a0b388a90574d175567ac165b28510f1f060edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Tue, 18 Feb 2025 14:08:38 +0100 Subject: [PATCH 03/31] [ADD] mail_activity_cancel_tracking: New module TT55162 --- mail_activity_cancel_tracking/README.rst | 96 ++++ mail_activity_cancel_tracking/__init__.py | 1 + mail_activity_cancel_tracking/__manifest__.py | 19 + .../data/mail_template_data.xml | 25 + mail_activity_cancel_tracking/i18n/es.po | 37 ++ .../i18n/mail_activity_cancel_tracking.pot | 34 ++ .../models/__init__.py | 1 + .../models/mail_activity.py | 39 ++ mail_activity_cancel_tracking/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 3 + .../readme/DESCRIPTION.md | 1 + mail_activity_cancel_tracking/readme/USAGE.md | 4 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 438 ++++++++++++++++++ .../mail_activity_cancel_tracking.esm.js | 31 ++ .../tests/__init__.py | 4 + .../test_mail_activity_cancel_tracking.py | 34 ++ 17 files changed, 770 insertions(+) create mode 100644 mail_activity_cancel_tracking/README.rst create mode 100644 mail_activity_cancel_tracking/__init__.py create mode 100644 mail_activity_cancel_tracking/__manifest__.py create mode 100644 mail_activity_cancel_tracking/data/mail_template_data.xml create mode 100644 mail_activity_cancel_tracking/i18n/es.po create mode 100644 mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot create mode 100644 mail_activity_cancel_tracking/models/__init__.py create mode 100644 mail_activity_cancel_tracking/models/mail_activity.py create mode 100644 mail_activity_cancel_tracking/pyproject.toml create mode 100644 mail_activity_cancel_tracking/readme/CONTRIBUTORS.md create mode 100644 mail_activity_cancel_tracking/readme/DESCRIPTION.md create mode 100644 mail_activity_cancel_tracking/readme/USAGE.md create mode 100644 mail_activity_cancel_tracking/static/description/icon.png create mode 100644 mail_activity_cancel_tracking/static/description/index.html create mode 100644 mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js create mode 100644 mail_activity_cancel_tracking/tests/__init__.py create mode 100644 mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py diff --git a/mail_activity_cancel_tracking/README.rst b/mail_activity_cancel_tracking/README.rst new file mode 100644 index 0000000000..9357dae0a5 --- /dev/null +++ b/mail_activity_cancel_tracking/README.rst @@ -0,0 +1,96 @@ +============================= +Mail Activity Cancel Tracking +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:69b7d1df2aa6fb0c8233073fdbb3ea212fc9abca80d747cfc02332a6815275e6 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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%2Fsocial-lightgray.png?logo=github + :target: https://github.com/OCA/social/tree/17.0/mail_activity_cancel_tracking + :alt: OCA/social +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_activity_cancel_tracking + :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=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module leaves a message in the chatter when an activity is +cancelled. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +#. Go to a record that allows to record activities (Contacts for +example). #. Create an activity. #. Click on the "Cancel" button. #. A +message is added in the chatter indicating the details of the activity +that has been canceled. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa + +Contributors +------------ + +- [Tecnativa](https://www.tecnativa.com): + + - Víctor Martínez + - Pedro M. Baeza + +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-victoralmau| image:: https://github.com/victoralmau.png?size=40px + :target: https://github.com/victoralmau + :alt: victoralmau + +Current `maintainer `__: + +|maintainer-victoralmau| + +This module is part of the `OCA/social `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_activity_cancel_tracking/__init__.py b/mail_activity_cancel_tracking/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/mail_activity_cancel_tracking/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mail_activity_cancel_tracking/__manifest__.py b/mail_activity_cancel_tracking/__manifest__.py new file mode 100644 index 0000000000..1406a43eff --- /dev/null +++ b/mail_activity_cancel_tracking/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2025 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Mail Activity Cancel Tracking", + "author": "Tecnativa, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/social", + "version": "17.0.1.0.0", + "depends": ["mail"], + "license": "AGPL-3", + "category": "Social Network", + "installable": True, + "maintainers": ["victoralmau"], + "data": ["data/mail_template_data.xml"], + "assets": { + "web.assets_tests": [ + "mail_activity_cancel_tracking/static/tests/tours/**/*", + ] + }, +} diff --git a/mail_activity_cancel_tracking/data/mail_template_data.xml b/mail_activity_cancel_tracking/data/mail_template_data.xml new file mode 100644 index 0000000000..d849847107 --- /dev/null +++ b/mail_activity_cancel_tracking/data/mail_template_data.xml @@ -0,0 +1,25 @@ + + + + diff --git a/mail_activity_cancel_tracking/i18n/es.po b/mail_activity_cancel_tracking/i18n/es.po new file mode 100644 index 0000000000..ddd107ec35 --- /dev/null +++ b/mail_activity_cancel_tracking/i18n/es.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_activity_cancel_tracking +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-02-18 14:46+0000\n" +"PO-Revision-Date: 2025-02-18 14:46+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "(originally assigned to" +msgstr "" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "Original note:" +msgstr "" + +#. module: mail_activity_cancel_tracking +#: model:ir.model,name:mail_activity_cancel_tracking.model_mail_activity +msgid "Activity" +msgstr "Actividad" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "canceled" +msgstr "cancelada" diff --git a/mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot b/mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot new file mode 100644 index 0000000000..79731c98b3 --- /dev/null +++ b/mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_activity_cancel_tracking +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.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: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "(originally assigned to" +msgstr "" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "Original note:" +msgstr "" + +#. module: mail_activity_cancel_tracking +#: model:ir.model,name:mail_activity_cancel_tracking.model_mail_activity +msgid "Activity" +msgstr "" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "canceled" +msgstr "" diff --git a/mail_activity_cancel_tracking/models/__init__.py b/mail_activity_cancel_tracking/models/__init__.py new file mode 100644 index 0000000000..1ff3880296 --- /dev/null +++ b/mail_activity_cancel_tracking/models/__init__.py @@ -0,0 +1 @@ +from . import mail_activity diff --git a/mail_activity_cancel_tracking/models/mail_activity.py b/mail_activity_cancel_tracking/models/mail_activity.py new file mode 100644 index 0000000000..53fef6e158 --- /dev/null +++ b/mail_activity_cancel_tracking/models/mail_activity.py @@ -0,0 +1,39 @@ +# Copyright 2025 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models + + +class MailActivity(models.Model): + _inherit = "mail.activity" + + def _action_done(self, feedback=False, attachment_ids=None): + """Add the context key to avoid sending the canceled activity email when + marking the activity as done. + """ + self = self.with_context(skip_mail_activity_cancel_log=True) + return super()._action_done(feedback=feedback, attachment_ids=attachment_ids) + + def _log_cancel(self): + """Method for logging a message of subtype "Activities" indicating + that the activities in `self` have been canceled. + """ + for model, activity_data in self._classify_by_model().items(): + records_sudo = self.env[model].sudo().browse(activity_data["record_ids"]) + for record_sudo, activity in zip( + records_sudo, activity_data["activities"], strict=True + ): + record_sudo.message_post_with_source( + "mail_activity_cancel_tracking.message_activity_cancel", + author_id=self.env.user.partner_id.id, + render_values={ + "activity": activity, + "display_assignee": activity.user_id != self.env.user, + }, + mail_activity_type_id=activity.activity_type_id.id, + subtype_xmlid="mail.mt_activities", + ) + + def unlink(self): + if not self.env.context.get("skip_mail_activity_cancel_log"): + self._log_cancel() + return super().unlink() diff --git a/mail_activity_cancel_tracking/pyproject.toml b/mail_activity_cancel_tracking/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/mail_activity_cancel_tracking/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/mail_activity_cancel_tracking/readme/CONTRIBUTORS.md b/mail_activity_cancel_tracking/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..1cbf86f11f --- /dev/null +++ b/mail_activity_cancel_tracking/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- \[Tecnativa\](): + - Víctor Martínez + - Pedro M. Baeza diff --git a/mail_activity_cancel_tracking/readme/DESCRIPTION.md b/mail_activity_cancel_tracking/readme/DESCRIPTION.md new file mode 100644 index 0000000000..88bebafba9 --- /dev/null +++ b/mail_activity_cancel_tracking/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module leaves a message in the chatter when an activity is cancelled. diff --git a/mail_activity_cancel_tracking/readme/USAGE.md b/mail_activity_cancel_tracking/readme/USAGE.md new file mode 100644 index 0000000000..7a2bcf3da8 --- /dev/null +++ b/mail_activity_cancel_tracking/readme/USAGE.md @@ -0,0 +1,4 @@ +#. Go to a record that allows to record activities (Contacts for example). +#. Create an activity. +#. Click on the "Cancel" button. +#. A message is added in the chatter indicating the details of the activity that has been canceled. diff --git a/mail_activity_cancel_tracking/static/description/icon.png b/mail_activity_cancel_tracking/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/mail_activity_cancel_tracking/static/description/index.html b/mail_activity_cancel_tracking/static/description/index.html new file mode 100644 index 0000000000..f7a17a3a38 --- /dev/null +++ b/mail_activity_cancel_tracking/static/description/index.html @@ -0,0 +1,438 @@ + + + + + +Mail Activity Cancel Tracking + + + +
+

Mail Activity Cancel Tracking

+ + +

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

+

This module leaves a message in the chatter when an activity is +cancelled.

+

Table of contents

+ +
+

Usage

+

#. Go to a record that allows to record activities (Contacts for +example). #. Create an activity. #. Click on the “Cancel” button. #. A +message is added in the chatter indicating the details of the activity +that has been canceled.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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.

+

Current maintainer:

+

victoralmau

+

This module is part of the OCA/social project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js b/mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js new file mode 100644 index 0000000000..bf0a6b032e --- /dev/null +++ b/mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js @@ -0,0 +1,31 @@ +/* @odoo-module */ + +import {registry} from "@web/core/registry"; + +registry.category("web_tour.tours").add("mail_activity_cancel_tracking_done", { + test: true, + steps: () => [ + { + trigger: ".o-mail-Activity span:contains('Mark Done')", + }, + { + trigger: ".o-mail-ActivityMarkAsDone button[aria-label='Done']", + }, + { + trigger: ".o-mail-Message:contains('done'):contains('Play Mario Kart')", + isCheck: true, + }, + ], +}); +registry.category("web_tour.tours").add("mail_activity_cancel_tracking_cancel", { + test: true, + steps: () => [ + { + trigger: ".o-mail-Activity span:contains('Cancel')", + }, + { + trigger: ".o-mail-Message:contains('canceled'):contains('Play Mario Kart')", + isCheck: true, + }, + ], +}); diff --git a/mail_activity_cancel_tracking/tests/__init__.py b/mail_activity_cancel_tracking/tests/__init__.py new file mode 100644 index 0000000000..f7c0ac7b42 --- /dev/null +++ b/mail_activity_cancel_tracking/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2025 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import test_mail_activity_cancel_tracking diff --git a/mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py b/mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py new file mode 100644 index 0000000000..3ce4d3c78c --- /dev/null +++ b/mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py @@ -0,0 +1,34 @@ +# Copyright 2025 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo.tests import new_test_user +from odoo.tests.common import HttpCase, tagged + + +@tagged("-at_install", "post_install") +class TestMailActivityCancelTracking(HttpCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.partner = cls.env["res.partner"].create({"name": "Test partner"}) + cls.user = new_test_user(cls.env, login="test-user") + cls.mail_activity = cls.partner.activity_schedule( + user_id=cls.user.id, + activity_type_id=cls.env.ref("mail.mail_activity_data_todo").id, + summary="Play Mario Kart", + ) + # Set the user to prevent mail_activity_team from leaving the user empty. + cls.mail_activity.user_id = cls.user + + def test_mail_activity_done(self): + self.start_tour( + f"/web#id={self.partner.id}&model=res.partner", + "mail_activity_cancel_tracking_done", + login="test-user", + ) + + def test_mail_activity_cancel(self): + self.start_tour( + f"/web#id={self.partner.id}&model=res.partner", + "mail_activity_cancel_tracking_cancel", + login="test-user", + ) From 8b8291c619d966e59d4a9bb0b7f5905fdd614f12 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 20 Feb 2025 08:49:27 +0000 Subject: [PATCH 04/31] Added translation using Weblate (Italian) --- mail_activity_cancel_tracking/i18n/it.po | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 mail_activity_cancel_tracking/i18n/it.po diff --git a/mail_activity_cancel_tracking/i18n/it.po b/mail_activity_cancel_tracking/i18n/it.po new file mode 100644 index 0000000000..56ecb60ab8 --- /dev/null +++ b/mail_activity_cancel_tracking/i18n/it.po @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_activity_cancel_tracking +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2025-02-20 11:06+0000\n" +"Last-Translator: mymage \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 5.6.2\n" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "(originally assigned to" +msgstr "(assegnato originariamente a" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "Original note:" +msgstr "Nota origine:" + +#. module: mail_activity_cancel_tracking +#: model:ir.model,name:mail_activity_cancel_tracking.model_mail_activity +msgid "Activity" +msgstr "Attività" + +#. module: mail_activity_cancel_tracking +#: model_terms:ir.ui.view,arch_db:mail_activity_cancel_tracking.message_activity_cancel +msgid "canceled" +msgstr "annullato" From 5d2dba4d400bfe021b6b4db784784c32160d4ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Fri, 21 Feb 2025 12:26:06 +0100 Subject: [PATCH 05/31] [OU-ADD] mail_activity_cancel_tracking: Remove noupdate=1 records from mail_activity_unlink_log --- .../migrations/17.0.1.0.0/post-migration.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py diff --git a/mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py b/mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py new file mode 100644 index 0000000000..fa136b970a --- /dev/null +++ b/mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py @@ -0,0 +1,17 @@ +# Copyright 2025 Tecnativa - Víctor Martínez +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + +_deleted_xml_records = [ + "mail_activity_cancel_tracking.mt_activities_unlink", + "mail_activity_cancel_tracking.message_activity_unlink", +] + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.delete_records_safely_by_xml_id( + env, + _deleted_xml_records, + ) From cddbeb890c79ac85604aa7c29328839ef276965e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Mon, 3 Mar 2025 16:26:15 +0100 Subject: [PATCH 06/31] [FIX] mail_activity_cancel_tracking: Allow to delete a record (with activities) Example use case: - Create a partner - Create some activity to the partner - Delete the partner - The partner has been successfully deleted TT55313 --- mail_activity_cancel_tracking/README.rst | 2 +- mail_activity_cancel_tracking/__manifest__.py | 2 +- .../data/mail_template_data.xml | 18 ++++++++++-------- .../models/mail_activity.py | 3 +++ .../static/description/index.html | 2 +- .../test_mail_activity_cancel_tracking.py | 6 ++++++ 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/mail_activity_cancel_tracking/README.rst b/mail_activity_cancel_tracking/README.rst index 9357dae0a5..7cbd537767 100644 --- a/mail_activity_cancel_tracking/README.rst +++ b/mail_activity_cancel_tracking/README.rst @@ -7,7 +7,7 @@ Mail Activity Cancel Tracking !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:69b7d1df2aa6fb0c8233073fdbb3ea212fc9abca80d747cfc02332a6815275e6 + !! source digest: sha256:1df09fb89b3c0ea692949ce410f99fa9cc6fc036695cb576974215e659e4c3fa !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/mail_activity_cancel_tracking/__manifest__.py b/mail_activity_cancel_tracking/__manifest__.py index 1406a43eff..0c883b4d7b 100644 --- a/mail_activity_cancel_tracking/__manifest__.py +++ b/mail_activity_cancel_tracking/__manifest__.py @@ -4,7 +4,7 @@ "name": "Mail Activity Cancel Tracking", "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", - "version": "17.0.1.0.0", + "version": "17.0.1.0.1", "depends": ["mail"], "license": "AGPL-3", "category": "Social Network", diff --git a/mail_activity_cancel_tracking/data/mail_template_data.xml b/mail_activity_cancel_tracking/data/mail_template_data.xml index d849847107..0ec2129da7 100644 --- a/mail_activity_cancel_tracking/data/mail_template_data.xml +++ b/mail_activity_cancel_tracking/data/mail_template_data.xml @@ -4,20 +4,22 @@

canceled + t-field="activity.activity_type_id.name" + /> canceled (originally assigned to ) + t-field="activity.user_id.name" + />) : + t-if="activity.summary" + t-field="activity.summary" + />

-
Original note:
+
+ Original note: +
diff --git a/mail_activity_cancel_tracking/models/mail_activity.py b/mail_activity_cancel_tracking/models/mail_activity.py index 53fef6e158..5dc1e6518f 100644 --- a/mail_activity_cancel_tracking/models/mail_activity.py +++ b/mail_activity_cancel_tracking/models/mail_activity.py @@ -22,6 +22,9 @@ def _log_cancel(self): for record_sudo, activity in zip( records_sudo, activity_data["activities"], strict=True ): + # Use exists() to avoid creating messages linked to deleted records + if not record_sudo.exists(): + continue record_sudo.message_post_with_source( "mail_activity_cancel_tracking.message_activity_cancel", author_id=self.env.user.partner_id.id, diff --git a/mail_activity_cancel_tracking/static/description/index.html b/mail_activity_cancel_tracking/static/description/index.html index f7a17a3a38..bb1ca46051 100644 --- a/mail_activity_cancel_tracking/static/description/index.html +++ b/mail_activity_cancel_tracking/static/description/index.html @@ -367,7 +367,7 @@

Mail Activity Cancel Tracking

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:69b7d1df2aa6fb0c8233073fdbb3ea212fc9abca80d747cfc02332a6815275e6 +!! source digest: sha256:1df09fb89b3c0ea692949ce410f99fa9cc6fc036695cb576974215e659e4c3fa !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

This module leaves a message in the chatter when an activity is diff --git a/mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py b/mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py index 3ce4d3c78c..7d52a27842 100644 --- a/mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py +++ b/mail_activity_cancel_tracking/tests/test_mail_activity_cancel_tracking.py @@ -2,6 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.tests import new_test_user from odoo.tests.common import HttpCase, tagged +from odoo.tools import mute_logger @tagged("-at_install", "post_install") @@ -32,3 +33,8 @@ def test_mail_activity_cancel(self): "mail_activity_cancel_tracking_cancel", login="test-user", ) + + @mute_logger("odoo.models.unlink") + def test_record_unlink(self): + # This process should not fail + self.partner.unlink() From 33d3885092091f7758f6aec937fb247f753ca3d7 Mon Sep 17 00:00:00 2001 From: cristina-hidalgo-tecnativa Date: Fri, 30 Jan 2026 12:14:36 +0100 Subject: [PATCH 07/31] [MIG] mail_activity_cancel_tracking: Migration to 18.0 --- README.md | 1 + checklog-odoo.cfg | 1 + mail_activity_cancel_tracking/README.rst | 18 +++++++---- mail_activity_cancel_tracking/__manifest__.py | 2 +- .../i18n/mail_activity_cancel_tracking.pot | 2 +- .../migrations/17.0.1.0.0/post-migration.py | 17 ---------- .../static/description/index.html | 32 +++++++++++-------- .../mail_activity_cancel_tracking.esm.js | 19 +++++++---- setup/_metapackage/pyproject.toml | 3 +- 9 files changed, 48 insertions(+), 47 deletions(-) delete mode 100644 mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py diff --git a/README.md b/README.md index 351e4679d9..7642eca969 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- +[mail_activity_cancel_tracking](mail_activity_cancel_tracking/) | 18.0.1.0.0 | victoralmau | Mail Activity Cancel Tracking [mail_activity_unlink_log](mail_activity_unlink_log/) | 18.0.1.0.0 | | Leave a message when an activity is unlinked [mail_gateway](mail_gateway/) | 18.0.1.0.7 | | Base module for gateway communications [mail_gateway_telegram](mail_gateway_telegram/) | 18.0.1.0.0 | | Set a gateway for telegram diff --git a/checklog-odoo.cfg b/checklog-odoo.cfg index 0b55b7bf66..9cc94b30dd 100644 --- a/checklog-odoo.cfg +++ b/checklog-odoo.cfg @@ -1,3 +1,4 @@ [checklog-odoo] ignore= WARNING.* 0 failed, 0 error\(s\).* + WARNING.* Missing widget: res_partner_many2one for field of type many2one.* diff --git a/mail_activity_cancel_tracking/README.rst b/mail_activity_cancel_tracking/README.rst index 7cbd537767..1e26a633c3 100644 --- a/mail_activity_cancel_tracking/README.rst +++ b/mail_activity_cancel_tracking/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ============================= Mail Activity Cancel Tracking ============================= @@ -7,23 +11,23 @@ Mail Activity Cancel Tracking !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:1df09fb89b3c0ea692949ce410f99fa9cc6fc036695cb576974215e659e4c3fa + !! source digest: sha256:a7367877a727cd9cf452de9a5cfc3ea2efa09d60c4d61e7bdf26933467dd65d6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |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/17.0/mail_activity_cancel_tracking + :target: https://github.com/OCA/social/tree/18.0/mail_activity_cancel_tracking :alt: OCA/social .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_activity_cancel_tracking + :target: https://translation.odoo-community.org/projects/social-18-0/social-18-0-mail_activity_cancel_tracking :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=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -50,7 +54,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -91,6 +95,6 @@ Current `maintainer `__: |maintainer-victoralmau| -This module is part of the `OCA/social `_ project on GitHub. +This module is part of the `OCA/social `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_activity_cancel_tracking/__manifest__.py b/mail_activity_cancel_tracking/__manifest__.py index 0c883b4d7b..6cf7eafd95 100644 --- a/mail_activity_cancel_tracking/__manifest__.py +++ b/mail_activity_cancel_tracking/__manifest__.py @@ -4,7 +4,7 @@ "name": "Mail Activity Cancel Tracking", "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "depends": ["mail"], "license": "AGPL-3", "category": "Social Network", diff --git a/mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot b/mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot index 79731c98b3..d0ce28e7d5 100644 --- a/mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot +++ b/mail_activity_cancel_tracking/i18n/mail_activity_cancel_tracking.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 17.0\n" +"Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py b/mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py deleted file mode 100644 index fa136b970a..0000000000 --- a/mail_activity_cancel_tracking/migrations/17.0.1.0.0/post-migration.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2025 Tecnativa - Víctor Martínez -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - -_deleted_xml_records = [ - "mail_activity_cancel_tracking.mt_activities_unlink", - "mail_activity_cancel_tracking.message_activity_unlink", -] - - -@openupgrade.migrate() -def migrate(env, version): - openupgrade.delete_records_safely_by_xml_id( - env, - _deleted_xml_records, - ) diff --git a/mail_activity_cancel_tracking/static/description/index.html b/mail_activity_cancel_tracking/static/description/index.html index bb1ca46051..09cfbdabad 100644 --- a/mail_activity_cancel_tracking/static/description/index.html +++ b/mail_activity_cancel_tracking/static/description/index.html @@ -3,7 +3,7 @@ -Mail Activity Cancel Tracking +README.rst -

-

Mail Activity Cancel Tracking

+
+ + +Odoo Community Association + +
+

Mail Activity Cancel Tracking

-

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

This module leaves a message in the chatter when an activity is cancelled.

Table of contents

@@ -386,30 +391,30 @@

Mail Activity Cancel Tracking

-

Usage

+

Usage

#. Go to a record that allows to record activities (Contacts for example). #. Create an activity. #. Click on the “Cancel” button. #. A message is added in the chatter indicating the details of the activity that has been canceled.

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Tecnativa
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -429,10 +434,11 @@

Maintainers

promote its widespread use.

Current maintainer:

victoralmau

-

This module is part of the OCA/social project on GitHub.

+

This module is part of the OCA/social project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
diff --git a/mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js b/mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js index bf0a6b032e..4a437a044d 100644 --- a/mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js +++ b/mail_activity_cancel_tracking/static/tests/tours/mail_activity_cancel_tracking.esm.js @@ -1,19 +1,21 @@ -/* @odoo-module */ - import {registry} from "@web/core/registry"; registry.category("web_tour.tours").add("mail_activity_cancel_tracking_done", { test: true, steps: () => [ { - trigger: ".o-mail-Activity span:contains('Mark Done')", + trigger: ".o-mail-Chatter", + }, + { + trigger: "button.o-mail-Activity-markDone", + run: "click", }, { - trigger: ".o-mail-ActivityMarkAsDone button[aria-label='Done']", + trigger: "button[aria-label='Done']", + run: "click", }, { trigger: ".o-mail-Message:contains('done'):contains('Play Mario Kart')", - isCheck: true, }, ], }); @@ -21,11 +23,14 @@ registry.category("web_tour.tours").add("mail_activity_cancel_tracking_cancel", test: true, steps: () => [ { - trigger: ".o-mail-Activity span:contains('Cancel')", + trigger: ".o-mail-Chatter", + }, + { + trigger: ".o-mail-Activity button.btn-danger:contains('Cancel')", + run: "click", }, { trigger: ".o-mail-Message:contains('canceled'):contains('Play Mario Kart')", - isCheck: true, }, ], }); diff --git a/setup/_metapackage/pyproject.toml b/setup/_metapackage/pyproject.toml index 0fa37b4b07..7116fd3c95 100644 --- a/setup/_metapackage/pyproject.toml +++ b/setup/_metapackage/pyproject.toml @@ -1,7 +1,8 @@ [project] name = "odoo-addons-oca-social" -version = "18.0.20251114.0" +version = "18.0.20260313.0" dependencies = [ + "odoo-addon-mail_activity_cancel_tracking==18.0.*", "odoo-addon-mail_activity_unlink_log==18.0.*", "odoo-addon-mail_gateway==18.0.*", "odoo-addon-mail_gateway_telegram==18.0.*", From 79207348655f4bff6d3c16bedba18f4493fa49f8 Mon Sep 17 00:00:00 2001 From: Julio Santa Cruz Date: Wed, 25 Mar 2026 20:03:49 -0300 Subject: [PATCH 08/31] Use the existing template to process imported data. --- README.md | 2 +- mail_gateway_whatsapp/README.rst | 2 +- mail_gateway_whatsapp/__manifest__.py | 2 +- mail_gateway_whatsapp/models/mail_gateway.py | 2 +- mail_gateway_whatsapp/static/description/index.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7642eca969..d960965195 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ addon | version | maintainers | summary [mail_activity_unlink_log](mail_activity_unlink_log/) | 18.0.1.0.0 | | Leave a message when an activity is unlinked [mail_gateway](mail_gateway/) | 18.0.1.0.7 | | Base module for gateway communications [mail_gateway_telegram](mail_gateway_telegram/) | 18.0.1.0.0 | | Set a gateway for telegram -[mail_gateway_whatsapp](mail_gateway_whatsapp/) | 18.0.2.1.0 | | Set a gateway for WhatsApp +[mail_gateway_whatsapp](mail_gateway_whatsapp/) | 18.0.2.1.1 | | Set a gateway for WhatsApp [mail_notification_with_history](mail_notification_with_history/) | 18.0.1.0.0 | TDu | Add the previous chatter discussion into new email notifications. [mail_thread_create_nolog](mail_thread_create_nolog/) | 18.0.1.0.2 | sebalix | Display a fake (non-stored) create log in the chatter. [res_company_mastodon_link](res_company_mastodon_link/) | 18.0.1.0.0 | legalsylvain | Add mastodon url at company model diff --git a/mail_gateway_whatsapp/README.rst b/mail_gateway_whatsapp/README.rst index f861b57126..a79a062d34 100644 --- a/mail_gateway_whatsapp/README.rst +++ b/mail_gateway_whatsapp/README.rst @@ -11,7 +11,7 @@ Mail Whatsapp Gateway !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:84112b6980c403a273849337ad1f8850e107cb28eea26a01d73d862faa849019 + !! source digest: sha256:615ff352d500c3a5d26d75caa0d3ceecdb3e59bb9ebdfcfdaccdc42dbd4d31cd !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/mail_gateway_whatsapp/__manifest__.py b/mail_gateway_whatsapp/__manifest__.py index b5ca799d40..b82c6afb1f 100644 --- a/mail_gateway_whatsapp/__manifest__.py +++ b/mail_gateway_whatsapp/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Mail Whatsapp Gateway", "summary": "Set a gateway for WhatsApp", - "version": "18.0.2.1.0", + "version": "18.0.2.1.1", "license": "AGPL-3", "author": "Creu Blanca, Dixmit, Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", diff --git a/mail_gateway_whatsapp/models/mail_gateway.py b/mail_gateway_whatsapp/models/mail_gateway.py index 0f36934b47..b607de3966 100644 --- a/mail_gateway_whatsapp/models/mail_gateway.py +++ b/mail_gateway_whatsapp/models/mail_gateway.py @@ -58,7 +58,7 @@ def button_import_whatsapp_template(self): ws_template = templates_by_id.get(template_data["id"]) if ws_template: ws_template.write( - WhatsappTemplate._prepare_values_to_import(self, template_data) + ws_template._prepare_values_to_import(self, template_data) ) else: create_vals.append( diff --git a/mail_gateway_whatsapp/static/description/index.html b/mail_gateway_whatsapp/static/description/index.html index 966c8026ed..1008501bfc 100644 --- a/mail_gateway_whatsapp/static/description/index.html +++ b/mail_gateway_whatsapp/static/description/index.html @@ -372,7 +372,7 @@

Mail Whatsapp Gateway

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:84112b6980c403a273849337ad1f8850e107cb28eea26a01d73d862faa849019 +!! source digest: sha256:615ff352d500c3a5d26d75caa0d3ceecdb3e59bb9ebdfcfdaccdc42dbd4d31cd !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

This module allows to respond whatsapp chats.

From 32ab04c81792714f473346b7384cb3991681928f Mon Sep 17 00:00:00 2001 From: Anmol Garg Date: Sat, 14 Mar 2026 01:42:25 +0530 Subject: [PATCH 09/31] [ADD] telegram_base: Telegram Bot Integration --- telegram_base/README.rst | 93 ++++ telegram_base/__init__.py | 1 + telegram_base/__manifest__.py | 19 + telegram_base/models/__init__.py | 1 + telegram_base/models/telegram_bot.py | 94 +++++ telegram_base/pyproject.toml | 3 + telegram_base/readme/CONTRIBUTORS.md | 2 + telegram_base/readme/DESCRIPTION.md | 3 + telegram_base/readme/USAGE.md | 6 + telegram_base/security/ir.model.access.csv | 3 + telegram_base/static/description/index.html | 442 ++++++++++++++++++++ telegram_base/tests/__init__.py | 1 + telegram_base/tests/test_telegram_bot.py | 70 ++++ telegram_base/views/telegram_bot_views.xml | 62 +++ 14 files changed, 800 insertions(+) create mode 100644 telegram_base/README.rst create mode 100644 telegram_base/__init__.py create mode 100644 telegram_base/__manifest__.py create mode 100644 telegram_base/models/__init__.py create mode 100644 telegram_base/models/telegram_bot.py create mode 100644 telegram_base/pyproject.toml create mode 100644 telegram_base/readme/CONTRIBUTORS.md create mode 100644 telegram_base/readme/DESCRIPTION.md create mode 100644 telegram_base/readme/USAGE.md create mode 100644 telegram_base/security/ir.model.access.csv create mode 100644 telegram_base/static/description/index.html create mode 100644 telegram_base/tests/__init__.py create mode 100644 telegram_base/tests/test_telegram_bot.py create mode 100644 telegram_base/views/telegram_bot_views.xml diff --git a/telegram_base/README.rst b/telegram_base/README.rst new file mode 100644 index 0000000000..bf582a0214 --- /dev/null +++ b/telegram_base/README.rst @@ -0,0 +1,93 @@ +============= +Telegram Base +============= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:7b454e99bd84f3c52065a3893e37299095582f3afd6bc2e449ffe6ec7b9f9459 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github + :target: https://github.com/OCA/social/tree/18.0/telegram_base + :alt: OCA/social +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/social-18-0/social-18-0-telegram_base + :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=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module provides a generic engine to integrate Telegram Bots with +Odoo. It serves as a foundation for other modules to send notifications, +allowing you to manage bot tokens and authorized chat IDs in a +centralized way. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module: + +1. Go to **Settings > Technical > Telegram > Bots**. +2. Create a new Bot and enter the Token provided by @BotFather. +3. Click the **Fetch Chats** button to automatically find Chat IDs of + people who have messaged the bot. +4. Click **Test Connection** to verify that Odoo can communicate with + Telegram. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Anmol Garg + +Contributors +------------ + +- ``Anmol Garg ``\ \_: + + - Anmol Garg + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/telegram_base/__init__.py b/telegram_base/__init__.py new file mode 100644 index 0000000000..9a7e03eded --- /dev/null +++ b/telegram_base/__init__.py @@ -0,0 +1 @@ +from . import models \ No newline at end of file diff --git a/telegram_base/__manifest__.py b/telegram_base/__manifest__.py new file mode 100644 index 0000000000..18bc40438b --- /dev/null +++ b/telegram_base/__manifest__.py @@ -0,0 +1,19 @@ +{ + "name": "Telegram Base", + "summary": "Generic Telegram API connector", + "version": "18.0.1.0.0", + "category": "Social", + "author": "Anmol Garg", + "website": "https://github.com/OCA/social", + "license": "LGPL-3", + "depends": [ + "base", + "mail", + ], + "data": [ + "security/ir.model.access.csv", + "views/telegram_bot_views.xml", + ], + "installable": True, + "application": False, +} \ No newline at end of file diff --git a/telegram_base/models/__init__.py b/telegram_base/models/__init__.py new file mode 100644 index 0000000000..1c8d20c684 --- /dev/null +++ b/telegram_base/models/__init__.py @@ -0,0 +1 @@ +from . import telegram_bot \ No newline at end of file diff --git a/telegram_base/models/telegram_bot.py b/telegram_base/models/telegram_bot.py new file mode 100644 index 0000000000..0ba1769ef8 --- /dev/null +++ b/telegram_base/models/telegram_bot.py @@ -0,0 +1,94 @@ +import logging +import requests +from odoo import fields, models, api, _ +from odoo.exceptions import UserError + +_logger = logging.getLogger(__name__) + + +class TelegramBot(models.Model): + _name = "telegram.bot" + _description = "Telegram Bot Configuration" + + name = fields.Char(required=True, help="Unique name for the bot configuration") + token = fields.Char(required=True, help="Bot token from BotFather") + active = fields.Boolean(default=True) + chat_ids = fields.One2many("telegram.chat", "bot_id", string="Authorized Chats") + + def send_message(self, chat_id, message, parse_mode="HTML"): + """Low-level method to send a raw message via Telegram API""" + self.ensure_one() + url = f"https://api.telegram.org/bot{self.token}/sendMessage" + payload = { + "chat_id": chat_id, + "text": message, + "parse_mode": parse_mode + } + try: + with requests.Session() as session: + response = session.post(url, json=payload, timeout=10) + response.raise_for_status() + return True + except Exception as e: + _logger.error("Telegram error for bot %s: %s", self.name, e) + return False + + def action_test_connection(self): + """Button to test connection to all registered chats""" + self.ensure_one() + if not self.chat_ids: + raise UserError(_("Please add or fetch at least one Chat ID first.")) + + for chat in self.chat_ids: + msg = _("Success! Connection from Odoo 18 to %s is working.") % self.name + self.send_message(chat.chat_id, msg) + + return { + 'effect': { + 'fadeout': 'slow', + 'message': _("Test messages sent!"), + 'type': 'rainbow_man', + } + } + + def action_fetch_chats(self): + """Automatically discovers Chat IDs of people who messaged the bot""" + self.ensure_one() + url = f"https://api.telegram.org/bot{self.token}/getUpdates" + try: + response = requests.get(url, timeout=10) + response.raise_for_status() + data = response.json() + + if not data.get("ok"): + return False + + new_count = 0 + for result in data.get("result", []): + msg = result.get("message") or result.get("edited_message") + if not msg: continue + + chat_info = msg.get("chat") + c_id = str(chat_info.get("id")) + c_name = chat_info.get("username") or chat_info.get("first_name") or "Unknown" + + if not self.chat_ids.filtered(lambda c: c.chat_id == c_id): + self.env["telegram.chat"].create({ + "name": c_name, + "chat_id": c_id, + "bot_id": self.id, + }) + new_count += 1 + return True + except Exception as e: + _logger.error("Fetch failed: %s", e) + return False + + +class TelegramChat(models.Model): + _name = "telegram.chat" + _description = "Telegram Chat" + + name = fields.Char(required=True, help="Friendly name for the chat (e.g. Admin Group)") + chat_id = fields.Char(required=True, help="Numeric ID from Telegram") + bot_id = fields.Many2one("telegram.bot", ondelete="cascade") \ No newline at end of file diff --git a/telegram_base/pyproject.toml b/telegram_base/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/telegram_base/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/telegram_base/readme/CONTRIBUTORS.md b/telegram_base/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..0e605955c7 --- /dev/null +++ b/telegram_base/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +* `Anmol Garg `_: + * Anmol Garg \ No newline at end of file diff --git a/telegram_base/readme/DESCRIPTION.md b/telegram_base/readme/DESCRIPTION.md new file mode 100644 index 0000000000..8b1ae30752 --- /dev/null +++ b/telegram_base/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module provides a generic engine to integrate Telegram Bots with Odoo. +It serves as a foundation for other modules to send notifications, +allowing you to manage bot tokens and authorized chat IDs in a centralized way. \ No newline at end of file diff --git a/telegram_base/readme/USAGE.md b/telegram_base/readme/USAGE.md new file mode 100644 index 0000000000..d429b7120b --- /dev/null +++ b/telegram_base/readme/USAGE.md @@ -0,0 +1,6 @@ +To use this module: + +1. Go to **Settings > Technical > Telegram > Bots**. +2. Create a new Bot and enter the Token provided by @BotFather. +3. Click the **Fetch Chats** button to automatically find Chat IDs of people who have messaged the bot. +4. Click **Test Connection** to verify that Odoo can communicate with Telegram. \ No newline at end of file diff --git a/telegram_base/security/ir.model.access.csv b/telegram_base/security/ir.model.access.csv new file mode 100644 index 0000000000..4a8c2ffd46 --- /dev/null +++ b/telegram_base/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_telegram_bot_admin,telegram.bot.admin,model_telegram_bot,base.group_system,1,1,1,1 +access_telegram_chat_admin,telegram.chat.admin,model_telegram_chat,base.group_system,1,1,1,1 \ No newline at end of file diff --git a/telegram_base/static/description/index.html b/telegram_base/static/description/index.html new file mode 100644 index 0000000000..8613d438f4 --- /dev/null +++ b/telegram_base/static/description/index.html @@ -0,0 +1,442 @@ + + + + + +Telegram Base + + + +
+

Telegram Base

+ + +

Beta License: LGPL-3 OCA/social Translate me on Weblate Try me on Runboat

+

This module provides a generic engine to integrate Telegram Bots with +Odoo. It serves as a foundation for other modules to send notifications, +allowing you to manage bot tokens and authorized chat IDs in a +centralized way.

+

Table of contents

+ +
+

Usage

+

To use this module:

+
    +
  1. Go to Settings > Technical > Telegram > Bots.
  2. +
  3. Create a new Bot and enter the Token provided by @BotFather.
  4. +
  5. Click the Fetch Chats button to automatically find Chat IDs of +people who have messaged the bot.
  6. +
  7. Click Test Connection to verify that Odoo can communicate with +Telegram.
  8. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Anmol Garg
  • +
+
+
+

Contributors

+
    +
  • Anmol Garg <https://github.com/AnmollGarg>_:
      +
    • Anmol Garg
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/telegram_base/tests/__init__.py b/telegram_base/tests/__init__.py new file mode 100644 index 0000000000..81f8ddddba --- /dev/null +++ b/telegram_base/tests/__init__.py @@ -0,0 +1 @@ +from . import test_telegram_bot \ No newline at end of file diff --git a/telegram_base/tests/test_telegram_bot.py b/telegram_base/tests/test_telegram_bot.py new file mode 100644 index 0000000000..2e5e3d56e7 --- /dev/null +++ b/telegram_base/tests/test_telegram_bot.py @@ -0,0 +1,70 @@ +# Copyright 2026 Anmol Garg +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from unittest.mock import patch +from odoo.tests.common import TransactionCase +import requests + + +class TestTelegramBot(TransactionCase): + + def setUp(self): + super().setUp() + # Create a test bot + self.bot = self.env['telegram.bot'].create({ + 'name': 'Test Bot', + 'token': '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11', + }) + # Create a test chat linked to the bot + self.chat = self.env['telegram.chat'].create({ + 'name': 'Anmol Test Chat', + 'chat_id': '1856618864', + 'bot_id': self.bot.id, + }) + + @patch('requests.Session.post') + def test_send_message_success(self, mock_post): + """Test a successful message delivery""" + # Mock a successful 200 response + mock_post.return_value.status_code = 200 + mock_post.return_value.raise_for_status = lambda: None + + result = self.bot.send_message(self.chat.chat_id, "Hello from Odoo Test") + + self.assertTrue(result, "The send_message method should return True on success") + self.assertEqual(mock_post.call_count, 1, "Exactly one POST request should be made") + + @patch('requests.Session.post') + def test_send_message_failure(self, mock_post): + """Test handling of a connection failure""" + # Simulate a real exception (like a timeout or DNS error) + # This will trigger the 'except' block in your telegram_bot.py + mock_post.side_effect = requests.exceptions.RequestException("Connection Failed") + + result = self.bot.send_message(self.chat.chat_id, "This should fail") + + # This should now correctly return False + self.assertFalse(result, "The send_message method should return False on exception") + + @patch('requests.get') + def test_action_fetch_chats(self, mock_get): + """Test fetching chats from Telegram API""" + # Mock the JSON response from Telegram /getUpdates + mock_get.return_value.status_code = 200 + mock_get.return_value.json.return_value = { + "ok": True, + "result": [{ + "update_id": 1, + "message": { + "chat": {"id": 111222, "first_name": "NewUser", "type": "private"}, + "text": "hi" + } + }] + } + + self.bot.action_fetch_chats() + + # Verify a new chat was created in Odoo + new_chat = self.env['telegram.chat'].search([('chat_id', '=', '111222')]) + self.assertTrue(new_chat, "A new chat should have been created from the mock data") + self.assertEqual(new_chat.name, "NewUser") \ No newline at end of file diff --git a/telegram_base/views/telegram_bot_views.xml b/telegram_base/views/telegram_bot_views.xml new file mode 100644 index 0000000000..19eaccdce8 --- /dev/null +++ b/telegram_base/views/telegram_bot_views.xml @@ -0,0 +1,62 @@ + + + + telegram.bot.view.list + telegram.bot + + + + + + + + + + telegram.bot.view.form + telegram.bot + +
+
+
+ +
+
+ + + + + + + + + + + + + + +
+
+
+
+ + + Telegram Bots + telegram.bot + list,form + + + + +
\ No newline at end of file From 7f3a1785b375dbf86ab88f7557d845f0ee9e4667 Mon Sep 17 00:00:00 2001 From: Anmol Garg Date: Sat, 14 Mar 2026 02:21:22 +0530 Subject: [PATCH 10/31] [FIX] telegram_base: apply OCA formatting and manifest fixes --- telegram_base/__init__.py | 2 +- telegram_base/__manifest__.py | 4 +- telegram_base/models/__init__.py | 2 +- telegram_base/models/telegram_bot.py | 56 +++++----- telegram_base/security/ir.model.access.csv | 2 +- telegram_base/tests/__init__.py | 2 +- telegram_base/tests/test_telegram_bot.py | 118 ++++++++++++++++----- telegram_base/views/telegram_bot_views.xml | 58 ++++++---- 8 files changed, 167 insertions(+), 77 deletions(-) diff --git a/telegram_base/__init__.py b/telegram_base/__init__.py index 9a7e03eded..0650744f6b 100644 --- a/telegram_base/__init__.py +++ b/telegram_base/__init__.py @@ -1 +1 @@ -from . import models \ No newline at end of file +from . import models diff --git a/telegram_base/__manifest__.py b/telegram_base/__manifest__.py index 18bc40438b..fedc8a50de 100644 --- a/telegram_base/__manifest__.py +++ b/telegram_base/__manifest__.py @@ -3,7 +3,7 @@ "summary": "Generic Telegram API connector", "version": "18.0.1.0.0", "category": "Social", - "author": "Anmol Garg", + "author": "Anmol Garg, Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", "license": "LGPL-3", "depends": [ @@ -16,4 +16,4 @@ ], "installable": True, "application": False, -} \ No newline at end of file +} diff --git a/telegram_base/models/__init__.py b/telegram_base/models/__init__.py index 1c8d20c684..38fd99457f 100644 --- a/telegram_base/models/__init__.py +++ b/telegram_base/models/__init__.py @@ -1 +1 @@ -from . import telegram_bot \ No newline at end of file +from . import telegram_bot diff --git a/telegram_base/models/telegram_bot.py b/telegram_base/models/telegram_bot.py index 0ba1769ef8..9a0cfb9d81 100644 --- a/telegram_base/models/telegram_bot.py +++ b/telegram_base/models/telegram_bot.py @@ -1,6 +1,8 @@ import logging + import requests -from odoo import fields, models, api, _ + +from odoo import _, fields, models from odoo.exceptions import UserError _logger = logging.getLogger(__name__) @@ -19,11 +21,7 @@ def send_message(self, chat_id, message, parse_mode="HTML"): """Low-level method to send a raw message via Telegram API""" self.ensure_one() url = f"https://api.telegram.org/bot{self.token}/sendMessage" - payload = { - "chat_id": chat_id, - "text": message, - "parse_mode": parse_mode - } + payload = {"chat_id": chat_id, "text": message, "parse_mode": parse_mode} try: with requests.Session() as session: response = session.post(url, json=payload, timeout=10) @@ -40,14 +38,17 @@ def action_test_connection(self): raise UserError(_("Please add or fetch at least one Chat ID first.")) for chat in self.chat_ids: - msg = _("Success! Connection from Odoo 18 to %s is working.") % self.name + msg = ( + _("Success! Connection from Odoo 18 to %s is working.") + % self.name + ) self.send_message(chat.chat_id, msg) return { - 'effect': { - 'fadeout': 'slow', - 'message': _("Test messages sent!"), - 'type': 'rainbow_man', + "effect": { + "fadeout": "slow", + "message": _("Test messages sent!"), + "type": "rainbow_man", } } @@ -63,22 +64,27 @@ def action_fetch_chats(self): if not data.get("ok"): return False - new_count = 0 for result in data.get("result", []): msg = result.get("message") or result.get("edited_message") - if not msg: continue + if not msg: + continue chat_info = msg.get("chat") c_id = str(chat_info.get("id")) - c_name = chat_info.get("username") or chat_info.get("first_name") or "Unknown" - - if not self.chat_ids.filtered(lambda c: c.chat_id == c_id): - self.env["telegram.chat"].create({ - "name": c_name, - "chat_id": c_id, - "bot_id": self.id, - }) - new_count += 1 + c_name = ( + chat_info.get("username") + or chat_info.get("first_name") + or "Unknown" + ) + + if not self.chat_ids.filtered(lambda c, c_id=c_id: c.chat_id == c_id): + self.env["telegram.chat"].create( + { + "name": c_name, + "chat_id": c_id, + "bot_id": self.id, + } + ) return True except Exception as e: _logger.error("Fetch failed: %s", e) @@ -89,6 +95,8 @@ class TelegramChat(models.Model): _name = "telegram.chat" _description = "Telegram Chat" - name = fields.Char(required=True, help="Friendly name for the chat (e.g. Admin Group)") + name = fields.Char( + required=True, help="Friendly name for the chat (e.g. Admin Group)" + ) chat_id = fields.Char(required=True, help="Numeric ID from Telegram") - bot_id = fields.Many2one("telegram.bot", ondelete="cascade") \ No newline at end of file + bot_id = fields.Many2one("telegram.bot", ondelete="cascade") diff --git a/telegram_base/security/ir.model.access.csv b/telegram_base/security/ir.model.access.csv index 4a8c2ffd46..c27084a725 100644 --- a/telegram_base/security/ir.model.access.csv +++ b/telegram_base/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_telegram_bot_admin,telegram.bot.admin,model_telegram_bot,base.group_system,1,1,1,1 -access_telegram_chat_admin,telegram.chat.admin,model_telegram_chat,base.group_system,1,1,1,1 \ No newline at end of file +access_telegram_chat_admin,telegram.chat.admin,model_telegram_chat,base.group_system,1,1,1,1 diff --git a/telegram_base/tests/__init__.py b/telegram_base/tests/__init__.py index 81f8ddddba..4f7e73c971 100644 --- a/telegram_base/tests/__init__.py +++ b/telegram_base/tests/__init__.py @@ -1 +1 @@ -from . import test_telegram_bot \ No newline at end of file +from . import test_telegram_bot diff --git a/telegram_base/tests/test_telegram_bot.py b/telegram_base/tests/test_telegram_bot.py index 2e5e3d56e7..1f76537e1e 100644 --- a/telegram_base/tests/test_telegram_bot.py +++ b/telegram_base/tests/test_telegram_bot.py @@ -2,27 +2,34 @@ # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). from unittest.mock import patch -from odoo.tests.common import TransactionCase + import requests +from odoo.exceptions import UserError +from odoo.tests.common import TransactionCase +from odoo.tools import mute_logger -class TestTelegramBot(TransactionCase): +class TestTelegramBot(TransactionCase): def setUp(self): super().setUp() # Create a test bot - self.bot = self.env['telegram.bot'].create({ - 'name': 'Test Bot', - 'token': '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11', - }) + self.bot = self.env["telegram.bot"].create( + { + "name": "Test Bot", + "token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", + } + ) # Create a test chat linked to the bot - self.chat = self.env['telegram.chat'].create({ - 'name': 'Anmol Test Chat', - 'chat_id': '1856618864', - 'bot_id': self.bot.id, - }) + self.chat = self.env["telegram.chat"].create( + { + "name": "Test Chat", + "chat_id": "1856618864", + "bot_id": self.bot.id, + } + ) - @patch('requests.Session.post') + @patch("requests.Session.post") def test_send_message_success(self, mock_post): """Test a successful message delivery""" # Mock a successful 200 response @@ -32,39 +39,98 @@ def test_send_message_success(self, mock_post): result = self.bot.send_message(self.chat.chat_id, "Hello from Odoo Test") self.assertTrue(result, "The send_message method should return True on success") - self.assertEqual(mock_post.call_count, 1, "Exactly one POST request should be made") + self.assertEqual( + mock_post.call_count, 1, "Exactly one POST request should be made" + ) + + def test_action_test_connection_no_chats(self): + """Test action_test_connection raises UserError when no chats""" + self.bot.chat_ids = [(5, 0, 0)] # Clear chats + with self.assertRaises(UserError): + self.bot.action_test_connection() + + @patch("requests.Session.post") + def test_action_test_connection_success(self, mock_post): + """Test action_test_connection sends messages to all chats""" + mock_post.return_value.status_code = 200 + mock_post.return_value.raise_for_status = lambda: None + + res = self.bot.action_test_connection() - @patch('requests.Session.post') + self.assertEqual(mock_post.call_count, 1) + self.assertEqual(res.get("effect", {}).get("type"), "rainbow_man") + + @mute_logger("odoo.addons.telegram_base.models.telegram_bot") + @patch("requests.Session.post") def test_send_message_failure(self, mock_post): """Test handling of a connection failure""" # Simulate a real exception (like a timeout or DNS error) # This will trigger the 'except' block in your telegram_bot.py - mock_post.side_effect = requests.exceptions.RequestException("Connection Failed") + mock_post.side_effect = requests.exceptions.RequestException( + "Connection Failed" + ) result = self.bot.send_message(self.chat.chat_id, "This should fail") # This should now correctly return False - self.assertFalse(result, "The send_message method should return False on exception") + self.assertFalse( + result, "The send_message method should return False on exception" + ) - @patch('requests.get') + @patch("requests.get") def test_action_fetch_chats(self, mock_get): """Test fetching chats from Telegram API""" # Mock the JSON response from Telegram /getUpdates mock_get.return_value.status_code = 200 mock_get.return_value.json.return_value = { "ok": True, - "result": [{ - "update_id": 1, - "message": { - "chat": {"id": 111222, "first_name": "NewUser", "type": "private"}, - "text": "hi" + "result": [ + { + "update_id": 1, + "message": { + "chat": { + "id": 111222, + "first_name": "NewUser", + "type": "private", + }, + "text": "hi", + }, } - }] + ], } self.bot.action_fetch_chats() # Verify a new chat was created in Odoo - new_chat = self.env['telegram.chat'].search([('chat_id', '=', '111222')]) - self.assertTrue(new_chat, "A new chat should have been created from the mock data") - self.assertEqual(new_chat.name, "NewUser") \ No newline at end of file + new_chat = self.env["telegram.chat"].search([("chat_id", "=", "111222")]) + self.assertTrue( + new_chat, "A new chat should have been created from the mock data" + ) + self.assertEqual(new_chat.name, "NewUser") + + @patch("requests.get") + def test_action_fetch_chats_error(self, mock_get): + """Test action_fetch_chats handles ok: False""" + mock_get.return_value.status_code = 200 + mock_get.return_value.json.return_value = {"ok": False} + result = self.bot.action_fetch_chats() + self.assertFalse(result) + + @patch("requests.get") + def test_action_fetch_chats_empty_message(self, mock_get): + """Test action_fetch_chats handles result without message""" + mock_get.return_value.status_code = 200 + mock_get.return_value.json.return_value = { + "ok": True, + "result": [{"update_id": 1}], # No message key + } + result = self.bot.action_fetch_chats() + self.assertTrue(result) + + @mute_logger("odoo.addons.telegram_base.models.telegram_bot") + @patch("requests.get") + def test_action_fetch_chats_exception(self, mock_get): + """Test action_fetch_chats handles exceptions""" + mock_get.side_effect = requests.exceptions.RequestException("API Down") + result = self.bot.action_fetch_chats() + self.assertFalse(result) diff --git a/telegram_base/views/telegram_bot_views.xml b/telegram_base/views/telegram_bot_views.xml index 19eaccdce8..045ddf1a35 100644 --- a/telegram_base/views/telegram_bot_views.xml +++ b/telegram_base/views/telegram_bot_views.xml @@ -1,12 +1,12 @@ - + telegram.bot.view.list telegram.bot - - + + @@ -17,31 +17,37 @@
-
-
- - + + - - + + @@ -57,6 +63,16 @@ list,form - - - \ No newline at end of file + + + From 9950f069b5b851e83dd9d6bbfc6a65b49668b021 Mon Sep 17 00:00:00 2001 From: Anmol Garg Date: Wed, 25 Mar 2026 20:18:55 +0530 Subject: [PATCH 11/31] [FIX] telegram_base: Fixed added the depencency on mail_gateway --- telegram_base/README.rst | 5 +- telegram_base/__manifest__.py | 3 +- telegram_base/models/__init__.py | 3 +- .../{telegram_bot.py => mail_gateway.py} | 51 ++++++------ telegram_base/models/telegram_chat.py | 14 ++++ telegram_base/readme/USAGE.md | 6 +- telegram_base/security/ir.model.access.csv | 1 - telegram_base/static/description/index.html | 5 +- telegram_base/tests/__init__.py | 2 +- ..._telegram_bot.py => test_telegram_base.py} | 11 +-- telegram_base/views/mail_gateway_views.xml | 38 +++++++++ telegram_base/views/telegram_bot_views.xml | 78 ------------------- 12 files changed, 98 insertions(+), 119 deletions(-) rename telegram_base/models/{telegram_bot.py => mail_gateway.py} (69%) create mode 100644 telegram_base/models/telegram_chat.py rename telegram_base/tests/{test_telegram_bot.py => test_telegram_base.py} (93%) create mode 100644 telegram_base/views/mail_gateway_views.xml delete mode 100644 telegram_base/views/telegram_bot_views.xml diff --git a/telegram_base/README.rst b/telegram_base/README.rst index bf582a0214..292fe5e535 100644 --- a/telegram_base/README.rst +++ b/telegram_base/README.rst @@ -43,8 +43,9 @@ Usage To use this module: -1. Go to **Settings > Technical > Telegram > Bots**. -2. Create a new Bot and enter the Token provided by @BotFather. +1. Go to **Settings > Technical > Email > Gateways**. +2. Create a new Gateway, set the Gateway Type to "Telegram", and enter + the Token provided by @BotFather. 3. Click the **Fetch Chats** button to automatically find Chat IDs of people who have messaged the bot. 4. Click **Test Connection** to verify that Odoo can communicate with diff --git a/telegram_base/__manifest__.py b/telegram_base/__manifest__.py index fedc8a50de..98993c005e 100644 --- a/telegram_base/__manifest__.py +++ b/telegram_base/__manifest__.py @@ -9,10 +9,11 @@ "depends": [ "base", "mail", + "mail_gateway_telegram", ], "data": [ "security/ir.model.access.csv", - "views/telegram_bot_views.xml", + "views/mail_gateway_views.xml", ], "installable": True, "application": False, diff --git a/telegram_base/models/__init__.py b/telegram_base/models/__init__.py index 38fd99457f..91b4bfddfb 100644 --- a/telegram_base/models/__init__.py +++ b/telegram_base/models/__init__.py @@ -1 +1,2 @@ -from . import telegram_bot +from . import mail_gateway +from . import telegram_chat diff --git a/telegram_base/models/telegram_bot.py b/telegram_base/models/mail_gateway.py similarity index 69% rename from telegram_base/models/telegram_bot.py rename to telegram_base/models/mail_gateway.py index 9a0cfb9d81..61bb2c0104 100644 --- a/telegram_base/models/telegram_bot.py +++ b/telegram_base/models/mail_gateway.py @@ -1,5 +1,4 @@ import logging - import requests from odoo import _, fields, models @@ -8,18 +7,19 @@ _logger = logging.getLogger(__name__) -class TelegramBot(models.Model): - _name = "telegram.bot" - _description = "Telegram Bot Configuration" +class MailGateway(models.Model): + _inherit = "mail.gateway" - name = fields.Char(required=True, help="Unique name for the bot configuration") - token = fields.Char(required=True, help="Bot token from BotFather") - active = fields.Boolean(default=True) - chat_ids = fields.One2many("telegram.chat", "bot_id", string="Authorized Chats") + telegram_chat_ids = fields.One2many( + "telegram.chat", "gateway_id", string="Authorized Chats" + ) def send_message(self, chat_id, message, parse_mode="HTML"): """Low-level method to send a raw message via Telegram API""" self.ensure_one() + if self.gateway_type != "telegram": + return False + url = f"https://api.telegram.org/bot{self.token}/sendMessage" payload = {"chat_id": chat_id, "text": message, "parse_mode": parse_mode} try: @@ -32,14 +32,17 @@ def send_message(self, chat_id, message, parse_mode="HTML"): return False def action_test_connection(self): - """Button to test connection to all registered chats""" + """Button to test connection to all registered simple chats""" self.ensure_one() - if not self.chat_ids: + if self.gateway_type != "telegram": + return False + + if not self.telegram_chat_ids: raise UserError(_("Please add or fetch at least one Chat ID first.")) - for chat in self.chat_ids: + for chat in self.telegram_chat_ids: msg = ( - _("Success! Connection from Odoo 18 to %s is working.") + _("Success! Connection from Odoo to %s is working.") % self.name ) self.send_message(chat.chat_id, msg) @@ -55,6 +58,15 @@ def action_test_connection(self): def action_fetch_chats(self): """Automatically discovers Chat IDs of people who messaged the bot""" self.ensure_one() + if self.gateway_type != "telegram": + return False + + if self.webhook_key: + raise UserError(_( + "Telegram does not allow fetching updates manually while a Webhook is active. " + "Please disable the Webhook before using 'Fetch Chats'." + )) + url = f"https://api.telegram.org/bot{self.token}/getUpdates" try: response = requests.get(url, timeout=10) @@ -77,26 +89,15 @@ def action_fetch_chats(self): or "Unknown" ) - if not self.chat_ids.filtered(lambda c, c_id=c_id: c.chat_id == c_id): + if not self.telegram_chat_ids.filtered(lambda c, c_id=c_id: c.chat_id == c_id): self.env["telegram.chat"].create( { "name": c_name, "chat_id": c_id, - "bot_id": self.id, + "gateway_id": self.id, } ) return True except Exception as e: _logger.error("Fetch failed: %s", e) return False - - -class TelegramChat(models.Model): - _name = "telegram.chat" - _description = "Telegram Chat" - - name = fields.Char( - required=True, help="Friendly name for the chat (e.g. Admin Group)" - ) - chat_id = fields.Char(required=True, help="Numeric ID from Telegram") - bot_id = fields.Many2one("telegram.bot", ondelete="cascade") diff --git a/telegram_base/models/telegram_chat.py b/telegram_base/models/telegram_chat.py new file mode 100644 index 0000000000..2add70ddce --- /dev/null +++ b/telegram_base/models/telegram_chat.py @@ -0,0 +1,14 @@ +from odoo import fields, models + + +class TelegramChat(models.Model): + _name = "telegram.chat" + _description = "Telegram Chat" + + name = fields.Char( + required=True, help="Friendly name for the chat (e.g. Admin Group)" + ) + chat_id = fields.Char(required=True, help="Numeric ID from Telegram") + gateway_id = fields.Many2one( + "mail.gateway", ondelete="cascade", string="Mail Gateway" + ) diff --git a/telegram_base/readme/USAGE.md b/telegram_base/readme/USAGE.md index d429b7120b..2c26d10e90 100644 --- a/telegram_base/readme/USAGE.md +++ b/telegram_base/readme/USAGE.md @@ -1,6 +1,6 @@ To use this module: -1. Go to **Settings > Technical > Telegram > Bots**. -2. Create a new Bot and enter the Token provided by @BotFather. +1. Go to **Settings > Technical > Email > Gateways**. +2. Create a new Gateway, set the Gateway Type to "Telegram", and enter the Token provided by @BotFather. 3. Click the **Fetch Chats** button to automatically find Chat IDs of people who have messaged the bot. -4. Click **Test Connection** to verify that Odoo can communicate with Telegram. \ No newline at end of file +4. Click **Test Connection** to verify that Odoo can communicate with Telegram. \ No newline at end of file diff --git a/telegram_base/security/ir.model.access.csv b/telegram_base/security/ir.model.access.csv index c27084a725..ea68ed746f 100644 --- a/telegram_base/security/ir.model.access.csv +++ b/telegram_base/security/ir.model.access.csv @@ -1,3 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_telegram_bot_admin,telegram.bot.admin,model_telegram_bot,base.group_system,1,1,1,1 access_telegram_chat_admin,telegram.chat.admin,model_telegram_chat,base.group_system,1,1,1,1 diff --git a/telegram_base/static/description/index.html b/telegram_base/static/description/index.html index 8613d438f4..c770c03664 100644 --- a/telegram_base/static/description/index.html +++ b/telegram_base/static/description/index.html @@ -391,8 +391,9 @@

Telegram Base

Usage

To use this module:

    -
  1. Go to Settings > Technical > Telegram > Bots.
  2. -
  3. Create a new Bot and enter the Token provided by @BotFather.
  4. +
  5. Go to Settings > Technical > Email > Gateways.
  6. +
  7. Create a new Gateway, set the Gateway Type to “Telegram”, and enter +the Token provided by @BotFather.
  8. Click the Fetch Chats button to automatically find Chat IDs of people who have messaged the bot.
  9. Click Test Connection to verify that Odoo can communicate with diff --git a/telegram_base/tests/__init__.py b/telegram_base/tests/__init__.py index 4f7e73c971..58bb1aab54 100644 --- a/telegram_base/tests/__init__.py +++ b/telegram_base/tests/__init__.py @@ -1 +1 @@ -from . import test_telegram_bot +from . import test_telegram_base diff --git a/telegram_base/tests/test_telegram_bot.py b/telegram_base/tests/test_telegram_base.py similarity index 93% rename from telegram_base/tests/test_telegram_bot.py rename to telegram_base/tests/test_telegram_base.py index 1f76537e1e..aad3599a4f 100644 --- a/telegram_base/tests/test_telegram_bot.py +++ b/telegram_base/tests/test_telegram_base.py @@ -14,9 +14,10 @@ class TestTelegramBot(TransactionCase): def setUp(self): super().setUp() # Create a test bot - self.bot = self.env["telegram.bot"].create( + self.bot = self.env["mail.gateway"].create( { "name": "Test Bot", + "gateway_type": "telegram", "token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", } ) @@ -25,7 +26,7 @@ def setUp(self): { "name": "Test Chat", "chat_id": "1856618864", - "bot_id": self.bot.id, + "gateway_id": self.bot.id, } ) @@ -45,7 +46,7 @@ def test_send_message_success(self, mock_post): def test_action_test_connection_no_chats(self): """Test action_test_connection raises UserError when no chats""" - self.bot.chat_ids = [(5, 0, 0)] # Clear chats + self.bot.telegram_chat_ids = [(5, 0, 0)] # Clear chats with self.assertRaises(UserError): self.bot.action_test_connection() @@ -60,7 +61,7 @@ def test_action_test_connection_success(self, mock_post): self.assertEqual(mock_post.call_count, 1) self.assertEqual(res.get("effect", {}).get("type"), "rainbow_man") - @mute_logger("odoo.addons.telegram_base.models.telegram_bot") + @mute_logger("odoo.addons.telegram_base.models.mail_gateway") @patch("requests.Session.post") def test_send_message_failure(self, mock_post): """Test handling of a connection failure""" @@ -127,7 +128,7 @@ def test_action_fetch_chats_empty_message(self, mock_get): result = self.bot.action_fetch_chats() self.assertTrue(result) - @mute_logger("odoo.addons.telegram_base.models.telegram_bot") + @mute_logger("odoo.addons.telegram_base.models.mail_gateway") @patch("requests.get") def test_action_fetch_chats_exception(self, mock_get): """Test action_fetch_chats handles exceptions""" diff --git a/telegram_base/views/mail_gateway_views.xml b/telegram_base/views/mail_gateway_views.xml new file mode 100644 index 0000000000..40d120ec4b --- /dev/null +++ b/telegram_base/views/mail_gateway_views.xml @@ -0,0 +1,38 @@ + + + + mail.gateway.view.form.inherit.telegram.base + mail.gateway + + + + +
@@ -453,7 +453,7 @@

Maintainers

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 project on GitHub.

+

This module is part of the OCA/social project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/fetchmail_thread_default/tests/test_fetchmail.py b/fetchmail_thread_default/tests/test_fetchmail.py index 7325ef3bfc..43e66d6108 100644 --- a/fetchmail_thread_default/tests/test_fetchmail.py +++ b/fetchmail_thread_default/tests/test_fetchmail.py @@ -1,10 +1,11 @@ # Copyright 2017 Tecnativa - Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo.addons.mail.tests.test_mail_gateway import MAIL_TEMPLATE from odoo.tests.common import SavepointCase from odoo.tools import mute_logger +from odoo.addons.test_mail.tests.test_mail_gateway import MAIL_TEMPLATE + class FetchmailCase(SavepointCase): @classmethod @@ -21,7 +22,7 @@ def test_available_models(self): def test_emptying_default_thread(self): """Choosing an ``object_id`` empties ``default_thread_id``.""" - self.server.write({'object_id': 1}) + self.server.write({"object_id": 1}) self.server.onchange_server_type() self.assertFalse(self.server.default_thread_id) @@ -31,25 +32,24 @@ def test_emptying_object(self): self.server._onchange_remove_object_id() self.assertFalse(self.server.object_id) - @mute_logger('odoo.addons.mail.models.mail_thread', 'odoo.models') + @mute_logger("odoo.addons.mail.models.mail_thread", "odoo.models") def test_unbound_incoming_email(self): """An unbound incoming email gets posted to the sink.""" # Imitate what self.server.feth_mail() would do - result = ( - self.MailThread.with_context(fetchmail_server_id=self.server.id) - .message_process( - self.server.object_id.model, - MAIL_TEMPLATE.format( - email_from="spambot@example.com", - to="you@example.com", - cc="nobody@example.com", - subject="I'm a robot, hello", - extra="", - msg_id="", - ), - save_original=self.server.original, - strip_attachments=not self.server.attach, - ) + result = self.MailThread.with_context( + fetchmail_server_id=self.server.id + ).message_process( + self.server.object_id.model, + MAIL_TEMPLATE.format( + email_from="spambot@example.com", + to="you@example.com", + cc="nobody@example.com", + subject="I'm a robot, hello", + extra="", + msg_id="", + ), + save_original=self.server.original, + strip_attachments=not self.server.attach, ) self.assertEqual(self.server.default_thread_id, self.sink) self.assertEqual(result, self.sink.id) From 4fb1e1553757ad2569857910800ca1917c26bc0e Mon Sep 17 00:00:00 2001 From: Radovan Skolnik Date: Thu, 23 Jul 2020 09:52:38 +0200 Subject: [PATCH 22/31] [MIG] fetchmail_thread_default: Migration to 13.0 --- fetchmail_thread_default/README.rst | 10 +++++----- fetchmail_thread_default/__manifest__.py | 4 ++-- fetchmail_thread_default/demo/data.xml | 11 +++++------ fetchmail_thread_default/i18n/ca.po | 17 ++++++++++------- fetchmail_thread_default/i18n/de.po | 17 ++++++++++------- fetchmail_thread_default/i18n/es.po | 17 ++++++++++------- .../i18n/fetchmail_thread_default.pot | 18 +++++++++--------- fetchmail_thread_default/i18n/fr.po | 17 ++++++++++------- fetchmail_thread_default/i18n/hr.po | 17 ++++++++++------- fetchmail_thread_default/i18n/it.po | 17 ++++++++++------- fetchmail_thread_default/i18n/pt_BR.po | 17 ++++++++++------- fetchmail_thread_default/i18n/pt_PT.po | 12 ++++++------ fetchmail_thread_default/i18n/sl.po | 17 ++++++++++------- fetchmail_thread_default/i18n/tr.po | 17 ++++++++++------- fetchmail_thread_default/i18n/zh_CN.po | 17 ++++++++++------- .../models/fetchmail_server.py | 5 ++--- .../static/description/index.html | 6 +++--- .../views/fetchmail_server_view.xml | 7 +++---- 18 files changed, 135 insertions(+), 108 deletions(-) diff --git a/fetchmail_thread_default/README.rst b/fetchmail_thread_default/README.rst index 130398b9bd..89e832aeae 100644 --- a/fetchmail_thread_default/README.rst +++ b/fetchmail_thread_default/README.rst @@ -14,13 +14,13 @@ Default Thread For Unbounded Emails :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/12.0/fetchmail_thread_default + :target: https://github.com/OCA/social/tree/13.0/fetchmail_thread_default :alt: OCA/social .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/social-12-0/social-12-0-fetchmail_thread_default + :target: https://translation.odoo-community.org/projects/social-13-0/social-13-0-fetchmail_thread_default :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/205/12.0 + :target: https://runbot.odoo-community.org/runbot/205/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -75,7 +75,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -108,6 +108,6 @@ 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 `_ project on GitHub. +This module is part of the `OCA/social `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fetchmail_thread_default/__manifest__.py b/fetchmail_thread_default/__manifest__.py index 33dfef6f60..f1078eaa0b 100644 --- a/fetchmail_thread_default/__manifest__.py +++ b/fetchmail_thread_default/__manifest__.py @@ -3,9 +3,9 @@ { "name": "Default Thread For Unbounded Emails", "summary": "Post unkonwn messages to an existing thread", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "category": "Discuss", - "website": "https://www.github.com/social", + "website": "https://github.com/OCA/social", "author": "Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, diff --git a/fetchmail_thread_default/demo/data.xml b/fetchmail_thread_default/demo/data.xml index 0e16d30dcd..6f52b3b402 100644 --- a/fetchmail_thread_default/demo/data.xml +++ b/fetchmail_thread_default/demo/data.xml @@ -1,23 +1,22 @@ - + - mailsink - + Unbounded email sink everyone private - + Demo server - pop + pop pop3.example.com - + diff --git a/fetchmail_thread_default/i18n/ca.po b/fetchmail_thread_default/i18n/ca.po index a034c5b09a..1a0e840683 100644 --- a/fetchmail_thread_default/i18n/ca.po +++ b/fetchmail_thread_default/i18n/ca.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -29,17 +29,20 @@ msgid "Email Thread" msgstr "Tema del Correu electrònic " #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "Servidor POP/IMAP" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "Servidor POP/IMAP" diff --git a/fetchmail_thread_default/i18n/de.po b/fetchmail_thread_default/i18n/de.po index 64da60f572..97b5431f83 100644 --- a/fetchmail_thread_default/i18n/de.po +++ b/fetchmail_thread_default/i18n/de.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "Email-Thread" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "POP/IMAP-Server" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "POP/IMAP-Server" diff --git a/fetchmail_thread_default/i18n/es.po b/fetchmail_thread_default/i18n/es.po index 0816e19881..b477e8062d 100644 --- a/fetchmail_thread_default/i18n/es.po +++ b/fetchmail_thread_default/i18n/es.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "Hilo de mensajes" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "Servidor POP/IMP" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "Servidor POP/IMP" diff --git a/fetchmail_thread_default/i18n/fetchmail_thread_default.pot b/fetchmail_thread_default/i18n/fetchmail_thread_default.pot index a431c5d1e0..55b46c4b94 100644 --- a/fetchmail_thread_default/i18n/fetchmail_thread_default.pot +++ b/fetchmail_thread_default/i18n/fetchmail_thread_default.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * fetchmail_thread_default +# * fetchmail_thread_default # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -24,17 +24,17 @@ msgid "Email Thread" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" - diff --git a/fetchmail_thread_default/i18n/fr.po b/fetchmail_thread_default/i18n/fr.po index 502edbf433..3fa8b099f6 100644 --- a/fetchmail_thread_default/i18n/fr.po +++ b/fetchmail_thread_default/i18n/fr.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "Discussion de courriel" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "Serveur POP/IMAP" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "Serveur POP/IMAP" diff --git a/fetchmail_thread_default/i18n/hr.po b/fetchmail_thread_default/i18n/hr.po index 9ceabfe98f..aa213581a1 100644 --- a/fetchmail_thread_default/i18n/hr.po +++ b/fetchmail_thread_default/i18n/hr.po @@ -20,7 +20,7 @@ msgstr "" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "POP/IMAP Server" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "POP/IMAP Server" diff --git a/fetchmail_thread_default/i18n/it.po b/fetchmail_thread_default/i18n/it.po index 57bbf2cc1b..54895201f5 100644 --- a/fetchmail_thread_default/i18n/it.po +++ b/fetchmail_thread_default/i18n/it.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "Discussione Email" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "Server POP/IMAP" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "Server POP/IMAP" diff --git a/fetchmail_thread_default/i18n/pt_BR.po b/fetchmail_thread_default/i18n/pt_BR.po index 57a7f69095..529a176fd6 100644 --- a/fetchmail_thread_default/i18n/pt_BR.po +++ b/fetchmail_thread_default/i18n/pt_BR.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "Processo Email" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "Servidor POP/IMAP" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "Servidor POP/IMAP" diff --git a/fetchmail_thread_default/i18n/pt_PT.po b/fetchmail_thread_default/i18n/pt_PT.po index 7d9faa7be9..809427dd62 100644 --- a/fetchmail_thread_default/i18n/pt_PT.po +++ b/fetchmail_thread_default/i18n/pt_PT.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,14 +30,14 @@ msgid "Email Thread" msgstr "Tópico de Email" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." msgstr "" #. module: fetchmail_thread_default diff --git a/fetchmail_thread_default/i18n/sl.po b/fetchmail_thread_default/i18n/sl.po index f3d38c6d99..3a65c880e1 100644 --- a/fetchmail_thread_default/i18n/sl.po +++ b/fetchmail_thread_default/i18n/sl.po @@ -20,7 +20,7 @@ msgstr "" "%100==4 ? 2 : 3);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "E-poštni niz" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "POP/IMAP strežnik" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "POP/IMAP strežnik" diff --git a/fetchmail_thread_default/i18n/tr.po b/fetchmail_thread_default/i18n/tr.po index 7bcd3940e8..8f5bf4584e 100644 --- a/fetchmail_thread_default/i18n/tr.po +++ b/fetchmail_thread_default/i18n/tr.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "Eposta konuşması" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "POP/IMAP sunucu" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "POP/IMAP sunucu" diff --git a/fetchmail_thread_default/i18n/zh_CN.po b/fetchmail_thread_default/i18n/zh_CN.po index 7039e98cd2..f50e8216e7 100644 --- a/fetchmail_thread_default/i18n/zh_CN.po +++ b/fetchmail_thread_default/i18n/zh_CN.po @@ -20,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" #. module: fetchmail_thread_default -#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server_default_thread_id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "Default mail thread" msgstr "" @@ -30,17 +30,20 @@ msgid "Email Thread" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server_default_thread_id -msgid "" -"Messages with no clear route will be posted as a new message to this thread." +#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server +msgid "Incoming Mail Server" msgstr "" #. module: fetchmail_thread_default -#: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server -msgid "POP/IMAP Server" -msgstr "POP/IMAP 服务器" +#: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id +msgid "" +"Messages with no clear route will be posted as a new message to this thread." +msgstr "" #. module: fetchmail_thread_default #: model:mail.channel,name:fetchmail_thread_default.demo_sink msgid "mailsink" msgstr "" + +#~ msgid "POP/IMAP Server" +#~ msgstr "POP/IMAP 服务器" diff --git a/fetchmail_thread_default/models/fetchmail_server.py b/fetchmail_thread_default/models/fetchmail_server.py index fe5803bf71..5ff14fc168 100644 --- a/fetchmail_thread_default/models/fetchmail_server.py +++ b/fetchmail_thread_default/models/fetchmail_server.py @@ -30,17 +30,16 @@ def _get_thread_models(self): return [ (m.model, m.name) for m in models - if m.model in self.env and getattr(self.env[m.model], "_auto") + if m.model in self.env and self.env[m.model]._auto ] - @api.onchange("type", "is_ssl", "object_id") + @api.onchange("server_type", "is_ssl", "object_id") def onchange_server_type(self): """Remove :attr:`default_thread_id` if there is :attr:`object_id`.""" if self.object_id: self.default_thread_id = False return super(FetchmailServer, self).onchange_server_type() - @api.multi @api.onchange("default_thread_id") def _onchange_remove_object_id(self): """Remove :attr:`object_id` if there is :attr:`default_thread_id`.""" diff --git a/fetchmail_thread_default/static/description/index.html b/fetchmail_thread_default/static/description/index.html index 60dee8a841..5d81be9183 100644 --- a/fetchmail_thread_default/static/description/index.html +++ b/fetchmail_thread_default/static/description/index.html @@ -367,7 +367,7 @@

Default Thread For Unbounded Emails

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runbot

This module extends the functionality of mail fetching to support choosing a mail thread that acts as a mail sink and gathers all mail messages that Odoo does not know where to put.

@@ -425,7 +425,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -453,7 +453,7 @@

Maintainers

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 project on GitHub.

+

This module is part of the OCA/social project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/fetchmail_thread_default/views/fetchmail_server_view.xml b/fetchmail_thread_default/views/fetchmail_server_view.xml index ee7f84d3a7..314ff06bf1 100644 --- a/fetchmail_thread_default/views/fetchmail_server_view.xml +++ b/fetchmail_thread_default/views/fetchmail_server_view.xml @@ -1,16 +1,15 @@ - + - Add default thread fetchmail.server - + - + From 31e2ef89745d43a782dc41611e589657fafea9ed Mon Sep 17 00:00:00 2001 From: Giovanni Francesco Capalbo Date: Fri, 16 Jun 2023 15:23:17 +0200 Subject: [PATCH 23/31] [MIG] [14.0] fetchmail_thread_default --- fetchmail_thread_default/README.rst | 28 +++++++---- fetchmail_thread_default/__manifest__.py | 5 +- fetchmail_thread_default/i18n/ca.po | 18 +++++++ fetchmail_thread_default/i18n/de.po | 18 +++++++ fetchmail_thread_default/i18n/es.po | 18 +++++++ .../i18n/fetchmail_thread_default.pot | 20 +++++++- fetchmail_thread_default/i18n/fr.po | 18 +++++++ fetchmail_thread_default/i18n/hr.po | 18 +++++++ fetchmail_thread_default/i18n/it.po | 18 +++++++ fetchmail_thread_default/i18n/pt_BR.po | 18 +++++++ fetchmail_thread_default/i18n/pt_PT.po | 18 +++++++ fetchmail_thread_default/i18n/sl.po | 18 +++++++ fetchmail_thread_default/i18n/tr.po | 18 +++++++ fetchmail_thread_default/i18n/zh_CN.po | 18 +++++++ .../models/mail_thread.py | 2 +- .../readme/CONTRIBUTORS.rst | 4 ++ .../static/description/index.html | 50 +++++++++++-------- .../tests/test_fetchmail.py | 2 +- 18 files changed, 272 insertions(+), 37 deletions(-) diff --git a/fetchmail_thread_default/README.rst b/fetchmail_thread_default/README.rst index 89e832aeae..74292c86b9 100644 --- a/fetchmail_thread_default/README.rst +++ b/fetchmail_thread_default/README.rst @@ -2,10 +2,13 @@ Default Thread For Unbounded Emails =================================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9258be92f2d70f6f3e7f031810ef917b314e17537387238e6bb8d7272c95c517 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ Default Thread For Unbounded Emails :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/13.0/fetchmail_thread_default + :target: https://github.com/OCA/social/tree/14.0/fetchmail_thread_default :alt: OCA/social .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/social-13-0/social-13-0-fetchmail_thread_default + :target: https://translation.odoo-community.org/projects/social-14-0/social-14-0-fetchmail_thread_default :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/205/13.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=14.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module extends the functionality of mail fetching to support choosing a mail thread that acts as a mail sink and gathers all mail messages that Odoo @@ -74,8 +77,8 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -86,6 +89,7 @@ Authors ~~~~~~~ * Tecnativa +* Therp BV Contributors ~~~~~~~~~~~~ @@ -95,6 +99,10 @@ Contributors * Jairo Llopis * David Vidal +* `Therp BV `_: + + * Giovanni Francesco Capalbo + Maintainers ~~~~~~~~~~~ @@ -108,6 +116,6 @@ 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 `_ project on GitHub. +This module is part of the `OCA/social `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fetchmail_thread_default/__manifest__.py b/fetchmail_thread_default/__manifest__.py index f1078eaa0b..88dca97aad 100644 --- a/fetchmail_thread_default/__manifest__.py +++ b/fetchmail_thread_default/__manifest__.py @@ -1,12 +1,13 @@ # Copyright 2017 Tecnativa - Jairo Llopis +# Copyright 2023 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Default Thread For Unbounded Emails", "summary": "Post unkonwn messages to an existing thread", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "category": "Discuss", "website": "https://github.com/OCA/social", - "author": "Tecnativa, Odoo Community Association (OCA)", + "author": "Tecnativa, Therp BV, Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, "installable": True, diff --git a/fetchmail_thread_default/i18n/ca.po b/fetchmail_thread_default/i18n/ca.po index 1a0e840683..92c65a66f6 100644 --- a/fetchmail_thread_default/i18n/ca.po +++ b/fetchmail_thread_default/i18n/ca.po @@ -23,16 +23,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Tema del Correu electrònic " +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/de.po b/fetchmail_thread_default/i18n/de.po index 97b5431f83..6eebbb28d6 100644 --- a/fetchmail_thread_default/i18n/de.po +++ b/fetchmail_thread_default/i18n/de.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Email-Thread" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/es.po b/fetchmail_thread_default/i18n/es.po index b477e8062d..df677e43da 100644 --- a/fetchmail_thread_default/i18n/es.po +++ b/fetchmail_thread_default/i18n/es.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Hilo de mensajes" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/fetchmail_thread_default.pot b/fetchmail_thread_default/i18n/fetchmail_thread_default.pot index 55b46c4b94..f5be23128e 100644 --- a/fetchmail_thread_default/i18n/fetchmail_thread_default.pot +++ b/fetchmail_thread_default/i18n/fetchmail_thread_default.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,16 +18,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/fr.po b/fetchmail_thread_default/i18n/fr.po index 3fa8b099f6..44ac01cfc3 100644 --- a/fetchmail_thread_default/i18n/fr.po +++ b/fetchmail_thread_default/i18n/fr.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Discussion de courriel" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/hr.po b/fetchmail_thread_default/i18n/hr.po index aa213581a1..055a8aeccc 100644 --- a/fetchmail_thread_default/i18n/hr.po +++ b/fetchmail_thread_default/i18n/hr.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/it.po b/fetchmail_thread_default/i18n/it.po index 54895201f5..884aff0887 100644 --- a/fetchmail_thread_default/i18n/it.po +++ b/fetchmail_thread_default/i18n/it.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Discussione Email" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/pt_BR.po b/fetchmail_thread_default/i18n/pt_BR.po index 529a176fd6..bf7189d5ef 100644 --- a/fetchmail_thread_default/i18n/pt_BR.po +++ b/fetchmail_thread_default/i18n/pt_BR.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Processo Email" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/pt_PT.po b/fetchmail_thread_default/i18n/pt_PT.po index 809427dd62..72b164b83b 100644 --- a/fetchmail_thread_default/i18n/pt_PT.po +++ b/fetchmail_thread_default/i18n/pt_PT.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Tópico de Email" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/sl.po b/fetchmail_thread_default/i18n/sl.po index 3a65c880e1..d320031738 100644 --- a/fetchmail_thread_default/i18n/sl.po +++ b/fetchmail_thread_default/i18n/sl.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "E-poštni niz" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/tr.po b/fetchmail_thread_default/i18n/tr.po index 8f5bf4584e..c91fcb73a7 100644 --- a/fetchmail_thread_default/i18n/tr.po +++ b/fetchmail_thread_default/i18n/tr.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "Eposta konuşması" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/i18n/zh_CN.po b/fetchmail_thread_default/i18n/zh_CN.po index f50e8216e7..bba454da92 100644 --- a/fetchmail_thread_default/i18n/zh_CN.po +++ b/fetchmail_thread_default/i18n/zh_CN.po @@ -24,16 +24,34 @@ msgstr "" msgid "Default mail thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__display_name +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__display_name +msgid "Display Name" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_mail_thread msgid "Email Thread" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__id +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread__id +msgid "ID" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model,name:fetchmail_thread_default.model_fetchmail_server msgid "Incoming Mail Server" msgstr "" +#. module: fetchmail_thread_default +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server____last_update +#: model:ir.model.fields,field_description:fetchmail_thread_default.field_mail_thread____last_update +msgid "Last Modified on" +msgstr "" + #. module: fetchmail_thread_default #: model:ir.model.fields,help:fetchmail_thread_default.field_fetchmail_server__default_thread_id msgid "" diff --git a/fetchmail_thread_default/models/mail_thread.py b/fetchmail_thread_default/models/mail_thread.py index dd8e104e54..146453b1dc 100644 --- a/fetchmail_thread_default/models/mail_thread.py +++ b/fetchmail_thread_default/models/mail_thread.py @@ -18,7 +18,7 @@ def message_process( thread_id=None, ): server = self.env["fetchmail.server"].browse( - self.env.context.get("fetchmail_server_id") + self.env.context.get("default_fetchmail_server_id") ) if server.default_thread_id and not (model or thread_id): model = server.default_thread_id._name diff --git a/fetchmail_thread_default/readme/CONTRIBUTORS.rst b/fetchmail_thread_default/readme/CONTRIBUTORS.rst index 4b1737940c..4b7cb43c37 100644 --- a/fetchmail_thread_default/readme/CONTRIBUTORS.rst +++ b/fetchmail_thread_default/readme/CONTRIBUTORS.rst @@ -2,3 +2,7 @@ * Jairo Llopis * David Vidal + +* `Therp BV `_: + + * Giovanni Francesco Capalbo diff --git a/fetchmail_thread_default/static/description/index.html b/fetchmail_thread_default/static/description/index.html index 5d81be9183..2de62eafde 100644 --- a/fetchmail_thread_default/static/description/index.html +++ b/fetchmail_thread_default/static/description/index.html @@ -1,20 +1,19 @@ - - + Default Thread For Unbounded Emails -
-

Default Thread For Unbounded Emails

+
+ + +Odoo Community Association + +
+

Default Thread For Unbounded Emails

-

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

This module extends the functionality of mail fetching to support choosing a mail thread that acts as a mail sink and gathers all mail messages that Odoo does not know where to put.

@@ -398,7 +403,7 @@

Default Thread For Unbounded Emails

-

Configuration

+

Configuration

To configure this module, you need to:

  1. Go to Settings > General Settings > Configure the incoming email gateway.

    @@ -414,7 +419,7 @@

    Configuration

-

Usage

+

Usage

To use this module, you need to:

  1. Subscribe to the thread you chose as the Default mail thread.
  2. @@ -423,7 +428,7 @@

    Usage

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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 @@ -431,16 +436,16 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Tecnativa
  • Therp BV
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

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.

@@ -465,5 +472,6 @@

Maintainers

+
From 2ff892229bd02424feb400ce490814e37098d5d6 Mon Sep 17 00:00:00 2001 From: mymage Date: Wed, 15 Oct 2025 09:21:45 +0000 Subject: [PATCH 29/31] Translated using Weblate (Italian) Currently translated at 100.0% (4 of 4 strings) Translation: social-16.0/social-16.0-fetchmail_thread_default Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-fetchmail_thread_default/it/ --- fetchmail_thread_default/i18n/it.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fetchmail_thread_default/i18n/it.po b/fetchmail_thread_default/i18n/it.po index 1083ca40a2..e0b3442c3d 100644 --- a/fetchmail_thread_default/i18n/it.po +++ b/fetchmail_thread_default/i18n/it.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-06-10 02:46+0000\n" -"PO-Revision-Date: 2024-03-21 13:04+0000\n" +"PO-Revision-Date: 2025-10-15 11:43+0000\n" "Last-Translator: mymage \n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" "Language: it\n" @@ -18,7 +18,7 @@ msgstr "" "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" +"X-Generator: Weblate 5.10.4\n" #. module: fetchmail_thread_default #: model:ir.model.fields,field_description:fetchmail_thread_default.field_fetchmail_server__default_thread_id @@ -40,7 +40,7 @@ msgstr "Server di posta in arrivo" msgid "" "Messages with no clear route will be posted as a new message to this thread." msgstr "" -"Messaggi senza un percorso chiaro verranno inseriti come nuovi messaggui in " +"Messaggi senza un percorso chiaro verranno inseriti come nuovi messaggi in " "questo argomento." #~ msgid "POP/IMAP Server" From a80f921ff7ca0d5d7af2c8b67c6ee5c61e255b93 Mon Sep 17 00:00:00 2001 From: Kaynnan Lemes Date: Sun, 22 Mar 2026 11:35:07 -0300 Subject: [PATCH 30/31] [IMP] fetchmail_thread_default: pre-commit auto fixes --- fetchmail_thread_default/README.rst | 77 ++++++++++--------- fetchmail_thread_default/demo/data.xml | 2 - .../models/fetchmail_server.py | 2 +- fetchmail_thread_default/pyproject.toml | 3 + fetchmail_thread_default/readme/CONFIGURE.md | 13 ++++ fetchmail_thread_default/readme/CONFIGURE.rst | 9 --- .../readme/CONTRIBUTORS.md | 5 ++ .../readme/CONTRIBUTORS.rst | 8 -- .../readme/DESCRIPTION.md | 17 ++++ .../readme/DESCRIPTION.rst | 16 ---- fetchmail_thread_default/readme/USAGE.md | 5 ++ fetchmail_thread_default/readme/USAGE.rst | 5 -- .../static/description/index.html | 62 +++++++-------- .../views/fetchmail_server_view.xml | 2 - 14 files changed, 112 insertions(+), 114 deletions(-) create mode 100644 fetchmail_thread_default/pyproject.toml create mode 100644 fetchmail_thread_default/readme/CONFIGURE.md delete mode 100644 fetchmail_thread_default/readme/CONFIGURE.rst create mode 100644 fetchmail_thread_default/readme/CONTRIBUTORS.md delete mode 100644 fetchmail_thread_default/readme/CONTRIBUTORS.rst create mode 100644 fetchmail_thread_default/readme/DESCRIPTION.md delete mode 100644 fetchmail_thread_default/readme/DESCRIPTION.rst create mode 100644 fetchmail_thread_default/readme/USAGE.md delete mode 100644 fetchmail_thread_default/readme/USAGE.rst diff --git a/fetchmail_thread_default/README.rst b/fetchmail_thread_default/README.rst index 2201e31f6c..d55dafab56 100644 --- a/fetchmail_thread_default/README.rst +++ b/fetchmail_thread_default/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - =================================== Default Thread For Unbounded Emails =================================== @@ -17,37 +13,38 @@ Default Thread For Unbounded Emails .. |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 +.. |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%2Fsocial-lightgray.png?logo=github - :target: https://github.com/OCA/social/tree/16.0/fetchmail_thread_default + :target: https://github.com/OCA/social/tree/18.0/fetchmail_thread_default :alt: OCA/social .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/social-16-0/social-16-0-fetchmail_thread_default + :target: https://translation.odoo-community.org/projects/social-18-0/social-18-0-fetchmail_thread_default :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=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/social&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module extends the functionality of mail fetching to support choosing a -mail thread that acts as a mail sink and gathers all mail messages that Odoo -does not know where to put. +This module extends the functionality of mail fetching to support +choosing a mail thread that acts as a mail sink and gathers all mail +messages that Odoo does not know where to put. -Dangling emails are really a problem because if you do not care about them, -SPAM can enter your inbox and keep increasing fetchmail process network quota -because Odoo would gather them every time it runs the fetchmail process. +Dangling emails are really a problem because if you do not care about +them, SPAM can enter your inbox and keep increasing fetchmail process +network quota because Odoo would gather them every time it runs the +fetchmail process. -Before this, your only choice was to create a new record for those unbounded -emails. That could be useful under some circumstances, like creating a -``crm.lead`` for them, but what happens if you do not want to have lots of -spammy leads? Or if you do not need Odoo's CRM at all? +Before this, your only choice was to create a new record for those +unbounded emails. That could be useful under some circumstances, like +creating a ``crm.lead`` for them, but what happens if you do not want to +have lots of spammy leads? Or if you do not need Odoo's CRM at all? -Here we come to the rescue. This simple addons adds almost none dependencies -and allows you to direct those mails somewhere you can handle or ignore at -wish. +Here we come to the rescue. This simple addons adds almost none +dependencies and allows you to direct those mails somewhere you can +handle or ignore at wish. **Table of contents** @@ -59,10 +56,14 @@ Configuration To configure this module, you need to: -#. Go to *Settings > General Settings > Configure the incoming email gateway*. -#. Create or edit a record. -#. Configure properly. -#. Under *Default mail thread*, choose a model and record. +1. Go to *Settings > General Settings > Configure the incoming email + gateway*. + +2. Create or edit a record. + +3. Configure properly. + +4. Under *Default mail thread*, choose a model and record. Tip: if you do not know what to choose, we suggest you to use a mail channel. @@ -72,9 +73,9 @@ Usage To use this module, you need to: -#. Subscribe to the thread you chose as the *Default mail thread*. -#. You will be notified when a new unbound email lands in that thread. -#. Do what you want with it. +1. Subscribe to the thread you chose as the *Default mail thread*. +2. You will be notified when a new unbound email lands in that thread. +3. Do what you want with it. Bug Tracker =========== @@ -82,7 +83,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -90,25 +91,25 @@ Credits ======= Authors -~~~~~~~ +------- * Tecnativa * Therp BV Contributors -~~~~~~~~~~~~ +------------ -* `Tecnativa `_: +- `Tecnativa `__: - * Jairo Llopis - * David Vidal + - Jairo Llopis + - David Vidal -* `Therp BV `_: +- `Therp BV `__: - * Giovanni Francesco Capalbo + - Giovanni Francesco Capalbo Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -120,6 +121,6 @@ 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 `_ project on GitHub. +This module is part of the `OCA/social `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/fetchmail_thread_default/demo/data.xml b/fetchmail_thread_default/demo/data.xml index 41f6ddbccc..7540bc333e 100644 --- a/fetchmail_thread_default/demo/data.xml +++ b/fetchmail_thread_default/demo/data.xml @@ -2,7 +2,6 @@ - mailsink Unbounded email sink @@ -16,5 +15,4 @@ - diff --git a/fetchmail_thread_default/models/fetchmail_server.py b/fetchmail_thread_default/models/fetchmail_server.py index 16cd9f8c57..6345d0adeb 100644 --- a/fetchmail_thread_default/models/fetchmail_server.py +++ b/fetchmail_thread_default/models/fetchmail_server.py @@ -39,7 +39,7 @@ def onchange_server_type(self): """Remove :attr:`default_thread_id` if there is :attr:`object_id`.""" if self.object_id: self.default_thread_id = False - return super(FetchmailServer, self).onchange_server_type() + return super().onchange_server_type() @api.onchange("default_thread_id") def _onchange_remove_object_id(self): diff --git a/fetchmail_thread_default/pyproject.toml b/fetchmail_thread_default/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/fetchmail_thread_default/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/fetchmail_thread_default/readme/CONFIGURE.md b/fetchmail_thread_default/readme/CONFIGURE.md new file mode 100644 index 0000000000..e90bad47d9 --- /dev/null +++ b/fetchmail_thread_default/readme/CONFIGURE.md @@ -0,0 +1,13 @@ +To configure this module, you need to: + +1. Go to *Settings \> General Settings \> Configure the incoming email + gateway*. + +2. Create or edit a record. + +3. Configure properly. + +4. Under *Default mail thread*, choose a model and record. + + Tip: if you do not know what to choose, we suggest you to use a mail + channel. diff --git a/fetchmail_thread_default/readme/CONFIGURE.rst b/fetchmail_thread_default/readme/CONFIGURE.rst deleted file mode 100644 index b163b948cd..0000000000 --- a/fetchmail_thread_default/readme/CONFIGURE.rst +++ /dev/null @@ -1,9 +0,0 @@ -To configure this module, you need to: - -#. Go to *Settings > General Settings > Configure the incoming email gateway*. -#. Create or edit a record. -#. Configure properly. -#. Under *Default mail thread*, choose a model and record. - - Tip: if you do not know what to choose, we suggest you to use a mail - channel. diff --git a/fetchmail_thread_default/readme/CONTRIBUTORS.md b/fetchmail_thread_default/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..e2004c3b54 --- /dev/null +++ b/fetchmail_thread_default/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- [Tecnativa](https://www.tecnativa.com): + - Jairo Llopis + - David Vidal +- [Therp BV](https://www.therp.nl): + - Giovanni Francesco Capalbo diff --git a/fetchmail_thread_default/readme/CONTRIBUTORS.rst b/fetchmail_thread_default/readme/CONTRIBUTORS.rst deleted file mode 100644 index 4b7cb43c37..0000000000 --- a/fetchmail_thread_default/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,8 +0,0 @@ -* `Tecnativa `_: - - * Jairo Llopis - * David Vidal - -* `Therp BV `_: - - * Giovanni Francesco Capalbo diff --git a/fetchmail_thread_default/readme/DESCRIPTION.md b/fetchmail_thread_default/readme/DESCRIPTION.md new file mode 100644 index 0000000000..64e3032448 --- /dev/null +++ b/fetchmail_thread_default/readme/DESCRIPTION.md @@ -0,0 +1,17 @@ +This module extends the functionality of mail fetching to support +choosing a mail thread that acts as a mail sink and gathers all mail +messages that Odoo does not know where to put. + +Dangling emails are really a problem because if you do not care about +them, SPAM can enter your inbox and keep increasing fetchmail process +network quota because Odoo would gather them every time it runs the +fetchmail process. + +Before this, your only choice was to create a new record for those +unbounded emails. That could be useful under some circumstances, like +creating a `crm.lead` for them, but what happens if you do not want to +have lots of spammy leads? Or if you do not need Odoo's CRM at all? + +Here we come to the rescue. This simple addons adds almost none +dependencies and allows you to direct those mails somewhere you can +handle or ignore at wish. diff --git a/fetchmail_thread_default/readme/DESCRIPTION.rst b/fetchmail_thread_default/readme/DESCRIPTION.rst deleted file mode 100644 index 9d335296b2..0000000000 --- a/fetchmail_thread_default/readme/DESCRIPTION.rst +++ /dev/null @@ -1,16 +0,0 @@ -This module extends the functionality of mail fetching to support choosing a -mail thread that acts as a mail sink and gathers all mail messages that Odoo -does not know where to put. - -Dangling emails are really a problem because if you do not care about them, -SPAM can enter your inbox and keep increasing fetchmail process network quota -because Odoo would gather them every time it runs the fetchmail process. - -Before this, your only choice was to create a new record for those unbounded -emails. That could be useful under some circumstances, like creating a -``crm.lead`` for them, but what happens if you do not want to have lots of -spammy leads? Or if you do not need Odoo's CRM at all? - -Here we come to the rescue. This simple addons adds almost none dependencies -and allows you to direct those mails somewhere you can handle or ignore at -wish. diff --git a/fetchmail_thread_default/readme/USAGE.md b/fetchmail_thread_default/readme/USAGE.md new file mode 100644 index 0000000000..15dcc529df --- /dev/null +++ b/fetchmail_thread_default/readme/USAGE.md @@ -0,0 +1,5 @@ +To use this module, you need to: + +1. Subscribe to the thread you chose as the *Default mail thread*. +2. You will be notified when a new unbound email lands in that thread. +3. Do what you want with it. diff --git a/fetchmail_thread_default/readme/USAGE.rst b/fetchmail_thread_default/readme/USAGE.rst deleted file mode 100644 index 486d7c0751..0000000000 --- a/fetchmail_thread_default/readme/USAGE.rst +++ /dev/null @@ -1,5 +0,0 @@ -To use this module, you need to: - -#. Subscribe to the thread you chose as the *Default mail thread*. -#. You will be notified when a new unbound email lands in that thread. -#. Do what you want with it. diff --git a/fetchmail_thread_default/static/description/index.html b/fetchmail_thread_default/static/description/index.html index a4288cc4f1..31cb4ee604 100644 --- a/fetchmail_thread_default/static/description/index.html +++ b/fetchmail_thread_default/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Default Thread For Unbounded Emails -
+
+

Default Thread For Unbounded Emails

- - -Odoo Community Association - -
-

Default Thread For Unbounded Emails

-

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

-

This module extends the functionality of mail fetching to support choosing a -mail thread that acts as a mail sink and gathers all mail messages that Odoo -does not know where to put.

-

Dangling emails are really a problem because if you do not care about them, -SPAM can enter your inbox and keep increasing fetchmail process network quota -because Odoo would gather them every time it runs the fetchmail process.

-

Before this, your only choice was to create a new record for those unbounded -emails. That could be useful under some circumstances, like creating a -crm.lead for them, but what happens if you do not want to have lots of -spammy leads? Or if you do not need Odoo’s CRM at all?

-

Here we come to the rescue. This simple addons adds almost none dependencies -and allows you to direct those mails somewhere you can handle or ignore at -wish.

+

Beta License: AGPL-3 OCA/social Translate me on Weblate Try me on Runboat

+

This module extends the functionality of mail fetching to support +choosing a mail thread that acts as a mail sink and gathers all mail +messages that Odoo does not know where to put.

+

Dangling emails are really a problem because if you do not care about +them, SPAM can enter your inbox and keep increasing fetchmail process +network quota because Odoo would gather them every time it runs the +fetchmail process.

+

Before this, your only choice was to create a new record for those +unbounded emails. That could be useful under some circumstances, like +creating a crm.lead for them, but what happens if you do not want to +have lots of spammy leads? Or if you do not need Odoo’s CRM at all?

+

Here we come to the rescue. This simple addons adds almost none +dependencies and allows you to direct those mails somewhere you can +handle or ignore at wish.

Table of contents

    @@ -403,10 +399,11 @@

    Default Thread For Unbounded Emails

-

Configuration

+

Configuration

To configure this module, you need to:

    -
  1. Go to Settings > General Settings > Configure the incoming email gateway.

    +
  2. Go to Settings > General Settings > Configure the incoming email +gateway.

  3. Create or edit a record.

  4. @@ -419,7 +416,7 @@

    Configuration

-

Usage

+

Usage

To use this module, you need to:

  1. Subscribe to the thread you chose as the Default mail thread.
  2. @@ -428,24 +425,24 @@

    Usage

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Tecnativa
  • Therp BV
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -467,11 +464,10 @@

Maintainers

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 project on GitHub.

+

This module is part of the OCA/social project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

-
diff --git a/fetchmail_thread_default/views/fetchmail_server_view.xml b/fetchmail_thread_default/views/fetchmail_server_view.xml index 6d689854c2..08bed60101 100644 --- a/fetchmail_thread_default/views/fetchmail_server_view.xml +++ b/fetchmail_thread_default/views/fetchmail_server_view.xml @@ -2,7 +2,6 @@ - Add default thread fetchmail.server @@ -13,5 +12,4 @@ - From 9312d64f43f054a98e5e4b9b6d147157e7e5f4cd Mon Sep 17 00:00:00 2001 From: Kaynnan Lemes Date: Sun, 22 Mar 2026 11:42:05 -0300 Subject: [PATCH 31/31] [MIG] fetchmail_thread_default: Migration to 18.0 --- fetchmail_thread_default/__manifest__.py | 2 +- fetchmail_thread_default/demo/data.xml | 8 +++++--- fetchmail_thread_default/tests/test_fetchmail.py | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/fetchmail_thread_default/__manifest__.py b/fetchmail_thread_default/__manifest__.py index 2d47153d87..36dac86078 100644 --- a/fetchmail_thread_default/__manifest__.py +++ b/fetchmail_thread_default/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Default Thread For Unbounded Emails", "summary": "Post unkonwn messages to an existing thread", - "version": "16.0.1.1.0", + "version": "18.0.1.0.0", "category": "Discuss", "website": "https://github.com/OCA/social", "author": "Tecnativa, Therp BV, Odoo Community Association (OCA)", diff --git a/fetchmail_thread_default/demo/data.xml b/fetchmail_thread_default/demo/data.xml index 7540bc333e..8b1353f319 100644 --- a/fetchmail_thread_default/demo/data.xml +++ b/fetchmail_thread_default/demo/data.xml @@ -2,7 +2,7 @@ - + mailsink Unbounded email sink @@ -12,7 +12,9 @@ Demo server pop pop3.example.com - - + diff --git a/fetchmail_thread_default/tests/test_fetchmail.py b/fetchmail_thread_default/tests/test_fetchmail.py index 05e06d077d..2542fa6973 100644 --- a/fetchmail_thread_default/tests/test_fetchmail.py +++ b/fetchmail_thread_default/tests/test_fetchmail.py @@ -1,13 +1,13 @@ # Copyright 2017 Tecnativa - Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo.tests.common import TransactionCase from odoo.tools import mute_logger +from odoo.addons.base.tests.common import BaseCommon from odoo.addons.test_mail.tests.test_mail_gateway import MAIL_TEMPLATE -class FetchmailCase(TransactionCase): +class FetchmailCase(BaseCommon): @classmethod def setUpClass(cls): super().setUpClass()