RATIONALE
Purpose of this commit is to cleanup main post helpers and have a more easy
and understandable way of calling them.
SUMMARY
We now have two main API methods, based on business flow: either posting
on documents, either sending a mass mailing. Indeed those two flows are
different
* post: create message, then launch notification process by taking into
account subtype, followers, ...
* mail: create mails in batch with recipients being based on template or
given partners. No notifications is involved, only maybe traces if a
mass mailing is linked
Delegate QWeb rendering to the render mixin (i.e. _render_template_qweb_view)
in order to have a single point to forge evaluation context and re-use
existing rendering code.
SPECIFICATIONS
Main API helpers are now
* ``message_post_with_source``: (batch) post on records, using an ir.ui.view
(given a record or its xml id) or a mail.template record (given a record or
its xml id). When using a template, a composer is called to post on each
record (as batch post is not yet supported). When using a view, a direct
call to message_post using the rendered bodies is done, one record at a
time.
* ``message_mail_with_source``: send a mass mailing on records, acting like
invoking the mail composer in mass mode. Same arguments are valid, either
a reference to a view, either a reference to a mail template.
Other helpers are
* ``_message_log_with_view``: (batch) log on records, using an ir.ui.view
to render the body using QWeb (no notification process);
* ``_message_log(_batch)``: (batch) log on records (no notification process);
* ``message_notify``: notify partners on records (creating notifications
specifically for some people while message itself is not displayed in
chatter);
Code migration
* ``message_post_with_template`` in "mass mode": use ``message_mail_with_source``
and set the template record as source;
* ``message_post_with_template`` in "comment" mode: use ``message_post_with_source``
and set the template record as source;
* ``message_post_with_view``: its main usage was to post on a document, in which
case it generally can be replaced by ``message_mail_with_source`` using
the view reference as source;
Task-2710804 (Mail: Clean MailThread Posting API)
Part-of: odoo/odoo#99482
Odoo Blogs
Write, Design, Promote and Engage with Odoo Blogs.
Express yourself with the Odoo enterprise grade blogging platform. Write beautiful blog posts, engage with visitors, translate content and moderate social streams.
Get your blog posts efficiently referenced in Google and translated in mutiple languages in just a few clicks.
Write Beautiful Blog Posts
Drag & Drop well designed 'Building Blocks' to create beautifull blog posts that perfectly integrates images, videos, call-to-actions, quotes, banners, etc.
With our unique 'edit inline' approach, you don't need to be a designer to create awsome, good-looking, content. Each blog post will look like it's designed by a professional designer.
Automated Translation by Professionals
Get your blog posts translated in multiple languages with no effort. Our translation "on demand" feature allows you to benefit from professional translators to translate all your changes automatically. ($0.05 per word) Translated versions are updated automatically once translated by professionals (around 32 hours).
Engage With Your Visitors
The integrated website live chat feature allows you to start chatting in real time with your visitors to get feedback on your recent posts or get ideas to write new posts.
Engaging with your visitors is also a great way to convert visitors into customers.
Build Visitor Loyalty
The one click follow button will allow visitors to receive your blog posts by email with no effort, without having to register. Social media icons allow visitors to share your best blog posts easily.
Google Analytics Integration
Get a clear visibility of your sales funnel. Odoo's Google Analytics trackers are configured by default to track all kinds of events related to shopping carts, call-to-actions, etc.
As Odoo marketing tools (mass mailing, campaigns, etc) are also linked with Google Analytics, you get a 360° view of your business.
SEO Optimized Blog Posts
SEO tools are ready to use, with no configuration required. Odoo suggests keywords for your titles according to Google's most searched terms, Google Analytics tracks interests of your visitors, sitemaps are created automatically for quick Google indexing, etc.
The system even creates structured content automatically to promote your products and events effectively in Google.
Designer-Friendly Themes
Themes are awesome and easy to design. You don't need to develop to create new pages, themes or building blocks. We use a clean HTML structure, a bootstrap CSS and our modularity allows you to distribute your themes easily.
The building block approach allows the website to remain clean after end-users start creating new contents.
Easy Access Rights
Not everyone requires the same access to your website. Designers manage the layout of the site, editors approve content and authors write that content. This lets you organize your publishing process according to your needs.
Other access rights are related to business objects (products, people, events, etc) and directly following Odoo's standard access rights management, so you do not have to configure things twice.