Commit Graph
151712 Commits
Author SHA1 Message Date
Dossogne Bertrand c5679f0e22 [IMP] hr_contract*: improve general usability
*:
hr_contract
hr_work_entry
hr_work_entry_contract

This commit changes several views and methods to improve general usability of the payroll application

TaskID #2783013

closes odoo/odoo#89311

Related: odoo/enterprise#26466
Related: odoo/upgrade#3534
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-29 12:19:03 +02:00
mafo-odoo 41cf683f36 [FIX] portal: allow words to be broken in portal messages
Steps to reproduce:
- Create a sale order
- Set a very long message in the chatter
- Clink on the customer preview

Current behavior:
There is a empty space in the top right corner

Expected behavior:
The preview is a usual

Explanation:
The very long word in the chatter created at the
bottom of the page a very long message that increased
the page width, modifying the usual view. To fix that
we allow long words to broken to keep the same width.

opw-2880050

closes odoo/odoo#94802

X-original-commit: 775290e186f5dfdaae8a5b28e9ed20c6b307429e
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-06-29 11:11:46 +02:00
MerlinGuillaume bccf88ae2d [FIX] pos_coupon: apply discounts on lines' discounted amount
Order discount do not take into account the discount on order lines so
the discount amount will be wrong

Steps to reproduce:
1. Install Point of Sale
2. Go to Settings > Point of Sale > Pricing and enable Coupons &
   Promotions
3. Go to Point of Sale > Products > Promotion Programs and edit program
   'Code for 10% on orders'
4. Change the Promo Code Usage to 'Automatically Applied'
5. Open a new session in Point of Sale 'Shop'
6. Add a product (e.g. Acoustic Bloc Screens, the discount is applied
   with value 29.50$)
7. Apply a discount of 20% on the product, the discount value doesn't
   change (it should be 23.60$)

Solution:
When computing the amount to discount, take into consideration the
discount already applied on the order line

opw-2883724

closes odoo/odoo#94791

X-original-commit: afb3e5516e43e831bec1fd6b6bc3aaa18fe3fde2
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-06-29 10:00:50 +02:00
William Braeckman 7aae635831 [IMP] website_sale: slightly improve website_order_line
Slightly improve `_compute_website_order_line` by reducing the
complexity when `website_sale_delivery` or `website_sale_loyalty` is
installed.

TaskId-2786691

closes odoo/odoo#90025

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-06-29 10:00:47 +02:00
roen-odoo 2eb7bafdf6 [FIX] stock_account: correctly compute price_unit for return
Current behavior:
When returning a delivery that had a quanity lower than 1
the inventory valuation showed a value of 0 for the return

Steps to reproduce:
- Create a product that use "m" (meters) as UoM
- Change the configuration of the product Category
  and set Costing method to FIFO and Inventory valuation to Automated
- Create a SO for this product with a quantity of 0.15
- Validate the order and validate the delivery with full quantity
- Now click on return and make a return for the delivery
- Validate the return and go in the inventory valuation
- Show the inventory valuation for the created product
- The return has a value of 0 when it should have the same value
  as the delivery

opw-2880153

closes odoo/odoo#94827

X-original-commit: 9bc3d5ebef234aa1d77f1d467746837a5cadc037
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
2022-06-29 07:19:11 +02:00
Géry Debongnie b36cf87878 [IMP] web: update owl from 2.0.0-beta-10 to 2.0.0-beta-11
Release notes:
https://github.com/odoo/owl/releases/tag/v2.0.0-beta-11

Details:

[FIX] fix some issues with t-out with falsy values, and with default values
[REF] app: slightly simplify the create component path
[IMP] compiler: add support for binary operators
[IMP] add support for t-call-context directive
[FIX] properly get component reference instead of context
[FIX] blockdom: fix crash when class object key has leading spaces

closes odoo/odoo#94798

X-original-commit: 4dc5ff6569f658ccf525e9078b8a776ca5c0f159
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-06-28 20:42:25 +02:00
qsm-odoo 69d89577c8 [REM] web_editor: remove dead base.js code again
Here is a long but incomplete history of events:
- At some point, a web_editor "base.js" file was created, mainly to be
  able to wait for all resources before doing some operations.
- For the upcoming release of 13.0, a new editor was merged with [1] and
  the file was moved to website instead of web_editor.
- Shortly after, with [2], the file was moved from website to portal.
- A month later, the file was removed thanks to [3] as there was no need
  for the utils it provided anymore.
- Before the 13.0 release, the new editor made at [1] was reverted with
  [4]... but reintroduced the base.js web_editor file by mistake.
- Post 13.0-release, [5] saw the mistake and commented the file to
  indicate that it should be removed again... however it was not able to
  be removed at forward-port at the time because some new code was using
  the utils of the file again (probably by mistake).
- With [6], part of the file was removed, probably because the related
  behavior was refactored.

With this commit, we hopefully get rid of this file for good. No code
uses it anymore so it could simply be dropped.

[1]: https://github.com/odoo/odoo/commit/f296992317e96562c66bd7ad59a5080d6c551ed5
[2]: https://github.com/odoo/odoo/commit/6521cf4f662a62912b54f52a1236935634913053
[3]: https://github.com/odoo/odoo/commit/da1899af48902edec7ac6ed8dd5ae2f8b02ec689
[4]: https://github.com/odoo/odoo/commit/0c52c94f8ece6a7e5ddd905256f5507cf7bab199
[5]: https://github.com/odoo/odoo/commit/5ac269d722f9ff8c206215dd1c07b8544cfd5382
[6]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

Following task-2687506

closes odoo/odoo#94794

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-28 19:33:54 +02:00
Younn Olivier 63e175d9ec [FIX] website: fix a race condition when opening the Optimize SEO dialog
Steps to reproduce (in slow 3G):
- Go to the website app,
- The "Optimize SEO" menu is not available while the iframe is loading,
- Wait for the iframe to be laoded,
- Go to another app (discuss for example),
- Go back on the website,
- This time, the "Optimize SEO" menu is already available,
- Click on it, it crashes.
The website metadata from the website service were not correctly cleaned
when leaving the website_preview client action. When going a second time
on the client action, the "Optimize SEO" isDisplayed method was based on
outdated metadata.
This commit resets them when the pageDocument is set to null (when
leaving the client action).

task-2687506

closes odoo/odoo#94631

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-28 18:25:05 +02:00
Younn Olivier 231a07a483 [FIX] website, website_links: fix click everywhere test
This commit fixes a race condition happening when clicking on the "Link
Tracker" menu of the website, when the website_preview client action's
iframe is not loaded yet.

That menu uses the iframe's contentWindow.location (taking it from the
website service), which was not set before the "load" event of the
iframe.

With this commit, the contentWindow is set at the website service level
when setting the pageDocument, as it can be taken from it
(document.defaultView), and the link tracker is displayed only when
there is a contentWindow at the website service level.

task-2687506

Part-of: odoo/odoo#94631
2022-06-28 18:25:05 +02:00
Thibault Libioulle 9eb8ea52e0 [IMP] website_payment: handle stripe supported countries
This commit warns company from countries not supported by Stripe to
activate Stripe from the settings page.

This commit also enable the Stripe Connect Onboarding from the website
settings page.

task-2789227

closes odoo/odoo#87562

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-06-28 18:25:00 +02:00
Christophe Monniez 5000f5b05d [FIX] tests: clear session storage in test browser
closes odoo/odoo#94756

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-06-28 16:03:17 +02:00
xlu-odoo 2453eda926 [REF] mail: callOptionMenu, review and simplify scss
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2855813

closes odoo/odoo#91563

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-28 16:03:14 +02:00
Sébastien Geelen (sge) 47c73c7213 [FIX] web_editor: link more visible
Ensure the link are visible enough in the editor.

task-2855712

closes odoo/odoo#94760

X-original-commit: 5d598e4269431222ae28ac2196ff6f1f45466734
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2022-06-28 14:06:09 +02:00
tsm-odoo 91cb9002dc [IMP] mail, *: remove deprecated autoOpenDiscuss parameter
*: im_livechat, website_livechat.

The autoOpenDiscuss parameter was used but is deprecated for a while now.
This PR removes it.

closes odoo/odoo#94716

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-28 14:06:06 +02:00
Sebastien LANGE 475f98421b [FIX] payment: rounding approximation in to_minor_currency_units method
Before this commit, the `major_amount` was rounded before the conversion
to the minor currency unit, leading to an approximation error when
multiplying a float.

After this commit, the conversion of the `major_ amount` to the minor
currency unit is done before the rounding, ensuring no float approximation.

closes odoo/odoo#94698

X-original-commit: 4a4e0129c09e2db11c46a90a07704dc37cb4fb20
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-28 14:06:03 +02:00
momegahed 4329584459 [FIX] web: multi lines don't work in warnings
Steps to reproduce:

1- install sales
2- allow warnings on sale orders
3- set a warning w with multiple lines on
 sale order on customer c
4- try to add c to a sale order
5- w will be shown in one line

Bug:

the html is escaped and the proper styling is missing

Fix:
add the proper style

OPW-2847660

closes odoo/odoo#94730

X-original-commit: 36546f39ca44f6d5691e3b1d8a7d1eb2da4a7b51
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-06-28 11:41:21 +02:00
std-odoo bfee828603 [FIX] website: add the email of when a user fill the website form
Purpose
=======
When a public user fill a form on Website (e.g. /contactus), an email
will be sent. The email filled in the form will be used as the "email
from", but if no mail server match this email address it will be
encapsulated into "`notifications@mycompany.com`" (see odoo/odoo#61853).

Even though the email is still present in the "Reply-To" header, we
want to add it at the end of the email, so the receiver has this
information easily.

Task-2833093

closes odoo/odoo#94728

X-original-commit: a57944cc387a0b2f0eb6450a14a14e149c720181
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-06-28 11:41:18 +02:00
roen-odoo 12121cc7b9 [FIX] point_of_sale: stop changing weight of tracked product
Current behavior:
When using IoT-scale device to determine the weight of a product in PoS
if the product was tracked by lot the weight would always go back to 1

Steps to reproduce:
- Have PoS installed and activate PoS IoT
- To simulate the IoT you can modify the weight on this line
https://github.com/odoo/odoo/blob/ff58fb0fb588092f1d02500cd000d20a3f8b67b7/addons/point_of_sale/static/src/js/Screens/ProductScreen/ProductScreen.js#L140
(e.g. change weight with 5)
- Create a product with UoM in Kg, and tracked by lots
- Start PoS session and add the new product to the order
- The quantity is not correct

opw-2862429

closes odoo/odoo#94727

X-original-commit: 6b37b0e3a0a82e8bbc51993d84257e0d71ab961d
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-06-28 11:41:15 +02:00
Victor Feyens 775c113382 [IMP] delivery,sale_*: sale portal template cleanup
* Use div name/id instead of dummy classes for xpath references
* Use clear variable name (picking instead of i in the t-foreach)
* Use t-elif/t-else when useful to reduce python evaluations of
exclusive boolean values
* clean xml indentation

closes odoo/odoo#94704

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-28 11:41:12 +02:00
Victor Feyens 08cd4482a0 [REM] crm,sale: admin & superuser are already partner managers
In base, when the group "group_partner_manager" is created, user_root & 
user_admin are already specified as group users.

Therefore, it's useless to add them again in the data of the crm & sales 
modules.

Part-of: odoo/odoo#94704
2022-06-28 11:41:12 +02:00
Thibault Delavallée aa80de0f9e [FIX] portal: don't crash in chatter_post if no attachments
Default value for attachment_ids / tokens is None. However a check method consider those
as lists and check their length. When calling chatter_post without giving at least a void
list there is therefore a crash that can be easily avoided.

closes odoo/odoo#94695

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-28 10:23:43 +02:00
Vincent Larcin 7a2650760d [FIX] portal: use correct author for comments on shared records
Steps to reproduce
------------------

1. Create two partners A and B.
2. Create a shareable record, e.g. a sales order, and set A as the customer.
3. Share the record with B.
4. Use the share link sent to B and comment on the record.
5. Your comments will be sent with A as the author.

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

Share links sent to a customer should make you comment as that customer.

Task-2883044

X-original-commit: df162acc589b74b0e3c1e9687ce6a1980233f5f1
Part-of: odoo/odoo#94695
2022-06-28 10:23:43 +02:00
Laurent Smet b2c8932db1 [FIX] account: Use 'parent_state' instead of 'move_id.state'
closes odoo/odoo#94287

X-original-commit: fd51248bf4c5535b33fb5a6335dbb3b10cb1d2d9
Related: odoo/enterprise#28744
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2022-06-28 10:23:30 +02:00
Laurent Smet f7af82def6 [FIX] account: Exclude to_check st_lines from accounting dashboard
The bank reconciliation widget is using the 'not matched' filter excluding the already reconciled statement lines and the lines marked as 'to_check'.
This commit aims to adapt the accounting dashboard to the same behavior.
This avoid having "RECONCILE 5 ITEMS" and display only 4 of them when opening the wizard.
This happens when a statement line is not reconciled but marked as 'to check'.

X-original-commit: f78192b5e12cad8b4c5a0109e7194abab29097fe
Part-of: odoo/odoo#94287
2022-06-28 10:23:30 +02:00
Touati Djamel (otd) 5669593a79 [FIX] sale_mrp: fix the test_reset_avco_kit
The test is incorrect because a search is made on all product variants
instead of getting only the previously-created product variants

The SO action_cancel function returns a wizard that is not processed,
so the so was never canceled. we should call the private function
instead

closes odoo/odoo#94742

X-original-commit: c4e6562e669881047802f25866f3c2c19bf2394a
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-06-28 09:15:50 +02:00
rhe-odoo 39dedfda44 [FIX] point_of_sale: Display the price with tax included.
This fix displays the price with tax included on the product screen and not only on the order.

This commit also move the compute all function to models.js.
We allow the retrocompatibility with the compute all  functions from older versions.

closes odoo/odoo#94717

X-original-commit: c837be6556cc49928e1b90cb1de29a2dff7dcd82
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-06-28 09:15:47 +02:00
Touati Djamel (otd) b71501c7d0 [FIX] stock: do not save product_qty when discarding
Steps to reproduce the bug:
- Create a new transfer, e.g: internal transfer is fine
- Click on add a product > select any product > Save & close
- Click on the product that was just added
- change the product1_uom_qty
- Click on "Discard" button (Do not use the "Save & Close" nor the
 "Save & New").
- On the picking, click on save.

Problem:
A user error is triggered, because when creating the `stock.move`,
we try to save the `product_qty` while it is a technical field:
https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_move.py#L375

When we modify the `porudct_uom_qty`, a compute is triggered to
calculate the `porudct_qty`:
https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_move.py#L278-L279

But when we click on the discard, the changes are not cancelled,
and as the kanban view does not have the information from
the form view that the field `product_qty` is readonly,
so the `product_qty` is sent in the vals to the server when we save
the picking

opw-2638906

closes odoo/odoo#94586

X-original-commit: 289d0d845df092eeae6ce0598ffef9158978ad30
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-06-28 09:15:44 +02:00
Bruno Boi 0765a0f166 [FIX] web: missing multiLang in l10n
Before this commit the multi_lang parameter
was not properly retrieved from the server on the JS side.

closes odoo/odoo#94743

X-original-commit: 9dfdb1d0ded4b8739f93756987f61aa09658a840
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-06-28 01:38:59 +02:00
Alexandre Kühn 5206b66aed [MOV] im_livechat, *: Refactor JS Public Livechat (step 6)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2896237

closes odoo/odoo#94722

Related: odoo/enterprise#28913
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-28 00:36:42 +02:00
Alexandre Kühn 67e35f45a4 [IMP] im_livechat, *: Refactor JS Public Livechat (step 6)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2896237

Part-of: odoo/odoo#94722
2022-06-28 00:36:42 +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
Leonardo Pavan Rocha e2ed69b798 [FIX] calendar: add index on access_token field
Since the access_token is used in the videocall_location route, it makes sense
to create an index on this column to allow faster lookup. This commit adds the
index to this field since it's creation in 15.3.

closes odoo/odoo#94714

X-original-commit: 3b753dc2f5fcac03f719cd16e9c0216bae83e9b7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2022-06-27 19:48:20 +02:00
Alexandre Kühn 4fe7c9ca97 [FIX] im_livechat: make external livechat work with only im_livechat
Follow-up of https://github.com/odoo/odoo/pull/92786

Commit above make external livechat not working due to
`info['available']` being `True`, and `True` is not
a valid javascript keyword. The correct value is `true`,
starting with a smaller case.

closes odoo/odoo#94711

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-27 18:41:48 +02:00
MerlinGuillaume 04441969b4 [FIX] pos_sale: hide sale orders that are not in POS currency
Sale orders' amount in POS are displayed in the POS currency but they
can be in another currency making it possible to settle the wrong amount

Steps to reproduce:
1. Install Point of Sale and Sales
2. Go to Settings > Invoicing > Currencies and activate another
   currency (e.g. EUR)
3. Go to Settings > Sales > Pricing > Pricelists and create a new
   pricelist for the new currency
4. Create a new Sale Order with the EUR pricelist and any product and
   confirm it (do not invoice)
5. Open a new session in the POS Shop
6. Go to Quotation/Order
7. The new SO is displayed with the amount in EUR but the currency
   symbol is USD

Solution:
Add a filter on the POS currency to the domain of the rpc call
search_read on sale orders

Problem:
The field `amount_total` is used to display the price but this field can
be in any currency

opw-2865371

closes odoo/odoo#94710

X-original-commit: 0ebe29c794813a0854c7a6f433088a919a52cbbc
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-06-27 18:41:45 +02:00
Thibault Francois e26d3e1166 [FIX] crm: sale user should be able to convert and merge lead
Use case
--------

A sale user convert a lead to an opportunity, this lead has duplicates.

The wizard will convert and merge the lead. At the end of the process
the duplicated lead are delete.

Issue
-----

Before this commit the user get an access error because he cannot delete
leads

Since they can merge lead using the action "Merge" it's not consistent
and sales user should be able to merge lead during the conversion
as well

closes odoo/odoo#94699

X-original-commit: 3b79867460d9a407fba094fe1cd719d8d52011ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Thibault Francois <tfr@odoo.com>
2022-06-27 17:35:22 +02:00
Louis Wicket (wil) 7e301e24c5 [IMP] mail: introduce Device/hasRtcSupport
Rename Rtc/isClientRtcCompatible to Device/hasRtcSupport.

closes odoo/odoo#94683

Enterprise: https://github.com/odoo/enterprise/pull/28900
Related: odoo/enterprise#28900
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-27 17:35:17 +02:00
Radhika ShyaraandPrakash Prajapati 1e2b70012a [FIX] mail: check if the user can access to the thread
Before this commit, when the user creates a private task
and assign another user to that task and then removes
himself and save the task, the current user should no
longer access to that task since the task becomes this
private task of the other user assigned on it.
So when the current user changes anything in that task,
it will have a `Access Error`.
However if the user tries to remove a follower on that
task he will also have a traceback because no thread is found.
The reason why no thread is found is because the user has
no longer access to the record and so he has no longer
access to the chatter.

This commit checks if a thread is found before continuing
the process. If no thread is found then the user has no
access to the chatter instead of throwing a traceback
because no thread is found.

task-2857229

closes odoo/odoo#94665

X-original-commit: 2c68e397b3c12657024e70016808183c89260168
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Prakash Prajapati <ppr@odoo.com>
2022-06-27 16:25:58 +02:00
Thibault Delavallée 163a12e423 [IMP] link_tracker, mass_mailing(_sms): improve tests
Improve link tracker tests :

  * add missing test for trace tracking in mass mailing. We generate a trace
    and find a short link in it, in order to test the tracking in mass
    mailing;
  * add tests for side effects of mass mailing routes: update of trace status,
    clicks, ...
  * wrap base url locally instead of globally in MockTracker class to ease
    specific setup in classes;

Prepares Task-2150462 (Mass Mailing: Unsubscribe flow improvement)

closes odoo/odoo#94660

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-27 16:25:55 +02:00
Thibault Delavallée 3ca98b1271 [IMP] (test_)mail: move some tools directly to mail test class
TestMail holds a tool to create test records in batch, notably with inline
partner creation. Allow its usage in some sub modules and tests depending
directly from the base mail test class. This allows notably usage of this
tool in performance tests (see enterprise PR).

Also explicitly set some test data to ease sub tests writing.

Prepares Task-2150462 (Mass Mailing: Unsubscribe flow improvement)

Part-of: odoo/odoo#94660
2022-06-27 16:25:54 +02:00
Thibault Delavallée 8cbac0506c [FIX] mail, various: remove outdated "render_safe" rendering option
Render safe option was used with Jinja rendering to tell Jinja that content
was safe and was not expected to be escaped. This was used notably in subject
as characters like ``&`` was escaped in email subject (e.g. `R&D News`).

This is now supported directly by the "inline template" rendering engine that
is used to render text-based templates since Odoo v15 [1]. This option is not
supported by code anymore anyway and leads to nothing.

Task-2088884 (MailComposer: Onchange to editable computed stored)
Task-2710804 (MailThread Api Cleaning)

[1] See odoo/odoo@68182baff4

Prepares Task-2088884 (Mail: Composer Onchange to Editable Computed Stored)

Part-of: odoo/odoo#94660
2022-06-27 16:25:54 +02:00
Thibault Delavallée 6fec3e9091 [FIX] mail, mail_group: fix override of _message_compute_author
This commit mainly fixes an override of ``_message_compute_author``. It is
done with an incorrect default parameter value for raise_exception defaulting
to False instead of True). By the way we also fix parameter naming in order to
ease understanding.

Part of Task-2710804 (Mail: Clean Mail.Thread API)

Part-of: odoo/odoo#94660
2022-06-27 16:25:54 +02:00
Thibault Delavallée dc3d3f7dd8 [FIX] mail: fix some typos
Fix some typos spotted in mail sending code.

Prepares Task-2684479 (Mail: Better send error storage and display)

Part-of: odoo/odoo#94660
2022-06-27 16:25:54 +02:00
Louis Wicket (wil) 15e907f54b [IMP] mail: introduce Messaging/isInQUnitTest
Add `isInQUnitTest` field to `Messaging`.
This is useful in particular to prevent audio from being played during
tests.

Part of task-2804940.

closes odoo/odoo#94632

Enterprise: https://github.com/odoo/enterprise/pull/28885
Related: odoo/enterprise#28885
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-27 16:25:40 +02:00
tsm-odoo 59ef00c2e9 [IMP] mail: remove qunitTest field from message model
Since createMessageComponent helper is gone, the qunitTest field
of the message model is unused. Let's remove it.

closes odoo/odoo#94676

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-27 15:11:30 +02:00
tsm-odoo 9ae6d7e249 [IMP] mail: remove obsolete target fix
The `o_web_client` class was removed from the target in the test
utils because some scroll tests were failing. Now that those tests
have been fixed, we can remove this hack.

closes odoo/odoo#94675

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-27 15:11:27 +02:00
Sébastien Theys 9de429e747 [IMP] mail, project: move chatter container setup code in init
Setup was conditionally done in render lifecycle methods, but it could be moved
to init instead, allowing to simplify the code and remove unnecessary methods
and overrides.

Part of task-2871070

closes odoo/odoo#94307

Related: odoo/enterprise#28893
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-27 15:11:13 +02:00
Miquel Raïch 055f95ddfe [IMP] event: use UserError in search method instead of ValueError
In a search method, the error comes from the user and thus the error should be an UserError. ValueError should be used for other cases.

closes odoo/odoo#93944

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-27 15:11:09 +02:00
Xavier-Do 23c36a86d5 [IMP] tests: add option to watch test execution in chrome
When browser_js tests, especially tours, it can sometimes be useful to connect to
chrome devtools in order to follow test execution. This can be tricky since we need to
find the `devtools_port`, browse 127.0.0.1/:`devtools_port` and clic on the link opening the
devtools from a remote adress with a specific version using the devtools websocket adress to
observe the test.

This commit adds an additionnal browser_js parameter, `watch` enabeling to automatically open
a new chrome window/tab with this specific url.

closes odoo/odoo#66769

Related: odoo/documentation#2305
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-06-27 15:11:06 +02:00
Xavier BOL (xbo) 64745b506c [FIX] hr_timesheet: ensure UoM is defined on timesheets
Before this commit, if the user uses Studio app to customize the form
view of timesheet and adds `product_uom_id` field in that view, then if
for instance that field is invisible, it will be in in the vals when the
user will create a timesheet. In that case, the value given to that
field will be False since the field has no default value. Since in the
compute of `total_timesheet_time` defined in project used that field to
convert the `unit_amount` of each timesheet linked to this project in
the right UoM, the `product_uom_id` field has to be defined if the AAL
is a timesheet, otherwise, the timesheets without any UoM set on
`product_uom_id` will be excluded in the compute.

This commit fixes the issue by setting a UoM if the UoM is not in vals
or if the value is False for a timesheet.

opw-2884148

closes odoo/odoo#94643

X-original-commit: 9ec6f14c2a6863ed45c24e8695bb56512996fa16
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-06-27 13:58:51 +02:00
Yannick Tivisse 8d631d8acd [IMP] hr_recruitment: Improve kanban view for long job titles
There is an overlap with the ribbon for long titles

closes odoo/odoo#94634

Taskid: 2888621
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-06-27 12:34:09 +02:00