[19.0][MIG] fetchmail_thread_default - #1898
Conversation
This addon lets the sysadmin choose a default mail thread sink for incoming mails. You can use it to forward all unbound incoming emails to a `mail.channel` where only certain users are subscribed and can triage them.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-13.0/social-13.0-fetchmail_thread_default Translate-URL: https://translation.odoo-community.org/projects/social-13-0/social-13-0-fetchmail_thread_default/
On fetchmail_thread_default when creating a new mail.message it says the context["fetchmail_server_id"] is None, the field value is context["default_fetchmail_server_id"].
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-14.0/social-14.0-fetchmail_thread_default Translate-URL: https://translation.odoo-community.org/projects/social-14-0/social-14-0-fetchmail_thread_default/
Currently translated at 12.5% (1 of 8 strings) Translation: social-14.0/social-14.0-fetchmail_thread_default Translate-URL: https://translation.odoo-community.org/projects/social-14-0/social-14-0-fetchmail_thread_default/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. 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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. 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/
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/
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/pt_BR/
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/
Currently translated at 100.0% (4 of 4 strings) Translation: social-18.0/social-18.0-fetchmail_thread_default Translate-URL: https://translation.odoo-community.org/projects/social-18-0/social-18-0-fetchmail_thread_default/es/
Currently translated at 100.0% (4 of 4 strings) Translation: social-18.0/social-18.0-fetchmail_thread_default Translate-URL: https://translation.odoo-community.org/projects/social-18-0/social-18-0-fetchmail_thread_default/sl/
|
@OCA/social-maintainers |
|
/ocabot migration fetchmail_thread_default |
|
This PR has the |
| # 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", |
| strip_attachments=False, | ||
| thread_id=None, | ||
| ): | ||
| server = self.env["fetchmail.server"].browse( |
There was a problem hiding this comment.
This is only needed when either model or thread_id are not set. So in many cases the browse action will be done for no purpose. Better to split the if condition like so:
if not (model or thread_id):
server = self.env["fetchmail.server"].browse(
self.env.context.get("default_fetchmail_server_id")
)
if server.default_thread_id:
model = server.default_thread_id._name
thread_id = server.default_thread_id.id
I kept the not (model or thread_id) but I wonder whether this is correct. A thread_id with no model does not make sense. But a model with thread_id filled will lead to creation of a new record in the model. We can assume no thread_id is passed without a model, but the following condition should be enough: if not model.
NL66278
left a comment
There was a problem hiding this comment.
👍 No really blocking issues, but if you could take up my comments, that would be nice.
No description provided.