Commit Graph
505 Commits
Author SHA1 Message Date
Louis Wicket (wil) ff49527fb5 [IMP] mail, *: convert ThreadPreview to use Channel instead of Thread
* = im_livechat, rating, test_mail_full

Part of task-2948676.

closes odoo/odoo#99342

Related: odoo/enterprise#30921
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-05 16:53:52 +02:00
Louis Wicket (wil) 9beb2b13d3 [MOV] mail, *: rename ThreadPreviewView files to ChannelPreviewView
Part of task-2948676.
* = im_livechat, rating, test_mail_full

Part-of: odoo/odoo#99342
2022-09-05 16:53:52 +02:00
David Beguin 08561e6db4 [FIX] rating: check model is set before using it as key.
As message_notify can be done on empty recordset, message.res_id and
message.model can be Falsy. During filtering on rating messages, we need to
prevent the code to crash when filtering on those two properties and filter out
messages that are not linked to any record.

Task-2850521 (Knowledge: trash management)

closes odoo/odoo#99436

Related: odoo/enterprise#30908
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-01 20:22:17 +02:00
Thibault DelavalléeandAdrien Dieudonné 22c3cc51ed [FIX] rating: fix bootstrap and styling of rating email and pages
Rating page is broken since migration to bootstrap5. This commit fixes various
issues linked to btn-group, display and usage of group checkboxes. Overall
html structure is cleaned and bootstrap 5 rules are applied.

Some small display improvements are also applied to the rating email.

Task-2207626 (Rating: Log ratings, post feedbacks)

Part-of: odoo/odoo#95623
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2022-08-25 19:57:17 +02:00
std-odooandThibault Delavallée 6ebb72332e [IMP] rating: improve rating notification with delaying until feedback
Purpose
=======

When someone receives an email with a rating request, he can click on a
smiley. But if he does not write a feedback, nobody is notified. This means
some rating as somehow lost and people are not notified of it.

Specifications
==============

Now, when the user clicks on the smiley, a message is posted but notifications
are not yet sent. This uses the new ``mail.message.schedule`` mechanism added
in this PR. It gives the user some time to write their feedback and send it.

If they write and submit a feedback, the notification process is launched.
Emails and inbox notifications are created and sent.

If they don't write a feedback notification process is launch after 2 hours.

Testing
=======

Some cleaning is done in tests, notably to split some fields tests from
performance test. A bit performance test is also split into sub tests in
order to better understand queries.

Task-2207626 (Rating: Log ratings, post feedbacks)

Part-of: odoo/odoo#95623
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2022-08-25 19:57:17 +02:00
Louis Wicket (wil) a8c73f285f [IMP] mail, rating: turn computes and relateds readonly by default
Automatically add readonly on computed and related fields. This commit
required to rewrite some preexisting fields to make them readonly.
Task-2955927.

closes odoo/odoo#98541

Related: odoo/enterprise#30625
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-23 17:55:22 +02:00
Sébastien Theys 34d775e873 [IMP] mail, *: remove explicit usage of insert-and-replace
* = calendar, im_livechat, rating, snailmail, test_discuss_full, test_mail,
    website_livechat

Distinction between "replace" and "insert-and-replace" can be guessed based on
the type of the provided data.

task-2957295

closes odoo/odoo#98404

Related: odoo/enterprise#30580
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-19 11:53:05 +02:00
Louis Wicket (wil) 5d43fad9e6 [IMP] mail, *: auto add implicit attributes of identifying fields
Automatically add `required` and `readonly` on identifying fields and
remove them from field definition.

Task-2955910.
* = calendar, hr, im_livechat, rating, snailmail, website_livechat

closes odoo/odoo#98283

Related: odoo/enterprise#30511
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-17 19:48:53 +02:00
Sébastien Theys 60c87dd426 [IMP] mail, *: introduce identifyingMode and remove identifyingFields
* = calendar, hr, im_livechat, rating, snailmail, website_livechat

This simplifies definition and overrides and opens up new identification
opportunities.

Part of task-2741982

closes odoo/odoo#98166

Related: odoo/enterprise#30470
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-08-17 11:21:40 +02:00
tsm-odoo 75007b578e [MOV] bus, *: move startServer test helper to the bus module
*: calendar, hr, hr_holidays, im_livechat, note, rating, snailmail,
test_mail, test_mail_full, website_livechat, website_slides.

Part-of: odoo/odoo#97771
2022-08-10 14:43:41 +02:00
Xavier ALT ccb987dada [FIX] rating: ensure rating_last_value computation is deterministic
Running tests for `project` module only fails with the following error:

```
2022-08-02 08:19:41,777 5669 ERROR testdb odoo.addons.project.tests.test_project_report: FAIL: TestProjectReport.test_avg_rating_measure
Traceback (most recent call last):
  File "/build/odoo/saas-15.3/addons/project/tests/test_project_report.py", line 22, in test_avg_rating_measure
    self.assertEqual(self.task_1.rating_last_value, 5.0)
AssertionError: 4.0 != 5.0
```

With the ORM flush mechanisms when multiple ratings are created at once
they all have the same `create_date` and/or `write_date`, this commit
ensure the order is deterministic.

closes odoo/odoo#97691

X-original-commit: 567d27cc600bdbb39d62e7aa75b37d48b33d27a5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-08-09 02:24:57 +02:00
stefanorigano (SRI) 6b41d20815 [ADD] web, *: transition-x utility classes
Define classes for some default bootstrap transitions + 'none'.
These values are generic enough to fit different circumstances.

Classes added:
- transition-base
- transition-fade
- transition-none

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2918463

closes odoo/odoo#97051

Related: odoo/enterprise#30066
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-04 13:54:15 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli d8c131c894 [FIX] *: wrong use of row and col revealed in BS5
* restore position relative:

> Columns no longer have position: relative applied, so you may have to
> add .position-relative to some elements to restore that behavior.

https://getbootstrap.com/docs/5.1/migration/#grid-updates

Example:
Favorite widget isn't shown on the right location due to change
in Boostrap 5, so we restore the old positioning of the `.col`

PS: another fix is to simply remove the position absolute of
`.o_favorite` but its break the favorite in kanban project.

* remove usage of `width` in kanban image when `col` is also used:

The class `o_kanban_image` is
```css
.o_kanban_image {
    width: 64px;
}
```

In BS4 the col rules are:
```css
.col-4 {
    flex: 0 0 33.33333333%;
    max-width: 33.33333333%;
}
```
and in BS5:
```css
.col-4 {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    width: 33.33333333%;
}
```

So `width` overrides the `col` rules.

To summarize:
In BS4
```css
{
    max-width: 33.33333333%;
    width: 64px;
}
```

In BS5
```css
{
    width: 33.33333333%;
    width: 64px;
}
```

e.g. where there is the case:
Helpdesk > Reporting > Customer Ratings (Kanban card)

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:18 +02:00
Aaron Bohy 4f984568e1 [REF] *: adapt code to new kanban view
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).

It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
Alexandre Kühn 6383c067f9 [IMP] mail, *: introduce mail.assets_messaging bundle
*:
    calendar
    crm_livechat
    hr
    im_livechat
    rating
    sms
    snailmail
    website_livechat
    website_slides

Task-2894450

Part-of: odoo/odoo#94722
2022-06-28 00:36:42 +02:00
Vincent Larcin d300a0a021 [FIX] rating: flush rating values before computing rating_last_value
When submitting a  rating without submitting a feedback, the value of the field "rating_last_value" is not updated, because the rating values are not yet updated in the database when the method _compute_rating_last_value is called.

Steps to reproduce
------------------

The following steps are for an helpdesk ticket, but it should behave the same way on all models implementing the rating mixin.

1. Create a ticket in a team with a stage with the default rating email template.
2. Move it to the stage with the template (it should create a rating email)
3. Use the email to submit a rating.
4. When you get to the feedback page, close it without doing anything.
5. Go to your ticket's form view => the rating you submitted correctly appears in the stat button.
6. Go back to the team, and filter tickets by "No Rating" => your ticket appears, despite having a rating.

Expected behavior
-----------------

The field "rating_last_value" should have the value of the last rating submitted.

Technical
---------

This commit adds a flush right before the SQL query in `_compute_rating_last_value` to make sure the rating values are up to date in the database before the query is executed.
It also updates the test for rating submissions to also check the rating_last_value, and creates a new test for the route currently used in the first step of a rating.

Task-2880707

closes odoo/odoo#93846

X-original-commit: 2b3b840cdb2721759552c6b0003bcd2a69c9b34f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
2022-06-16 19:33:04 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Zelong Lin 947770ce7e [IMP] mail, *: display rating in systray
* = im_livechat, test_mail_full

Display the rating changes that generate a notification under the systray.
Using the rating faces to represent the result.

task-2794182

closes odoo/odoo#89537

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-01 11:02:22 +02:00
Raphael Collet 6cf8db906f [REF] *: adapt code to new flush API
closes odoo/odoo#87527

Related: odoo/upgrade#3497
Related: odoo/enterprise#26939
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-25 18:00:47 +02:00
Barad Mahendra 482b539351 [IMP] rating: add oe_structure class and IDs
Purpose of the commit is to make the rating thank you
page as editable on website and to make a page editable
we must have to add the oe_structure class and id which
contains oe_structure string.

task-2772369

closes odoo/odoo#86231

Related: odoo/upgrade#3341
Related: odoo/enterprise#25185
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-23 23:31:44 +02:00
kais-odoo a6be4dea7c [IMP] rating: rename the title of rating submit page
Purpose of the commit is to reword the rating submit page
into "Rate our Services"

task-2823445

closes odoo/odoo#90979

Related: odoo/enterprise#27152
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-05-20 19:14:59 +02:00
Yannick Tivisse 1a71354b41 [FIX] rating: Avoid searching ratings in for loop
From 40 ms to 0.3 ms
From 1440 to 1341 request when crating 100 SO

Before this commit, the res_id field of the rating mixin was a simple integer.
It worked but the cache of the rated record was not be updated when new rating
were created.

This commit change it to a Many2oneReference to improve this behavior.

closes odoo/odoo#90968

X-original-commit: 1a6dd617a3c3be106e6fc7f1924243bca368edf7
Related: odoo/enterprise#27143
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-05-10 15:16:51 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
Martin Trigaux 158b537c28 [I18N] *: export saas-15.2 source terms
closes odoo/odoo#89225

X-original-commit: 5925a83d87fa4702f4c0f22346304dc2da47c728
Related: odoo/enterprise#26435
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-04-23 08:33:43 +02:00
Thibault Delavallée 05c7e84239 [IMP] rating: make methods private
Purpose is to lessen access to internal methods and make them private. No
need to expose internal computation.

Task-2812665 (Rating: Cleanup rating flow code)

Part-of: odoo/odoo#80707
2022-04-04 17:48:23 +02:00
Thibault Delavallée cce67a0a4d [REF] rating, various: cleanup rating from routes
PURPOSE

Cleanup code and flow of customer rating: routes, rating_apply, rating and
message creation and update.

SPECIFICATIONS

Cleanup code about rating controllers and rating_apply. Notably correctly
link a message to a rating once a feedback is posted, whatever the flow.

Update ``rating_apply`` to use either a token, either an existing rating to
udpate it and post a message. Always link the message and the rating to
be sure DB data are coherent.

This requires an update in several demo data to correctly set tokens on
ratings and use it in calls to ``rating_apply`` done in xml files.

Extract default subtype computation of rating_apply in a sub-method to allow
setting this parameter without having to deal with ``rating_apply`` details.

CODE CLEANUP

Split behavior that is generic but actually used only in project about stage
update based on rating. Move it directly in project. As it is used only once
and as generic approach is hardcoded based on fields names better keep it
localized.

Task-2812665 (Rating: Cleanup rating flow code)

Part-of: odoo/odoo#80707
2022-04-04 17:48:23 +02:00
Thibault Delavallée 084ed6920b [MOV] rating, *: move main rating views directly into rating module
*= im_livechat, project, website_slides

MAIN PURPOSE

Purpose is to give access to some standardized views for rating directly
in rating application. Three main new views are defined

  * form view with text instead of image (used notably in livechat and also
    customized in project);
  * form view with detailed information (consumed, ...), will be used in
    technical menus used to debug and have a global view of ratings (less
    business);
  * kanban with stars instead of image (used notably in elearning);

As usage of rating is going to be improved let us have some default views
easy to customize. It will lessen number of hardcoded custom views.

In this commit we also set some higher priorities to module specific views
(higher = less chances to be default). That way views now have explicit
priorities and ordering is clearer.

WEBSITE_SLIDES VERSIONNING

We also set back website_slides to 2.6 as two bumps were done during saas
15.3 development (see odoo/odoo@6d33510beb and odoo/odoo@db63c03af9).

Task-2812665 (Rating: Cleanup rating flow code)

Part-of: odoo/odoo#80707
2022-04-04 17:48:22 +02:00
Thibault Delavallée 85ddb867b5 [REM] rating: remove dead controllers
``/rating/`` routes are deprecated since odoo/odoo@8ca96078db (before v14).
Let us remove them as we are now going to v16.

Task-2812665 (Rating: Cleanup rating flow code)

Part-of: odoo/odoo#80707
2022-04-04 17:48:22 +02:00
Vincent Schippefilt 05fc9a6733 [IMP] *: use _read_group instead of read_group
This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases

closes odoo/odoo#84908

Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-03-02 17:10:48 +00:00
Laurent Stukkens (LTU) 4e02437a3a [FIX] rating: remove unused rating_last_value
This commit removes the rating `rating_last_value` field as it is no
more used in odoo.

closes odoo/odoo#84784

Related: odoo/upgrade#3257
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-23 11:00:42 +00:00
Noe AntoineandThibault Delavallée 9355631e89 [FIX][IMP] portal_rating: round decimal ratings to two decimals
When hovering the number of stars of a course in front-end, for instance,
one can see "4,16666666666667 stars on 5". This is not very convenient.
The number is rounded up to two decimals instead. -> "4,17 stars on 5".

Same fix is done in backend in slides-specific kanban view of ratings. Value
is now rounded.

Finally _rating_get_repartition is fixed round values to the nearest half
value. We generally receive integer values between 0 and 5 but other values
may exist. Getting a repartition rounded at nearest half integer is sufficient
notably when looking at star-based display which covers only complete or half
complete stars.

Task-2728564

Part-of: odoo/odoo#82792
Co-authored-by: Noé Antoine <nan@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2022-02-22 19:47:53 +00:00
Thibault Delavallée 83d2affbe9 [MOV][FIX] rating: move rating values, thresholds and converters into a single file
Purpose is to try to have a single entry point when dealing with rating
values. Also fix incoherency introduced with odoo/odoo@32ba417549 where grades
are not coherent in all computation. This new computation seems better as
bad is now limited to <= 1 everywhere.

Task-2728564

Part-of: odoo/odoo#82792
2022-02-22 19:47:52 +00:00
Thibault Delavallée c04e0fa10a [MOV] rating: split rating mixin
It currently holds two different mixins. Let us split it into two files in
order to have a file per model. Also a quick reordering of rating model is
performed just to sort a bit things

Task-2728564

Part-of: odoo/odoo#82792
2022-02-22 19:47:52 +00:00
Martin Trigaux 9fbf706ba8 [I18N] *: export saas-15.2 translations
closes odoo/odoo#84475

X-original-commit: 8ea2605fbfec6277d7a01b6e73548a9585866c61
Related: odoo/enterprise#24289
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-02-14 10:44:50 +00:00
Xavier BOL (xbo) b08dea5aad [IMP] rating,project: display rating text based on the average rating
This commit adds a rating text field called `rating_avg_text` to display
a text based on the value of `rating_avg` field in `rating.mixin` model.
Here is the text displayed based on the value of `rating_avg`:

1. 'Satisfied' if the `rating_avg >= 3.66`
2. 'Okay' if the `2.33 <= rating_avg < 3.66`
3. 'Dissatisfied' if the `1 <= rating_avg < 2.33`
4. 'No Rating' if the `rating_avg < 1`
2022-01-05 13:58:01 +01:00
Xavier BOL (xbo) 1ae732c21f [IMP] project: use the rating average instead of customer satisfaction
Before this commit, we use the `rating_percentage_satisfaction` field to display
the customer satisfaction of the project. The problem is this field is
not really a rating average. This field returns the percentage of
satisfied ratings over the total number of ratings.

This commit changes the using of `rating_percentage_satisfaction` field
by the `rating_avg` to only use the rating average to really know if
globally the customers are happy of a project or not.

task-2671848

Closes #81027
2022-01-05 13:58:01 +01:00
Xavier BOL (xbo) 89f4370043 [IMP] rating,project: add average ratings field in parent rating mixin
Before this commit, we don't have any filters to the models using the
parent.rating.mixin to know if the customers are globally satisfied or
not to the projects for instance.

This commit adds the `rating_avg` field to compute the average of all
ratings linked to the parent model (in our example, `project.project`
model). This field is also used in the project search view to add 3
filters.

1. satisfied: projects with an average customer satisfaction between 66%
and 100%.
2. okay: projects with an average customer satisfaction between 33% and
65%.
3. dissatisfied: projects with an average customer satisfaction between
0% and 32%.

Another filter is added to find all projects without any ratings linked,
called `No Rating`.

task-2671848

Closes #81027
2022-01-05 13:58:01 +01:00
Xavier BOL (xbo) 790cc8698a [IMP] rating,project: use the average of rating value for satisfaction
Beforer this commit, we display a emoji to show if the customer is
satisfied, okay or not for the task via the last rating value. The
problem is we use only the value for the last rating for each task.

This commit uses all ratings for each by using the average of rating
value for each task to know if all the customers that done a rating are
satisfied or not.
Moreover, we add 4 filters in the project.task model using the average
of rating values.

1. Satisfied => rating_avg >= 3.66
2. Okay => 2.33 >= rating_avg < 3.66
3. Dissatisfied => rating_avg < 2.33
4. No rating => show the tasks without any ratings.

task-2671848

Closes #81027
2022-01-05 13:58:01 +01:00
Nidhi Patel 16f63fa55b [IMP] project, rating: add rating field to task tree and search view
In this commit, we add the 'rating' field to the list view of 'project.task'.
Also, make the field optional and hidden by default.

rating_text field will be used to search tasks and tickets by rating text.

closes #78973
task-2667754

Related: odoo/upgrade#3031
Related: odoo/enterprise#21880
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-12-16 08:10:08 +00:00
Vincent Larcin d832a04c68 [FIX] rating: fix chatter rating image alt description
When a rating is posted in the chatter, the alt text for the image is displayed as a score out of 10.
However, the maximum score a rating can have is 5.

This commit changes the alt text to display a score out of 5 instead.

closes odoo/odoo#80753

X-original-commit: 42848c6c3d17de59adb85bf6622f629809cb37c4
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-12-02 13:43:14 +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
William Braeckman 3d10c7c708 [IMP] project,*: improve project UX
* = hr_timesheet, sale_project, test_main_flows

Smaller changes:
 - Projects created on the fly (through `name_create`) will now come with a
   default `new` stage in order for them to not be empty.
 - Removed task auto assign upon creation besides in FSM's 'My tasks' menu.
 - Allow the reordering of projects without needing to group by
   anything.
 - Make `project.task`.`description` and `project.tags`.`name`
   translatable.
 - Disable the creation of records in the view when clicking on `Tasks
   in recurrence` stat button.
 - Track the planned date of the task in the chatter
 - Disable the creation of records in the view when clicking on
   'invoices' stat button and add the kanban view to that action.
 - Make milestones completely available to regular project users.
 - Remove the 'Documents' button in the project's kanban settings menu.
 - Add kanban, pivot and graph views to the 'Hours Recorded' stat button
   on projects
 - Add the calendar view on the 'Hours Forecast' stat button on projects
 - The 'Sales Orders' stat button on the `project.project`'s form view
   will now display the amount of sales order linked to the whole
   project. So the one linked to the project itself if it exists + all
   the tasks. It will also open them, form view if 1 else list view.
 - Fix a typo in the settings 'projets' => 'projects'
 - The analytic account  of the project will now be assigned to the
   sales order when a task is created through the 'Create a task in an
   existing project' option.

Changed the portal task view to include a sidebar similar to sales
orders, with a simple menu leading to different parts of the screen.

Changed the `project.task` 'rating' stat button:
 - The icon will now represent the latest review.
 - The action will directly lead to the record's form view if there is
   only 1 rating.
 - Make some fields readonly in the form view.
 - Display the % of satisfaction instead of the number of ratings.

Reorder all stat buttons on the `project.task` form view in this order:
 - Products, Worksheet, Sales Order(s), Invoices, Ratings, Hours
   Forecast, Parent Task, Tasks in recurrence, Tickets, Quotations and
   lastly Customer Preview

Make the status of the project editable directly through the kanban
view. A new widget has been added to handle that properly. When editing
the status through that means, a `project.update` will be created with
the current date and the appropriate status. In addition to that a new
status has been added (only on `project.task`, not `project.status`)
namely `to_define` in order to differentiate new and running projects.
Projects now start with the `to_define` status.

The `project.project`'s  rating stat button has been changed in the
following ways:
 - The icon will now change in function of the satisfaction percentage,
   smile above 66%, meh between 33% and 66% and frown below 33%.
 - The color will also change depending on the rate, smile is green, meh
   is orange and frown is red.
 - The ratings will now be in function of the last 30 days instead of
   all time and the action will also filter on those 30 days.
 - Change the action name from 'Rating' to 'Ratings'.

`project.project` ticket stat button:
 - Will now open the form view when there is only one record.
 - Added the activity view.
 - Disable the creation of new records.
 - Rename the action to 'Tickets'.

Closes: odoo/odoo#75269

See: odoo/enterprise#20334

Task ID: 2611006

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2021-10-28 15:27:36 +00:00
William Braeckman 32ba417549 [IMP] rating: add satisfaction percentage to rating.mixin
Adds the satisfaction percentage as an optional compute to
`rating.mixin`.

Closes: odoo/odoo#75269

See: odoo/enterprise#20334

Task ID: 2611006
2021-10-28 15:27:36 +00:00
Thomas Josse ef4ad5a9d4 [IMP] rating: changes the conversion of the ratings
Purpose
=======

This commit changes a conversion variable
`RATING_LIMIT_SATISFIED` in order to follow a new conversion:
> 5/4 := Satisfied
> 3 := Okay
> 2/1 := Dissatisfied

Specifications
==============

This commit only changes the variable in order to limit the
modifications made to the `rating` module/models.

This is done in order to change the faces displayed for each review/rating
without impacting the statistics. The ratings/reviews will have the same values
as before but will only get a different conversion if higher than 4.

task-2597345

See odoo/enterprise#20480
See odoo/upgrade#2784

Part-of: odoo/odoo#75646
2021-10-22 11:09:17 +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 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
Victor FeyensandThibault Delavallée f85387ef33 [IMP] mail(_*): limit usage of search
Purpose of this commit is to globally improve code performance by limiting
search impact by

  * adding limits when only first found record id used;
  * avoid unnecessary searches when record set can be filtered instead;
  * using cache when accessing ir.model;

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:04 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +00:00