Commit Graph
1360 Commits
Author SHA1 Message Date
Thibault Delavallée 07c872d674 [IMP] gamification: remove m2m display
PURPOSE

Gamification display is slow when being heavily used. Indeed the m2m towards
users is used in kanban and form views, leading to a huge data fetch when
being used in production environment with lots of users.

SPECIFICATIONS

Remove user_ids m2m from views. Indeed in some heavily used DBs you may have
more than 10K records in user_ids, leading to a huge m2m tags to display.

Replace it by an optimized count, used in

  * form view: as a stat button redirecting to participants of a challenge;
  * kanban view: a line (replacing the 11 first avatars) redirecting to
    participants of a challenge;

Task-2678295

Part-of: odoo/odoo#79599
2021-11-10 14:30:50 +00:00
Thibault Delavallée 3fe3c7a234 [MOV] gamification: reorder and rename data files
Purpose of this commit is to rename and reorder data by main model. It
allows to better understand module organization and find data one may have
to update.

Task-2678295

Part-of: odoo/odoo#79599
2021-11-10 14:30:50 +00:00
Thibault Delavallée 0a03960e8b [MOV] gamification: reorder and rename model files
Purpose of this commit is to rename and reorder models by main model. It
allows to better understand module organization and find models one may have
to update.

Task-2678295

Part-of: odoo/odoo#79599
2021-11-10 14:30:50 +00:00
Thibault Delavallée 4d7efe41f5 [MOV] gamification: move menus definition
Purpose of this commit is to have all gamification menus defined in a single
file. It helps reorganizing a module TOC (menus) when doing some b2b like
on an app. Otherwise menus are split across several files and finding them
and keeping them organized is not easy.

Task-2678295

Part-of: odoo/odoo#79599
2021-11-10 14:30:49 +00:00
Thibault Delavallée 2ae9d590e1 [MOV] gamification: reorder and rename view files
Purpose of this commit is to rename and reorder views by main model. It
allows to better understand module organization and find views one may have
to update.

Task-2678295

Part-of: odoo/odoo#79599
2021-11-10 14:30:49 +00:00
Thibault Delavallée f9dbd38720 [IMP] mail, various: rename custom_layout / notif_layout context usage
RATIONALE

Currently we can specify email used for notification layouting through context
use in mail composer. It is then propagated to message_post, stored on
mail.message and used to encapsulate emails sent based on posted messages.

SPECIFICATIONS

On template model: rename ``notif_layout`` parameter of ``send_mail`` to
``email_layout_xmlid`` to be coherent with naming used in other parts of the
code. Moreover it better indicates we expect an xml id.

On rating model: rename ``notif_layout`` parameter of ``rating_send_request``
to ``email_layout_xmlid``, for the same reasons as above.

In various wizards: support ``email_layout_xmlid`` context key when no field
is available, notably because this is still done manually in some wizards
like survey invite. Keep a fallback on ``notif_layout`` but remove support of
``custom_layout`` deprecated since quite a long time.

Task-2621326 (Mail: add 'view' button in 'light notification template')
Task-2647302 (Mail: add layout field in composer)

Part-of: odoo/odoo#76418
2021-11-10 09:58:09 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
Martin Trigaux e132c36ee6 [I18N] *: export 15.0 source terms
closes odoo/odoo#77898

X-original-commit: ad5afb1d18661784bfcf51bca66e576de1f6c49b
Related: odoo/enterprise#21478
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-05 16:54:21 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment

By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).

There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).

We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.

To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.

This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
  (for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
  in order to see only one at once
- a floating select input to switch visibility of a particular logical
  branching

Task-27033

X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
2021-09-28 23:42:54 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
Swapnesh Shah 655a863d6e [FIX] gamification: use context_today instead of today
`fields.Date.today` doesn't give date based on TZ which might be wrong
in some cases as it doesn't respect TZ.

With this commit, we are using `fields.Date.context_today` as default date.

closes odoo/odoo#76241

X-original-commit: addd4ae73ca4fa7a7046a88dd1310361dd895f15
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-10 12:33:49 +00:00
Thibault DelavalléeandVictor Feyens d875bcd79d [IMP] gamification, google_drive, project: limit usage of search on ir.model
Purpose of this commit is to globally improve code performance by limiting
search impact by using cache when accessing ir.model.

Note that tests are left untouched as they are generally done using admin
(or at least data preparation is done as admin). Diff is kept small currently.

Task-2638444
PR odoo/odoo#76005

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
2021-09-08 07:56:03 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Xavier Morel 27b02d2ec9 [FIX] web, *: de-t-raw kanban views
Add HTML fields support to kanban view (currently bespoke but maybe it
should be done via `format`), and remove t-raw for HTML fields there.

Also just strip some t-raws which were completely unnecessary to start with
2021-07-20 05:40:55 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
dht-odoo 1ef6fd9098 [IMP] web, {base}_setup: improves field type from text to html
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).

In this commit we replace report_footer and report_header field of
"base.document.layout, res.config.settings" model as
they are related fields of res.company models field
report_footer, report_header.

Task Id: 2499504

X-original-commit: 4c474d0d2055efe81fdc21502aa5957fe80af7ef
2021-06-07 05:21:40 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Thibault Delavallée 1766e0147d [MOV] various: reorganize templates into their right files
Purpose is to have all mail template into a mail_template_data.xml file
when possible. It eases maintenance and update when having to work globally
on template records.

Also update some ``body_html`` declarations still using ``xml`` instead of
``html``.

Task ID-2534550 (Template usage improvement)
Task ID-2477164 (Composer mixin)
Prepares Task ID-27033 (QWeb in templates)
COM PR odoo/odoo#70889
ENT PR odoo/enterprise#18352
2021-06-01 09:19:45 +00:00
Martin Trigaux 41d8b8cf68 [I18N] *: export saas-14.3 source terms
closes odoo/odoo#70673

X-original-commit: bcb9ff784e44462384b0a43a0a23eed7a1111bc5
Related: odoo/enterprise#18269
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-11 12:28:28 +00:00
Nicolas Seinlet acf306e4fb [IMP] gamification: skip useless computations
- use real join
- skip useless join on res_users and gamification_challenge
- skip null end_date criteria to compute less reached goal

closes odoo/odoo#70503

X-original-commit: 091d20d314f8301f0cbec292ec7b6fca906fd39e
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-05-06 17:53:38 +00:00
Barad Mahendra f93e054050 [IMP] project: generic UX improvement for project configuration
Purpose of the task is to do a generic UX improvement in project

Specification:
--------------

1) Stages(project.task.type)

* List view:
  - move the 'folded in kanban' field to the right of the project_ids one
  - remove the description field from the list view
  - make the list view editable in batch
* Form view
  - rename 'stage name' into 'name'
  - move the sequence field below the 'rating email template' one
  - change the copy of the tooltips to: "At each stage, employees can
block tasks or mark them as ready for the next step. You can customize
here the labels for each state."
  - the tags should be colored according to the project's color
  - reduce the space in between the icons and the name of the states
  - add some space in between the legend_done field and the description
  - when creating a new mail template, set 'project.task' as model_id
of the template
* move the 'Stages' menu into below the 'Projects' one
* add the project_ids field to the kanban view
* search: rename 'Tasks Stages' into 'Name'

2) Tags(project.tags):

- configuration > tags menu: change the helper to: "Tags are perfect
for categorizing your tasks."
- add an optional list view -> only the color field should be optional
and displayed by default
- new tags should be created at the top of the list

- Also removed some of the unused(deprecated) css which are not applied
anywhere in the project.

closes odoo/odoo#69636

Taskid: 2508642
Related: odoo/enterprise#17865
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-04-28 08:53:48 +00:00
Rémy Baranx (bar) 5a1905ee7d [FIX] gamification: apply res.users ir rules when retrieving badge owner info
When retreiving the list of badge owners in `_get_owners_info()`,
we should apply `res.users` ir rules to be sure to respect multi-company
rules.

upg-7081

closes odoo/odoo#70182

X-original-commit: d75deff4791702e1f085b2b16247d7f7c5335720
Signed-off-by: Christophe Simonis <chs@odoo.com>
2021-04-30 13:33:42 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Martin Trigaux 9741ef5ee6 [I18N] *: export saas-14.2 source terms
For odoo-master Transifex project, no demo data

closes odoo/odoo#66500

X-original-commit: 813931ac850e5ba4181259a5957ec72226fb670c
Related: odoo/enterprise#16510
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-02-19 08:02:58 +00:00
Michael Mattiello (mcm) 785b304876 [IMP] *: reduce shift in form views (xml)
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
  delivery, digest, event, event_crm, fleet, gamification, hr,
  hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
  mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
  purchase, purchase_requisition, sale_management, sales_team, sms,
  stock, stock_landed_costs, survey, website_crm_partner_assign,
  website_event_exhibitor, website_event_track, website_forum,
  website_slides, base

This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.

task 2330101
2021-02-02 12:40:22 +00:00
Benoit Socias 4402f873be [IMP] gamification,gamification_sale_crm: compute goals using batch mode
Trying to improve the resources used by the challenge update cron
operation.

Before this commit some count-based goals and all sum-based goals were
computed with one select count or sum per user.

After this commit each count or sum based goal is computed in a single select
for all users. The goal form now also allows to enable batch mode for
sum computations. Other changes include:
- adding an index on the challenge_id of goals after verifying the
positive impact of such an index on high volumes on a staging server
- introducing additional intermediary commits to allow massive crons to
catch up over several attempts.

task-internal

closes odoo/odoo#63265

X-original-commit: 0f9411d10753aa96103ce77702dbdc0516e9969a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-11 17:52:11 +00:00
Martin Trigaux 3f13751e9b [I18N] *: export saas-14.1 source terms
Without demo data

closes odoo/odoo#63238

X-original-commit: 4e6683973b1d1ecc67f1312a8ef98b1272e2d5a5
Related: odoo/enterprise#15268
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-12-11 12:30:42 +00:00
Victor Feyens 9c87db3c62 [IMP] gamification: support batch creation
See merge commit for more details.

Task ID-2330149
COM PR odoo/odoo#61246
ENT PR odoo/enterprise#14561
2020-12-03 10:19:07 +00:00
Thibault Delavallée 6c6adbad66 [MOV][IMP] auth_signup, calendar, gamification: reorganize qweb / jinja templates used for mailing
PURPOSE

Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.

SPECIFICATIONS

  * move those templates in their own file to ease their discovering and
    maintenance;
  * put them into data (as those are not views even if it contains qweb)
  * guidelines are now :

    -> Qweb templates should be in data/mail_templates.xml;
    -> mail.template records should be in data/mail_template_data.xml;

  * put their declaration in no update when not done if template has no
    technical code or complex dependency on underlying code;
  * move found mail data (mail.message.subtype or mail.activity.type) records
    in a mail_data file that should contain only "core" records linked to mail;

LINKS

Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
2020-11-25 12:31:10 +00:00
Raphael Collet 1398b6b44c [IMP] tests: deprecate SavepointCase
closes odoo/odoo#62031

Related: odoo/enterprise#14872
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-11-24 13:23:32 +00:00
Martin Trigaux c59c10f1bc [FIX] *: correct typos and bad English
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61010

X-original-commit: 62a18bdb372e234107fd2099a2df5f9e3a442c96
Related: odoo/enterprise#14489
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-29 19:23:41 +00:00
Benjamin Vray dc9505b019 [FIX] gamification: fix badge creation
Before this commit, we executed the request even when creating a new
badge. And it thrown a traceback.

After this commit, we return default values before executing the
request if this is a new badge.

task-2312878

closes odoo/odoo#60441

X-original-commit: 85995b7a4f0544779f3de537f0e6024820abbd5d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-21 11:59:26 +00:00
Martin Trigaux 2683184aa6 [FIX] *: fix all the typos
And other reported English mistakes in source string
Courtesy of Transifex translators

And remove leftover from gengo

closes odoo/odoo#59022

X-original-commit: 26efc84c5cac47a2cc83d7b084f8b71528fec6c7
Related: odoo/enterprise#13781
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-05 09:36:34 +00:00
Martin Trigaux e79531c136 [I18N] *: export 14.0 source terms
Including demo data this time

closes odoo/odoo#58862

X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-29 17:52:02 +00:00
Debauche StéphaneandXavier Morel 7ecb903bea [REM] *: ability to put raw modules in evaluation contexts
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-09-28 10:33:52 +02:00
Victor Feyens 594ccdcbf4 [FIX] *: typos and english incoherences
Mainly transifex issues but also some errors found through 'grep' checks.

Fix typos and obscure english strings in xml contents, fields strings/helps, some docstrings, ...
ensuring correct translations base (and fallback when translations isn't available).

closes odoo/odoo#57276

X-original-commit: 4214f05d454bca2b60fda3a288d529c098e84f77
Related: odoo/enterprise#13053
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-08 18:12:26 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Thibault Delavallée 1404af789c [REF] various: use helper to create tests users
PURPOSE

Lessen use of mail-specific calls and variables

SPECIFICATIONS

Use mail_new_test_user tool in tests, lessening use of mail-specific context
keys in tests.

LINKS

Task ID-2326281 (context keys use cleaning)
PR odoo/odoo#56631
PR odoo/enterprise#12707

X-original-commit: 910559c092dc7dfa00b91339a5423e16cd4668e1
2020-08-28 07:59:23 +00:00
Martin Trigaux 49fc197925 [FIX] gamification: use right field on goal domain
There is no field 'ids' on a gamification.goal, but one called 'id'
Without this commit, calling _get_serialized_challenge_lines (or
indirectly, calling report_progress) with a non-empty subset_goals was
failing due to an invalid domain.
This is not supposed to happen on standard flow but can be triggered
with manual modification of date fields and refreshing a challenge.

Fixes odoo/odoo#25913

closes odoo/odoo#54387

X-original-commit: 1e3483d2fc99763940396936758cf99b14d0a118
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-07-13 12:07:19 +00:00
Jeremy Kersten 76b2de42f4 [FIX] *: handle null value for boolean in sql queries
It has always been a best effort until the v13 to have false as default value
for boolean field.
Until v13: https://github.com/odoo/odoo/blob/12.0/odoo/models.py#L3645

During ORM refactoring in v13 it has been replaced by a default value in sql
From v13: https://github.com/odoo/odoo/blob/13.0/odoo/tools/sql.py#L79

But with a typo since columntype for boolean is bool and not boolean.
What's mean that in v13 we have a lot of null value for boolean (~=False)

In all cases, we try to be aware and check Falsy boolean with 'null or False'
(https://github.com/odoo/odoo/blob/13.0/odoo/osv/expression.py#L1230)

So we should do the same when we write pure sql in method bypassing the ORM.

closes odoo/odoo#53391

closes odoo/odoo#54458

Related: odoo/enterprise#11319
Related: odoo/enterprise#11838
X-original-commit: 118c9f6aafd423f415b2bbfcf8a9cfcd676d9b92
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-07-14 15:52:59 +00:00
Martin Trigaux 80e97e98ce [IMP] *: use named placeholders in translated message
When more than one parameter is present in a message, it helps the
translation to use named placeholder. This way, the order can be
changed. It also helps the comprehension of the message.
2020-06-18 13:03:34 +02:00
Martin Trigaux ba244cef01 [IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
2020-06-18 13:03:34 +02:00
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Okan SUMER (osu) 87a1b54717 [IMP] gamification: improve tree and form view
This commit improve the tree and form view of gamification.karma.rank
and correct a bug on auto generated email when a user pass to the
next rank.

- Add a stat button in form view and column in tree view to know
  how many users have the current rank
- Split Description and Motivational in 2 pages
- Hide the line that mention the next rank the user can get when
  there is no more rank to get in email templates
- Add a menu to access badges tree view

Part of https://github.com/odoo/odoo/pull/46634

task-2201708
2020-05-14 18:27:00 +00:00
Okan SUMER (osu) 5d55426eb9 [FIX] gamification: avoid epty label in email template
This fix hide the line "Next rank" when the user reached the last rank

closes odoo/odoo#48540

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-12 14:03:19 +00:00
Martin Trigaux 2d00263127 [I18N] *: export saas-13.3 translations
closes odoo/odoo#50031

X-original-commit: 15a7a9f9d71a0b9c46d7caf2f4fbf09a5a4c63fe
Related: odoo/enterprise#10140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-23 07:13:48 +00:00
Raphael Collet 51c4e6e2fc [FIX] *: invalid parameter 'tracking' on non-mail-thread models 2020-04-07 09:25:08 +00:00
Thibault Delavallée a03f6483d6 [REF] mail: clean code about rendering in mail_template
PURPOSE

Clean and rename code about language management and template rendering in mail
template model.

SPECIFICATIONS

Clean method naming and try to make code easier to understand and call. Also
add and/or clean docstrings of rendering methods.

Notably

  * ``_classify_per_lang``: for each lang-contextualized template, give the list
    of record ids;
  * ``_render_template``: now working only on a valid list of IDs instead of
    allowing both int / list and having a return type depending on the input
    type. It allows to simplify code and delegate some processing to callers;

Introduce new API method

  * ``_render_lang``: for each record id return the lang matching it;
  * ``_render_field``: render a field of mail.template, on given set of record
    ids. Usage: template._render_field('body_html', records.ids). Language
    computation is available for this method;

Remove the "multi mode" support of rendering that either returned a rendered
value, either a dict based on given ids. Now all methods always work in batch
and caller have to fetch the correct result if necessary.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:18 +00:00
Victor Feyens a3ded9043d [IMP] *: declare ir.rule in noupdate
ir.rule are default values but can be customized based on the
company's policy and needs.
This is typically a record that is in noupdate as should be
customization-friendly.
2020-03-20 16:21:25 +01:00