The `forcecreate=0` is required because the ICP will be deleted when set
to `False` (which is quite frequent for a boolean).
closesodoo/odoo#37103
X-original-commit: 255a12931d2a22dfadb1455a5dfc0a5e2f37b730
Signed-off-by: Christophe Simonis <chs@odoo.com>
Currenly in the digest when you send the template, tips are not being seen.
The reason for this is, we are getting tips from the context but we dont have it in the context.
Instead, we are fetching the tips by calling the compute_tips method and assigning it to 'tips'.
Hence, this commit will remove the usage of context to get the tips as we are getting it
from the method and not from the context.
Task ID: #1918364closesodoo/odoo#33186
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
One of the first tip is about using @ in chatter.
It should only take active internal users who already have logged in.
Currenly it takes all the users (eg: portal, inactive etc)
This commit will allow only internal users to be shown in the list.
Task-1918364
Before this commit, when you send a digest template to the user,
the user would receive a blank mail(without any content).
And while rendering the template we were getting the following error:
jinja2.exceptions.TemplateSyntaxError: unexpected char '&' at 4039
This was due to the changes made in commit:
https://github.com/odoo/odoo/commit/a7ac71ed4404aa2630619c331d725f4f545626f8#diff-705145eec648d5ef61b7b4060ae96b9dR8
In this instead of using CDATA, there was a change of the field type to 'html' and thus there were issues of parsing for jinja.
Now after this commit, we will be using builtins of jinja:
- 'greaterthan' instead of '>'
- 'lessthan' instead of '<'
Task-1918364
Purpose of the task is to improve the usability of digest email layout.
- Click on Connect button to connect to the database.
- Use same left padding in the header as in the section title.
- 2 decimal digits for monetary amounts, no space with currency symbol.
- Count real messages only, not notes or notifications.
- Add new tips for video tour.
- Moved recipients to a new tab.
- Changed email author to company's email.
- Some minor layout fixes.
Task-1918364
Currenly in the digest when you send the template, tips are not being seen.
The reason for this is, we are getting tips from the context but we dont have it in the context.
Instead, we are fetching the tips by calling the compute_tips method and assigning it to 'tips'.
Hence, this commit will remove the usage of context to get the tips as we are getting it
from the method and not from the context.
Task ID: #1918364
Notably
* remove cdata and fix html code when necessary;
* re-order fields declaration to have globally the same order in various
template definition;
* remove unnecessary reply-to, make user signature and auto delete fields
explicit when necessary;
* improve some name to ease template ordering and understanding in the
template list view;
Related to task 1972615
Linked to PR #32872
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.
Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.
Related to task 1972615
Linked to PR #32872
The `company` context is explicitly set by `action_send` while the
template previewer doesn't set it. This inconsistency leads to
error when previewing the digest template.
opw-1939007
closesodoo/odoo#31195
This commit adds a new digest module allowing to send recurrent digests by
email. Those contain a summary of the activity and display various KPIs
allowing to see the activity at a glance. It is also a great tool to improve
user engagement.
Digest module contain the core implementation of digests emails as well as
first basic KPIs. Future commits will gradually add KPIs in various main
addons.
Digests consist in email templates that have to call some methods on digest
module (compute_kpis, compute_tips, compute_kpis_actions) and render it
accordingly. A default digest is given in data allowing to tune it or to
duplicate and modify it.
Frequency is configurable on the digest; digests can be weekly, monthly or
send every 3 months. New employee users are added to the default widget.
KPIs are computed for each subscribed users so that results match its
groups and related access rights. Default digest therefore work for all users
as displayed results depend on their right without having to define separate
digests just for that purpose.
Implementation is done with Studio in mind. KPIs are computed fields on the
digest model. It means using Studio custom computed fields can be defined
to add customization to the digests, using fields named x_kpi_... .
Digests also holds tips to remind and warn users of features to activate
or configure like mailgateway.
KPIs can be linked to actions so that the section contain a link allowing
to directly jump on a given menu, allowing to directly link reporting
menus for example.
This commit is related Task ID 30655 and PR #18318.
Co-authored-by: Siddharth Gajjar <sga@odoo.com>