Commit Graph
150162 Commits
Author SHA1 Message Date
Ricardo Gomes Rodrigues (rigr) bf3bf40fc6 [IMP] l10n_pt: add a demo company for Portugal
closes odoo/odoo#89949

X-original-commit: 870610dc6e75afee6b0410ff7fc5322aee5d41fe
Signed-off-by: William André (wan) <wan@odoo.com>
2022-04-27 21:28:36 +02:00
William Braeckman fb86ae3371 [FIX] website,website_sale: fix unable to save in multi company settings
This commit is a follow-up to https://github.com/odoo/odoo/pull/89707
The above PR fixed most issues with the configuration but since the
default value was not set anymore for `auth_signup_uninvited` a
configuration with no website attached would make the config not
saveable (required field not set).

closes odoo/odoo#89938

X-original-commit: 5fab73f7730a10636642ba96b1fdd7a7455fe6f9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-04-27 21:28:32 +02:00
Sébastien Geelen (sge) 1bec40e88e [FIX] web_editor: save editor value during urgentSave
Ensure the current editor value is set in the Odoo FieldHtml during
`commitChanges` so it can be used by the `urgentSave` when needed.

closes odoo/odoo#89916

X-original-commit: 43dfc8140760497d9f0352897d71ad49b12fd6e5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-04-27 21:28:28 +02:00
momegahed 74af2b85c6 [FIX] pos_sale: inconsistent behavior Sales vs. PoS
If applied, this commit will fix the following bug by making the
behavior of applying a down payment similar to doing it in sales app

Steps to reproduce:

1- install sales, POS
2- set customer tax t on down payment product and use the product in
POS and sales
3- Create a product p with tax t
4- add p to a new sales order so
from sales:
5-apply a down payment of a percentage per (let's say 100% for clarity)
6- the down payment is calculated correctly and the total amount to
be paid is per * (p.untaxed_price + t * p.untaxed_price)

now from POS:
5- choose SO from the list
6- apply down payment of percentage per
7- the down payment is calcualted incorrectly. the SO is double taxed.
now the amound due is
(per * (p.untaxed_price + t * p.untaxed_price)) * (1 + pos_default_tax)

Bug:

when applying a down payment the full amount is treated as the untaxed
amound and then later the POS tax is added on it.

Fix:

using the untaxed total and also using the down payment product tax
similar to what happens in sales since the 2 flows can be mixed

OPW-2790821

closes odoo/odoo#89915

X-original-commit: 7dbd8d8e6ea5149c0b8d388ebfb1d97e43d47783
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-04-27 21:28:24 +02:00
Alexandre Kühn 5842a0e87d [IMP] mail: introduce view models (step 2)
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2831082

closes odoo/odoo#89905

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 21:28:19 +02:00
John Laterre (jol) 51fbb89976 [REV] account: display correct price_unit with 100% taxes
This reverts commit fe7d56dc32c71e04b54de9dbd756a48942a832f4.

The original commit created an unwanted side effect that was
being solved here https://github.com/odoo/odoo/pull/89632

But while testing the new PR, it appeared that the initial bug
was no longer there, even without the original fix.

Hence this PR.

closes odoo/odoo#89895

X-original-commit: af01dac8e35fe814b1d42a1620ff766908425b33
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
2022-04-27 21:28:15 +02:00
Umesh Gupta 458693e2ac [FIX] mass_mailing: enhance mass mailing template preview behavior
Currently, if user clicks the mass mailing template (theme) and holds
the click while moving the mouse (as if performing drag and drop), a
weird white highlight appears on the preview of the template.

This commit fixes the behavior by setting appropriate background color
instead of the default one of drop-down item, when the template is
focused.

task-2812312

closes odoo/odoo#89893

X-original-commit: e49f55e6f34486f8425653323544838f1a9fbd38
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-27 21:28:11 +02:00
Romain Derie c389a67d35 [FIX] web: make user_has_group work in a frontend context
Without this, `user_has_group` does not work in a frontend context.

The frontend session info seems to have been introduced with minimal
requirements with [1].

It was later populated with more keys, each time when facing a special
need. See [2].

Somehow, the `uid` need was never faced, thus never added, thus
`user_has_group` never worked in the frontend, apparently.

The fact that this method is not working in a frontend context is
something that comes back from time to time without really going
further.
The chance is here taken to fix that once and for all.

Note that we don't want to add the `uid` key in the session frontend
context as that would not be stable friendly, some users might now
relate to that attribute not being set in the frontend context.
This fix is then patching that method to work everywhere.

[1]: https://github.com/odoo/odoo/commit/0980546f4115ff7d072371d1b57d30000d07ce2c
[2]: https://github.com/odoo/odoo/blame/da8d418ff08aa55c7378887c9a5a06a5d12b72c0/addons/website/views/website_templates.xml#L128

closes odoo/odoo#89890

X-original-commit: 9aafec4ed94b9f7f2af42970dd14142ee5ca70dc
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-04-27 21:28:07 +02:00
Merlin (megu) 1683c0d62e [FIX] web_editor: remove command /image for portal users
The command `/image` used by portal users (in a forum post for example)
throws an access error. This fix removes this command for portal users
until master. In master, the command is reintroduced [here].

Indeed, before the new editor in v15, those restricted users could
insert an image as we were using an "in place" image upload dialog
from summernote resulting in simple base64 image added in the image tag.
This allowed to add image without creating an attachment.
But with the new editor, there is no such base64 image upload, and it
would be too tedious / risky to introduce one in stable.

[here]: https://github.com/odoo/odoo/pull/82612

opw-2648770
task-2811325

X-original-commit: e453d4c119a69f285d9a014babe485492bbe9c40
Part-of: odoo/odoo#89890
2022-04-27 21:28:06 +02:00
tsm-odoo c02a27432a [IMP] mail: make start return advanceTime function
This PR prepares the ground for the introduction of the new environment in the discuss
app. For now, the start method adds the advanceTime function to the environment. The issue
is that the new env is not extendable. This change makes a lot of noise hence the prep PR.

task-2582313

closes odoo/odoo#89888

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 21:28:01 +02:00
Julien Castiaux 034d01b2f3 [IMP] core: send json to http controllers
With this work we relax the http controller so that it accepts all
requests, including `Content-Type: application/json`. We also enrich
the framework with two new helper methods dedicated to serialaze json
requests and responses:

- `request.get_json_body()`, loads the json content from the request's
  body and returns the corresponding python object (usually a dict).
- `request.make_json_response(data)`, dumps `data` to json and makes an
  http response out of it.

closes odoo/odoo#86300

Task: 2779837
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-04-27 20:35:55 +02:00
Abdelouahab (abla) 873b7b8a82 [FIX] l10n_ch : fix body style in swissqr_report
To reproduce
============

- Create a company with a complete Swiss address (street, city, zip and country).
- Install the l10n_ch modules and install the Swiss plan comptable in the Settings of the Accounting app.
- Go to Accounting > Configuration > Settings > Activate the "QR codes" > Save
- Go to Accounting > Configuration > Journals > Choose the journal for the invoices > In "Advanced settings" verify that the communication type is "Based on invoice" and the communication standard is "Switzerland"
- Go to Accounting > Configuration > Journals > Select your bank journal(s) > Verify that you have set up your bank account number and the name of the bank
- Go to the Contact app > Configuration > Bank Accounts > Choose the one you use for the QR-bills > Edit > In "ISR Client Identification Number" refer a client number and make sure account type is 'IBAN' > Save.
- Verify that you have a complete address on the contact form of the customer (street, city, zip and country).
- create multiple invoices for this client
- try to print QR-bill for these invoices at once -> and assert error is raised

Purpose
=======

the `assert len(outlines_pages) == len(res_ids)` fails because the generated pdf
contains only a single invoice.

this issue is caused by the line `<script>document.body.className += " l10n_ch_qr";</script>` in `swissqr_report.xml`,
when `wkhtmltopdf` generates the pdf from html, it doesn't wait for all javascript to finish before rendering the page,
which lead to not execute the script `<script>document.body.className += " l10n_ch_qr";</script>` for some pages then the final pdf
is missing some pages.

Specification
=============

To solve the issue we removed the javascript block `<script>document.body.className += " l10n_ch_qr";</script>` from the template
and move it to python, by setting the body style when generating the html.

opw-2772396

closes odoo/odoo#89835

X-original-commit: a669b4c5f78aa18b87f5adcfc5acca3ce0a76040
Signed-off-by: abla001 <abla@odoo.com>
2022-04-27 18:38:10 +02:00
Brieuc-brd 9797338944 [REF] mail: MessageList, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2826936

closes odoo/odoo#89683

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 18:38:06 +02:00
Odoo's Mergebot 5d6e40ad05 [FW][MERGE][FIX] mail_plugin: provide various fixes
This merge fixes several bugs appearing when using mail plugin.
Notably

  * do not crash if customer is removed while being used in plugin;
  * fix a console error when not logging to the addin;
  * add a missing sentence to translate;
  * improve partial searches on email;

See sub commits for more details.

Task-2601837

closes odoo/odoo#89848

Forward-port-of: odoo/odoo#85101
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-27 15:31:49 +02:00
std-odoo c967cda61f [IMP] mail_plugin: when searching a non-full email no result are returned
Task-2601837

X-original-commit: 2c2e927ad3c07a9a8acdda06ff379dfc7ce07722
Part-of: odoo/odoo#89848
2022-04-27 15:31:48 +02:00
std-odoo af82dc2a9a [IMP] mail_plugin: never let the company section empty
Purpose
=======
When you do not have IAP credit, if the partner and the company
do not exist in the Odoo database, you have an empty section.

Now, a message tell you that you need to save the partner to
generate the company (so the section is not empty anymore).

Add the translation for this text.

Task-2601837

X-original-commit: 2951b41ba639fbe6e1bec9ef53ca300369ad5a74
Part-of: odoo/odoo#89848
2022-04-27 15:31:48 +02:00
std-odoo 742e9a24d1 [FIX] mail_plugin: fix error in the console when logged with the addin
Bug
===
When we log in with the addin, it will fetch the route `/mail_plugin/auth/access_token`
to know if the module is installed. Because we give no `auth_code` an
error is displayed in the console.

Task-2601837

X-original-commit: 26944c09de32512a8072e00ac73a90c633eecb6c
Part-of: odoo/odoo#89848
2022-04-27 15:31:48 +02:00
std-odoo a69366ef03 [FIX] mail_plugin: fix traceback when the partner has been removed
Bug
===
1. Open an email in Outlook, and create the contact
2. Go to Odoo and remove the partner
3. Without refreshing the browser tab, click on the "reload" icon of
   the addin. A traceback will be raised on the Odoo side

Task-2601837

X-original-commit: bb2e5ce9cf149a5cfd68cf908184c823f882d97d
Part-of: odoo/odoo#89848
2022-04-27 15:31:48 +02:00
Nicolas Bayet ca5ddbbcd7 [IMP] web_editor: disable checklist and stars for readonly
Disable checklist and stars when the html field attribute readonly is
true.

task-2832281

closes odoo/odoo#89845

X-original-commit: 7c87495d34713cf4ea82cfeb376097d67862eb2a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-04-27 15:31:40 +02:00
David Monjoie 5951960bcf [REV] web_editor: revert fix onChange event
task-2832078

closes odoo/odoo#89834

X-original-commit: 50dc710363a5222098e1fea2919b6fc4ae0aee65
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-04-27 14:29:10 +02:00
Pouya Malekinejad 149c067a10 [FIX] base_vat: use countries VAT label
The module changes VAT label from 'Tax ID' to a fixed value ('VAT'), but there is no reason for it, current use of country defined VAT label works just fine

Task No: (2626863)[https://www.odoo.com/web#id=2626863&cids=1&menu_id=4722&action=4043&model=project.task&view_type=form]

closes odoo/odoo#86445

Related: odoo/upgrade#3376
Signed-off-by: Laurent Smet <las@odoo.com>
2022-04-27 14:28:57 +02:00
Didier (did) ff15e4dc75 [FIX] mail: fix suggestion list position and style in chatter
task-2834429

Introduced by https://github.com/odoo/odoo/pull/89120 and https://github.com/odoo/odoo/pull/89146

closes odoo/odoo#89826

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 13:26:59 +02:00
Shawcker 37609c7e83 [IMP] account: improve display of invoices/bills in list view
Canceled and draft entries are the same color as posted entries. They should be in a different color (grey/blue) in order to be distinguished from other invoices/bills.

Amount Due, a.k.a. amount_residual(_signed), is not 0 for draft and canceled entries. It should be 0 since they haven't been posted yet.

A few tests have to be adapted to reflect this change in spec.

Task=2801521

closes odoo/odoo#88295

X-original-commit: 498a4a52b5fbc5466d8d0652db10563ccba55032
Related: odoo/upgrade#3435
Signed-off-by: Laurent Smet <las@odoo.com>
2022-04-27 13:26:50 +02:00
William Braeckman 7e945db634 [FIX] website,website_sale: fix user sign up config
This commit aims to fix multiple issues with the "Customer Account"
parameter in the backend config.

 - Hide the parameter from general and sales settings if website is
   installed.
 - Properly compute the right value once website is installed, as it was
   not using the website's value.
 - Fix a traceback when clicking on "Default Access Rights".

TaskId-2825096

closes odoo/odoo#89806

X-original-commit: 8b162f507f881619061d61530cc03b4b4654c1fe
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-04-27 12:16:28 +02:00
William Braeckman 8ea9ce1ed8 [FIX] base: allow proper override of config_parameter
Prior to this commit there was no way for a `res.config.settings` field
using a `config_parameter` and remove the `config_parameter` aspect.
After this commit, the parameter is ignored if it is falsy.

TaskId-2825096

X-original-commit: b0b62ee3e302b1a1d08d1c8a32bf297380a4f27b
Part-of: odoo/odoo#89806
2022-04-27 12:16:28 +02:00
Arthur Detroux (ard) cefaeab852 [FIX] web_editor: remove temporary color gradient element
Commit [1] introduced a way to use pre-configured gradient that included
a change to the util method _areCSSValuesEqual.
Commit [2] added lines of code to compare shadows but unfortunately
broke commit [1].

The changes of commit 2 left a lots of elements in the body of the
document.

Steps to reproduce:
- Install base database
- Find HTML field (e.g. Login as admin => preference => Email signature)
- Select text and click on Text Color
- Click on gradient then custom gradients
- Move the slider around
- Inspect the body element
- Lots of divs are there

[1]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b
[2]: https://github.com/odoo/odoo/commit/212d8ec10bb48e8fd7de3d3ff7660447b968c62a

closes odoo/odoo#89785

X-original-commit: 043dea4d8a46465f2faf3d6b93847dc2eabfde8c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-04-27 11:06:33 +02:00
Nicolas Bayet 71e98b11c3 [FIX] web_editor: disable linktool when selection not in editable
Before this commit, when the selection was not in the editable at the time
of calling the LinkTool, a link was created outside the editable, which
is wrong.

Task-2696969

closes odoo/odoo#89772

X-original-commit: 78decd6a75d6abf06177747f350871fefc84fd5a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-04-27 11:06:29 +02:00
Antoine Guenet 5764c74232 [FIX] mass_mailing: get styles for design tab from DOM
Before this commit, the design tab retrieved the current styles
exclusively from the `#design-element` style element. This meant that if
a template included that element to define its own styles, the defaults
were lost for the styles that it didn't define.
This reads the styles from the DOM instead so this is never an issue.

In order for the design tab to have values to read, we initialized the
`#design-tab` element with the css of the page. This was a temporary
workaround. Now that values are read via `getComputedStyle`, we don't
need it anymore.

task-2833420

closes odoo/odoo#89745

X-original-commit: e8f2f71f76f86bae84253374935fd7d14428746d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-04-27 11:06:25 +02:00
std-odoo 9323cee2f2 [IMP] mail_plugin: improve error message when the email is not valid
Purpose
=======
Improve the error message when the email
of the contact / company is not valid.

Task-2601837

closes odoo/odoo#86080

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-27 11:06:14 +02:00
JF Aubert 24fa2495e5 [IMP] mrp_subcontracting: Mass Receipt
Adapt db775ffd308638a390be52eba3ca11c9c2d1602d to subcontracting flow,
to avoid performance issues when receiving a large amount of SNs

closes odoo/odoo#85603

Task: 2777451
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-04-27 11:06:03 +02:00
Philippe Wauthy 9e14c112ee [IMP] hr_contract: add employee manager role
Currently, there are two security roles in Payroll: officer and administrator.
Both roles allow the user to have a full overview on all salaries of the company.

This commit adds an employee manager role allowing an employee manager to view
his reports' contracts.

task-2731933

closes odoo/odoo#83191

Related: odoo/enterprise#23669
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-27 11:05:59 +02:00
Xavier Morel 1e7051363d [REM] crm: ACL which hasn't been useful in a while
Only the group_salesman can see the opportunities statbuttons

Fix a few not-smart mass_mailing tests:

- running the mass mailing queue processes the messages as the user
  running the queue, and will try to send the demo messages, depending
  on demo data (when re-running the tests) the test user may not have
  the accesses required; sending just the one test email avoids that
  issue
- the leads kpi assumes the user has access to leads, that ain't
  necessarily the case

For the second issue, when sending statistics if the mailing has a
user `_prepare_statistics_email_values` should be called with that
user as "current" (cf `_action_send_statistics`), so we can just work
off of the current env, though it might be a good idea to eventually
check that.

closes odoo/odoo#89774

X-original-commit: 39af865800c6752b60171f16d6056ceb3c5a1636
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-04-27 10:04:37 +02:00
Touati Djamel (otd) 93c2348f0c [FIX] product: fix Dymo report label
Steps to reproduce the bug:
- Create a storable product:
    - Add a Barcode and an internal reference
- Click on Print Labels:
    - Select Dymo format
    - Add an Extra Content

Problem:
1:/ The extra content is not displayed because there is not enough space
2:/ The internal reference is displayed twice: in the display_name and in another line,
It's useless to display it twice, we should use name instead of display_name for the model `product_template`

opw-2791754

closes odoo/odoo#89771

X-original-commit: 3c4c27a266f954baa28bee3bf23cabc4928b99b8
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-04-27 10:04:34 +02:00
Alexandre Kühn ae5f59775e [IMP] mail: introduce view models (step 1)
This commit introduces models that define records being 1:1 map with components,
as a step to move further to having essentially all business code in models.

Having code in models is desirable to have very maintainable code, thanks to
robust and declarative code with an ORM-like architecture.

Task-2831082

closes odoo/odoo#89735

Related: odoo/enterprise#26637
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-04-27 10:04:24 +02:00
tsm-odoo 96288beeb6 [IMP] mail, *: prepare mockServers for wowlEnv
*: calendar, hr_holidays, im_livechat, note, website_livechat.

This PR helps reducing the noise in the discuss new env PR. Indeed,
the new mockServer has the same method except that they are not prefixed
by any underscore. All calls have been changed, and the corresponding
methods created. They will be deleted later.

task-2582313

closes odoo/odoo#89659

Related: odoo/enterprise#26603
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 10:04:17 +02:00
tsm-odoo 2b2175e824 [IMP] mail, *: rename isMobile to isSmall
*: sms, snailmail.

In order to reduce the noise in the new discuss env PR, all the
messaging.device.isMobile occurences have been renamed to isSmall
in order to match the new env terminology.

task-2582313

closes odoo/odoo#89655

Related: odoo/enterprise#26597
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 10:04:07 +02:00
MAHAMADASIF ANSARI f00c443350 [IMP] base: update industry list
In the current version, some industries are named things like `Administrative`,
`Food`, and `Transportation`, and do not have the proper space and dash after
the first alphabet in full name.

This commit renames the above industries to `Administrative/Utilities`,
`Food/Hospitality`, and `Transportation/Logistics` respectively, and also adds
 space after comma and semicolon according to 'NACE' rules, and also adds a dash
 after the first alphabet in the full name.

task-2674365

closes odoo/odoo#88555

Related: odoo/upgrade#3442
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-27 10:03:57 +02:00
clesgow a179006c11 [FIX] stock: fix negative move merging process
When trying to absorb quantity from a negative move, the product_uom_qty
of the negative move is updated several times (n-1 times if n positives
moves are required to fully absorb the quantity).

All these updates trigger the write() method, which would then log a
message in the picking because the move quantity is updated. This is
valid for positive moves as their quantity is truly updated, but for the
negatives during merge it is a temporary state, before either being
fully absorbed or create a backorder.

Also, in the case of multiple negative moves processed in a single
_merge_moves() call, merged moves would get all move_dest_ids &
move_orig_ids instead of only the ones of the merged move.

closes odoo/odoo#88047

X-original-commit: cc03ec1dea2cf5d3aab9ccfe92fd3e09a4c16044
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-04-27 10:03:51 +02:00
Josse Colpaert c5781ffa29 [FIX] account_edi: avoid accidental deactivation of the EDI cron on update
The problem is that when we update the account_edi, e.g. by updating the
base module, the cron gets deactivated because initially the ir.cron
record is set to active False and we activate it when we have an
edi format that requires web services.

By setting the record to noupdate, it will not execute setting it to
False again when updating the module.  (It will however not update
the record to noupdate)

closes odoo/odoo#89794

X-original-commit: 69ba48ea8cca151cb242118305dd8c152da266d1
Signed-off-by: William André (wan) <wan@odoo.com>
2022-04-27 09:00:44 +02:00
imanie383 096c207241 [FIX] website_sale: address edit error
The value of _checkout_form_save was validated because
 in some cases the method returns Forbidden()
 and this value is set directly to the order

closes odoo/odoo#89786

X-original-commit: 860370f5ed03e2fdc801ddbe02115818bb251655
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-04-27 09:00:39 +02:00
Guillaume (gdi) 73a6cbfa68 [FIX] website_hr_recruitment: test application form
This commit adds a test that verifies that the application forms work
correctly even after being edited. Ideally this test should have been
added with [1]. Since we want to make sure that the problem that [1]
solves does not happen again, it is really necessary to have this test.

Details:
The test verifies that the hidden data (the job_id) does not become a
default value after the edition of the form.

[1]: https://github.com/odoo/odoo/commit/b637a5e32f767b62736241042f88fa0cecf9f10b

task-2715201

closes odoo/odoo#89680

X-original-commit: be5a501e12d900adabfd0e843f55eafcd2a0fa6e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-04-27 09:00:36 +02:00
tsm-odoo 653b030553 [MOV] mail: move advanceTime function
This PR prepares the ground for the new env in discuss. The addTimeControlToEnv
function has been move in its own file, it will not rely on env anymore.

task-2582313

closes odoo/odoo#89673

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 09:00:24 +02:00
tsm-odoo c484ff74fc [IMP] test_mail: adapt activity test to use startServer
This PR helps reducing the noise in the one adapting discuss
to use wowlEnv. Indeed, the start method will now only rely
on the createWebClient method. This means we'll need to adapt
those tests to use real models. To do so, we need to move
those tests in the test_mail module.

task-2582313

closes odoo/odoo#89666

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 09:00:21 +02:00
tsm-odoo e58ef79c74 [MOV] mail, test_mail: move activity tests into test_mail
Move the activity_tests to test_mail module in ordre to rely on
one of its test model.

task-2582313

Part-of: odoo/odoo#89666
2022-04-27 09:00:20 +02:00
qsm-odoo be2114de01 [FIX] website: restore video loading on page load
Commit [1] broke the building of iframes in existing databases.

[1]: https://github.com/odoo/odoo/commit/b9b29bac14242eb88fc83a1fe5ba2472b64c24ea

opw-2832238

closes odoo/odoo#89778

X-original-commit: fd2aade90123af1bac02d8ab3fcca9741b0aaf33
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-04-27 07:52:29 +02:00
Patrick Hoste 5cd1179329 [IMP] portal: add informative button to internal notes on portal chatter
PURPOSE

Before this commit, when the chatter was displayed on a portal page (with
the customer preview button) one could see the internal notes with a button
for toggling his visibility... which was ineffective because a portal user
could never see internal notes and on the opposite internal users could
always see them. This commit adds another informative (disabled) button for
internal notes.

SPECIFICATION

Adds a 'is_message_subtype_note' param on the message in the
_portal_message_format method.

LINKS

Task-2817892

closes odoo/odoo#89775

X-original-commit: 705af2c24e99b8f24482722cb4795c141330b1c6
Signed-off-by: Hoste Patrick (pko) <pko@odoo.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-04-27 07:52:25 +02:00
abderraouf e9f21c9583 [FIX] project : average rating is wrong in tasks analysis
Before this commit:
- Join between task and rating is made on parent_res_id
- Displayed value is the sum of tasks average_rating
- No Unit test to cover this case
- Measure displayed when customer rating setting is not active
- [Demo data] Each task is rated one time so average_rating and last_rating are the same

After this commit:
- Join is made on res_id which is the task_id
- Displayed value is the avg of tasks average_rating
- Unit test added to cover mesaures calculation
- Measure dusplayed only when setting active
- New demo record added to let average_rating be different from last_rating

closes odoo/odoo#89764

X-original-commit: 3a5d816ef26a164fc38965154e38b45e33f9a81e
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-04-27 07:52:21 +02:00
Aurélien Warnon d7c6a5a3ca [IMP] [im|website]_livechat: make operators avatars publicly available
This commit improves the livechat to always allow website visitors to be able
to see the operator avatar, regardless of ACLs.

Indeed, we currently depend on ACLs and when website is installed, the
visibility of the operator avatar depends on his website_published status.
Which does not make much sense as it requires extra configuration to make it
work.

Instead, we now consider that all livechat operators and all chatbot operators
have their avatar publicly available, using a custom livechat route.

Task-2813529

closes odoo/odoo#89756

X-original-commit: 127bf62a5d701f8d2f1d4b246f55cc8ca8630dcf
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-04-27 07:52:18 +02:00
Patrick Hoste 6787adae29 [FW][FIX] (website_)event_booth_sale: correctly display tax included price
PURPOSE

Display the correct price when the tax included option is set in
the website settings.

LINKS

Task-2657480

closes odoo/odoo#89744

Closes: odoo/odoo#89618
X-original-commit: bf5fc98333beae99b94f0b55f0780d6fd18889cb
Forward-port-of: #89277
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Hoste Patrick (pko) <pko@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-04-27 07:52:14 +02:00
Patrick Hoste ddcdcaba75 [FW][FIX] (website_)event_booth_sale: add tests and test tour
PURPOSE

Forward-port changed since this has been fixed properly in v15.0+
This commit adds the tests only and doesn't contain the fix as previously

LINKS

Task-2657480

Closes: odoo/odoo#89618
X-original-commit: 02932cb2e6ae43c414f222f27080ee7d265c5b39
Forward-port-of: #89277
Part-of: odoo/odoo#89744
2022-04-27 07:52:14 +02:00