Commit Graph
159881 Commits
Author SHA1 Message Date
roen-odoo a31ad57791 [FIX] point_of_sale: display default pricelist price as base price
Current behavior:
When a discount is applied on a product because of a pricelist. The base
price is displayed without applying the default pricelist on it.

Steps to reproduce:
- Create product A with price of 10€
- Create pricelsit PL1 that change price of product A to 7€(fixed price)
- Create pricelist PL2 based on PL1 that use a formula to apply 10% on
  all products.
- Change PoS default pricelist to PL1 and make PL1 and PL2 available on
  the PoS.
- Open a PoS session and add product A to the order. Price should be 7€.
- Apply PL2 on the order.
- The product line shows that the price was 10€ has been discounted to
  6.30€. The base price should be 7€.

opw-3200027

closes odoo/odoo#117273

X-original-commit: 395235f202513267fcf3cde28ae51fa0a5caeb42
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-03-31 15:52:39 +02:00
Benoit Socias 0f8bd89331 [FIX] website: skip view's copy-on-write when updating translations
Since [1] when the translations were converted to jsonb, when
translations are saved, the actual `ir.ui.view` is saved (instead of a
translation record like before). Because of this, the copy-on-write
mechanism of `website` kicks in and unneeded website-specific views are
created.

This commit disables the copy-on-write mechanism during the update of
translations in views.

Steps to reproduce:
- Install `website_sale`.
- Install a second language (e.g. French).
- Go to a single product's website page in the second language.
- Translate the "ADD TO CART" button.

=> Many website-specific views were created.

[1]: https://github.com/odoo/odoo/commit/4e82c45abdb0b420edead2bd1d0ba9ff4bb4a224

task-3225622

closes odoo/odoo#117256

X-original-commit: 1bf7e2322d22aeef30097a1d19848ff351bc83f9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-31 15:52:37 +02:00
Chong Wang (cwg) 7e19621fbc [FIX] base: fix translate in dev xml mode
Before this commit:
in the --dev=xml mode, terms in ir_ui_view.arch cannot be correctly wrapped with
translation tags in the edit_translation=True context

After this commit:
The logic of get_trans_func is moved to _compute_arch of model ir.ui.view,
since ir_ui_view is its only use case and the hack
  with_context (edit_translation=None)
makes the logic very confusing as a method for Fields.

task-3225622

X-original-commit: 05ebdce14227b767bbddeab38e31f1eb747d9887
Part-of: odoo/odoo#117256
2023-03-31 15:52:36 +02:00
Loan (LSE) 40b192dbbc [FIX] hw_drivers: Avoid duplicated actions execution
Before this commit:
Assuming we have a "Shipping Labels Printer" set on an operation type.
Assuming we also have a delivery carrier which send Label through the chatter of this picking type (like DHL or BPost).
If we have several sessions connected with the same user (author of the chatter message), for examples, on different devices.
Each session will send the same IoT request to print the label (as the code rely on the bus).

In consequences, the same label will be printed multiple times

After this commit:
The label is print only once

Associated enterprise PR: https://github.com/odoo/enterprise/pull/36904

opw-3081423

closes odoo/odoo#117251

X-original-commit: 8ca27ae07b0a7b3bf27ac5459d74f28bbcc89ce0
Related: odoo/enterprise#39087
Signed-off-by: Sens Loan (lse) <lse@odoo.com>
2023-03-31 15:52:33 +02:00
Benjamin Vray 7d2d6e2bf2 [FIX] website: fix navbar position and alignment options
This commit fixes several bugs with the navbar and the header templates:

- The "right" alignment options didn't work with most headers. This was
due to a missing CSS rule.

- The "right/left" alignment option was reversed with the "vertical"
header template.

- The navbar collapse style was broken with the "Hamburger Full" header
template.

- This commit hides the alignment options in cases where they have no
effect ("Hamburger Full" or "Magazine" header template + not
"off-canvas"). It also changes the options label to "Mobile Alignment"
when the alignment only impacts the mobile view (since this commit =>
[1], the "alignment" option no longer only impacts the mobile view,
depending on the templates, it can also impact the "desktop" view).

- The text section of the "Magazine" header template had no background
color (It was transparent after scrolling the page).

- The "off-canvas" navbar was not positioned correctly with several
header templates (e.g. "Boxed" header template).

[1]: https://github.com/odoo/odoo/commit/2a1aa808e939eeaa3caec6a1a82e19f023f1d010

opw-2951315

closes odoo/odoo#117237

X-original-commit: ca621a292c659f60dd8fdf19a7e77a52f05742c0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-31 15:52:28 +02:00
dasz e0f3dd9e01 [IMP] resource: compute date_to for better ux
date_to is set to date_from 23:59:59 when date_from is set, because 99% of the time a public holiday
is for one day. date_to can be adjusted if necessary.

task 3162355

closes odoo/odoo#115688

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-31 15:52:23 +02:00
4c4493c3a1 [IMP] l10n_ec: update and upgrade
Overhaul of l10n_ec, developped in collaboration with the 3Cloud team

[Data improvements]
- Adds missing tax groups
- Adds VAT 8%, used for tourism operations on special hollidays
- Fixes base percentage on Withhold VAT taxes
- Corrects tax name from Iva to IVA
- Improves SRI paymment options, with sequence widget and inactavtes
deprecated payment options.
- Fixes short code of document types
- Corrects document type name for insurance
- Adds withhold document type, to be implemented in separated module
- Removes unused fiscal positions
- Removes unnecessary journals
- Desactivates unused payment methods
- Provides updated and improved translations

[Functional improvements]
- Automatic setup of several journals when creating new companies
- Adds restrictions to ensure proper setup of ecuadorian journals
- Improves ecuadorian journal form

closes odoo/odoo#113302

Task: 3011311
See: odoo/enterprise#33977
See: odoo/upgrade#4098
X-original-commit: c9568fbb7544ededb37f57892f930d198083c06f
Related: odoo/enterprise#37359
Signed-off-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Andres Calle <andres.calle@trescloud.com>
Co-authored-by: Josse Colpaert <jco@odoo.com>
Co-authored-by: Juan Daniel Álvarez <juan.alvarez@trescloud.com>
Co-authored-by: Steven Luna <steven.luna@trescloud.com>
2023-03-31 15:52:18 +02:00
Josse Colpaert 390e27e7b7 [FIX] l10n_latam_invoice_document: onchange needed now after debit note wizard
An error in l10n staging showed a different name for the debit note as
foreseen in the XML.  Checking in the runbot of that l10n staging, we saw
that from the debit note wizard, the document type is recalculated, but
the onchange to trigger the name change was not triggered, so we added that
and this made it back green.

Because of the changes of commit
7edee80

X-original-commit: 3efc6cf1d7a2276a18a4656b4ea4f9e18141bc21
Part-of: odoo/odoo#113302
2023-03-31 15:52:18 +02:00
Stanislas GueniffeyandJosse Colpaert 6b031e7925 [FIX] account_edi: also cancel non-invoice moves
Enables the EDI postprocessing method to cancel non-invoice moves.
This is useful for entry moves such as withholds in l10n_ec

X-original-commit: 1c515e1f55ea675df3f6aace7f6537889779779c
Part-of: odoo/odoo#113302
Co-authored-by: Josse Colpaert <jco@odoo.com>
2023-03-31 15:52:17 +02:00
Kartik Chavda 6e03d2bd26 [IMP] {sale_}project{_mrp}: improve some generic UX of project app.
Purpose:
 - Improve some generic UX of project app.

Specification:
 - make milestone field option hide in task tree view.
 - set default 'Tasks' to label_tasks field on creation when
   label_tasks field is empty.
 - order stat buttons of project update right side panel
   according to user usage.
 - hide project field for list, calendar, graph and activity
   view of act_project_project_2_project_task_all action.
 - archive task ratings template when ratings is disabled and
   unarchive that template when its not.

task-3083855

closes odoo/odoo#107467

Related: odoo/enterprise#34778
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-31 15:52:14 +02:00
Odoo's Mergebot d689f6083f [MERGE] digest: make digest bioutifoul again
Digest emails are currently not always correctly displayed on several
email readers. Notably using Outlook feeling is quite bad. This is
notably due to the support of "div" tags in outlook that far from
being perfect. Outlook notably does not support margin nor padding in
div, as well as many "modern" CSS properties.

Digest layout is updated to fix its display. We therefore get back to a
more hardcoded table-based display. It gives a better and more robust
layout cross readers.

This PR fixes the issue by using inline CSS, old CSS, and HTML table tags
to solve the above problem.

This PR also changes the kpi data in various models; update mass mailing
statistics layout;  and adapts test cases in digest and mass mailing models. 

task-2717426

closes odoo/odoo#89549

Related: odoo/upgrade#3707
Related: odoo/enterprise#32083
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-31 15:51:59 +02:00
Thibault Delavallée 052495863a [FIX] digest, sale_management: make digest data noupdate=False
As those are mainly demonstration data and heavily linked to some design
choices better force their update to avoid having badly designed tips.
Mose digest tips are updatable data, just some modules are still having
them as noupdate.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:59 +02:00
Mahamadasif Ansari 9b016e828f [IMP] digest, mass_mailing: replace css variable with qweb variable
The digest currently includes a CSS variable for the company's
secondary color, but Outlook does not support it.

This commit replaces the CSS variable in the digest with the QWEB
variable. Apart from that, if the secondary colour of the company
is available, it sets it into the colour property header of the
"mass_mailing_kpi_link_trackers" in email marketing and revert the
changes in commit[1] because border-start/end is an invalid property in CSS.

commit[1] - odoo-dev@1fcd098#diff-faee7192e5f6cf07658d2ceae16380c4b5d54035ecfb9bb4848608db3f429c69L263

tast-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
MAHAMADASIF ANSARI dd9abe6a76 [IMP] digest, test_mass_mailing: adapt test cases due to changes in templates
With this PR, the `digest_data` template is changed, so many test cases fail.
This commit adapts the test cases by changing the `data-field` from `div` to
`table`.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
MAHAMADASIF ANSARI 7f72dd5c43 [IMP] mass_mailing: update statistics layout after digest layout update
With this PR, the `digest_data` template has been changed, so the statistics
layout is not compatible anymore with those updated layout. This commit
updates the `mass_mailing_kpi_link_trackers` data to be compatible with the
new changes.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
Mahamadasif Ansari 02788e4076 [IMP] various: changes tips data due to changes in digest templates
With this PR, the `digest_data` template has been changed, so the `digest_tips`
is not compatible with the new changes.

This commit changes the `digest_tips` data to be compatible with the new changes.

Below are the modules affected:
 - account
 - crm
 - digest
 - hr_expense
 - hr_timesheet
 - im_livechat
 - mrp
 - project
 - purchase
 - sale_management
 - stock
 - website

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
MAHAMADASIF ANSARI 535d1aae14 [IMP] digest: fix outlook desktop design
igest emails are currently not always correctly displayed on several
email readers. Notably using Outlook feeling is quite bad. This is
notably due to the support of "div" tags in outlook that far from
being perfect. Outlook notably does not support margin nor padding in
div, as well as many "modern" CSS properties.

Digest layout is updated to fix its display. We therefore get back to a
more hardcoded table-based display. It gives a better and more robust
layout cross readers.

Note that this globally reverts odoo/odoo@fd8709515c that was probably a bad idea.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:57 +02:00
david f64e52ee09 [FIX] point_of_sale: blurred company logo on ticket
The `/web/binary/company_logo` controller returns an image with a
maximum of 180px wide, while the point of sale data loader tries to
resize such image to 300px wide. The result is an image with blurry
edges.

A better option is to use the standard `/web/image` controller that
recovers the original image from the proper attachment. This is a tiny
overhead since it's done just once when session is loaded.

closes odoo/odoo#117326

X-original-commit: 49ec373d6269febb66eaace8e71b812798ca11c7
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-31 14:43:40 +02:00
Tommy (tong) b34e647f9d [FIX] event_sale: fix unit test
Steps to reproduce:

- Install any localization account module
- Install event_sale
- Run the unit test :TestEventSale.test_ticket_price_with_currency_conversion

Current behaviour:
The unit test will fail in line 341

Expected behaviour:
The unit test should not fail

Explanation:
The unit test used self.env.company which will populate demo invoices after installing
the localization account module. Therefore we can't change the currency on the company
any more in event_sale/tests/test_event_sale.py line 341. It is better to create a new
company in the unit test to prevent side effect like this.

closes odoo/odoo#117286

X-original-commit: 96998664285c00ab3d3ac6491123e596cfa9b3e8
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-31 14:43:37 +02:00
Aaron Bohy b3b3db6732 [REF] web: move isM2MGrouped logic from model to list
This is only necessary for the list view, no need to add complexity
to the model for this.

Part of task 3179751

closes odoo/odoo#117309

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-31 11:59:00 +02:00
William Henrotin b056deb7ab [FIX] stock_picking_batch: do not confirm multiple times
Commit 324298967cb6 fix the call to _find_auto_batch() by calling
_action_confirm() of the picking _after_ the assignation.

This implies to confirming 2 times the pickings. Which is an issue in
case an automatic orderpoint is searched and triggered. to fullfill the
need in the source location.

This commit change the call to action_confirm() to a call to
_find_auto_batch() only

closes odoo/odoo#117100

X-original-commit: eb6da7009a525665d4608243e260a2d07093abcc
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-31 11:58:52 +02:00
Camille Spiritus cbf462f9b9 [IMP] account: make QR error message more explicit
When trying to add a QR code to an invoice, if some conditions weren't met, the user would more often than not get a message simply stating :
"The chosen QR code is not eligible with this invoice".
This was confusing to the user, since the reason for a QR code to not be eligible are multiple : invalid IBAN, unavailable in X country, wrong currency...
Modified the _eligible_for_qr_code function to _get_error_messages_for_qr() so it returns an error message if the qr code is not eligible, and None otherwise.

task-3069753

closes odoo/odoo#116482

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-03-31 11:58:47 +02:00
Pierre-Yves Dufays 7710b82c26 [FIX] website_slides: Fix add pdf and image content
When uploading an image or a pdf content to a course, it was not uploaded. When
viewing it, as nothing was uploaded:
- for image, a default one was displayed
- for pdf, it kept loading for ever
This fixes the problem.

We also add tests checking the upload of a new image and a pdf.

Technical note: The file to upload is converted to base64 when the upload input
is changed and stored in file.data. When the user submit the file, it is that
preprocessed data that is being sent to the server. Following 542cb1dc,
nothing was assigned any more to file.data when the input field was changed so
submitted file was then always empty:
- for image, before this fix, undefined was always assigned to file.data
because the "dataURL" was split in 1 element and the second element was taken
for file.data. The submitted file was then always empty.
- for pdf, before this fix, only the preview was generated and file.data was
not assigned. Before that commit (542cb1dc), the file was read twice, one for
assigning the base64 content of the file to file.data and one to render the
preview. Here we read it only once in base64 to store it in file.data and then
convert it to binary for computing the preview using atob.

Task-3178726

closes odoo/odoo#117293

X-original-commit: 8a7453d9fc43cde13e2e07697e0b0b104a537b93
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-03-31 10:53:16 +02:00
Hubert Van de Walle (huvw) 6ca723dee4 [FIX] web: group pager: use correct count
Steps to reproduce
==================

- Go to the products list view
- Remove every filter/group by
- Search for "bolt"
- Group by > Add Custom Group > Active
- Remove the bold filter
- Expand the group

Cause of the issue
==================

The group pager is not displayed because the condition was incorrect

A group pager should only be displayed when the group limit is less than the
group count. The list count was used instead, meaning the total count
was the number of groups and not the number of item in the group.

opw-3221226

closes odoo/odoo#117267

X-original-commit: 4caab25d182bc2b5d1a2c315795a79d286a4491e
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-03-31 10:53:13 +02:00
MerlinGuillaume ae1d574453 [FIX] web: add the same image on different records
Using the same image on new records does not work without refreshing the
page

Steps to reproduce:
1. Install Sales
2. Go to Sales > Products > Products and create a new product
3. Set a name and an image on the product
4. Create a new product (with the 'New' button in the top right of the
   form)
5. Set the image used previously on this product
6. The image does not save

Solution:
Add a `t-key` on the FileUploader in order to recreate a FileUploader
when we open a new form

Problem:
The FileUploader component is not reset when we open a new form (the
files previously uploaded are still present on the FileUploader).
`onFileChange` is thus not called when we use the same image, as the
file hasn't changed.

[This commit] in master fixed the same issue by resetting the
FileUploader after each upload so we can revert it
https://github.com/odoo/odoo/blob/7710c3331ebd22f8396870bd0731f8c1152d9c41/addons/web/static/src/views/fields/file_handler.js#L66

[This commit]:https://github.com/odoo/odoo/commit/18384bb519d95e937ea4cfdd660ac08ba89214c0

opw-3151756

closes odoo/odoo#117252

X-original-commit: 3b04edc80f916b3b02a6abc7e88de32e53593fc2
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-03-31 10:53:10 +02:00
Romain Estievenart fb8112a06b [IMP] mail,hr,web: change the UX of the Many2ManyAvatarFieldPopover
The commit change the design of the Many2ManyAvatarFieldPopover the goal
is to remove the m2m dropdown and fill the dropdown content directly
inside the popover.

It also reverses the order of the displayed tags inside the m2m avatar
field in the kanban view and inside the popover.

It removes the possibility to unassign users on mouse hover in kanban
view.

Note:
It's still possible to remove users inside an m2m_avatar_field popover.

Task ID: 3229888

closes odoo/odoo#117194

X-original-commit: f0d71e98743421318a798ef9d4f1e75d11a23334
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-03-31 10:53:08 +02:00
Mylyna Hy f647465332 [FIX] website_sale: improve internal ref search
Problem:
Results do not show when users search the internal reference of the product template on the ecommerce page
if the product has other variants aside from itself.
The search only searches internal reference of product variants and not the product template.

Steps to reproduce on Runbot 15:

- Install Sales and eCommerce
- Create a product (can be sold), Set its Internal reference, and Add attributes and variants to the product --> Save
Note: the internal ref of the product variants are not set by default
- Go to ecommerce webpage and search the internal reference --> no product found

Proposed solution:
 Add a condition to the domain to also search based on the internal reference of the product template

opw-3212883

closes odoo/odoo#116771

X-original-commit: 5f0578059fe436d770e38ca90d8311ee80301878
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-03-31 10:53:02 +02:00
det 21e401fc16 [FIX] account: attachment_ids missing res_id
Step to reproduce:
- create 2 users without admin rights
- go to reconcialiation widget
- go to list view
- add a bank statement in multi mode (via the wizard) with an attachment
- change user and try to access bank statement
> user errors: 'Sorry, you are not allowed to access this document.'

This commit fixes this by adding the missing res_id to the attachment records.

closes odoo/odoo#117268

Note: in master, we shouldn't use the m2m attachment_ids.
Task-id: 3252972
X-original-commit: ea505d7421a7036d7a0d0152bd1cb79e28955eba
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
2023-03-31 09:48:56 +02:00
Julien Van Roy c3182fa59c [FIX] account_edi_ubl_cii: create partner at import if vat
When importing an electronic invoice, we only want to create the partner
when the vat and the name were retrieved.

closes odoo/odoo#117264

X-original-commit: ddfb7076f9f114ce4b29f50ae22c8663592cb4f4
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-03-31 09:48:51 +02:00
Julien Banken 88c256d8d8 [FIX] web: standardize behavior for int and float property fields
Currently, the property fields of type integer and decimal does not
behave like the standard fields. There are the following issues:

1. The property fields of type integer and decimal do not fallback to
   the value 0 or 0.0 when the field is emptied.
2. The user can not write the value 0 in the property field of type
   integer and decimal. The value gets discarded whenever the user
   unfocuses the input field.

This commit will fix those two issues and ensure that the property
fields have the same behavior as the standard fields.

task-3226202

closes odoo/odoo#117253

X-original-commit: 08c317743ba90802f471058a8f12d7211f9eb150
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-31 09:48:46 +02:00
Adrien Widart (awt) e33b3f4e01 [FIX] stock: display weight UoM on storage category
On the form of a storage category, the UoM of the weight is
hardcoded. This is incorrect as it could be `lb` thanks to the
option in the Settings

OPW-3204924

closes odoo/odoo#117236

X-original-commit: 57d3829d26d16d5360380aec4b7807fc381dd34a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-03-31 09:48:41 +02:00
Thanh Dodeur 560243aefa [FIX] mail: prevent attachmentViewer crash when clicking a video
In the last refactoring*, the click event handler from the old code
was missed, calling an undefined function, which can cause a crash
on some browsers.

This commit fixes this issue and implements the expected behavior of
preventing the propagation of the click to the parent handler that
closes the attachmentViewer.

\* https://github.com/odoo/odoo/pull/110188

closes odoo/odoo#117288

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-03-31 08:51:05 +02:00
Kevin Baptiste efb5564fd5 [FIX] hr_work_entry: correct add item to list
The fix introduced in #110559 was partially wrong, the employee ID was
not properly added to the list and would crash.

> TypeError: 'int' object is not iterable

closes odoo/odoo#117217

X-original-commit: a7914d43d7d1835a76486bb66de753b29a24dd70
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-31 08:50:55 +02:00
Sanket Brahmbhatt a0d3d49279 [FIX] ir_module: remove unnecessary download function
This error occurs when the name of the module is changed or modified after
being installed.

Steps to reproduce :
1. Install any module.
2. then change the module name.
3. click on module info >  upgrade.
4. Now Apply scheduled Upgrades in the navbar > Confirm.

See the way of error Generating by video:- https://tinyurl.com/2nj2tun4

We changed the name of the base module i.e. 'account_accountant' to
'account_accountant_demo' but this error will also come if the custom module
name has been changed.

commit link of function remove: - https://github.com/odoo/odoo/commit/0339a506f82daa41ccee7b918cb257ba9e8668bd#diff-4f9678d6b87914dc6deca5942262375043388c5ad041b65ce48e0c004e5e0e0bL806-L808

closes odoo/odoo#116265

Sentry: - 3980051773
X-original-commit: 1fa6d9ac2b47e684fc6a6d81632f93b9ffa781a9
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-03-31 08:50:52 +02:00
Rodrigo Serrano 47591e463d [CLA] Update Vauxoo's CLA
Incorporate Rodrigo Serrano (Rodrigosu_Vauxoo) as Vauxoo's contributor.
I confirm I have signed the CLA and read the PR guidelines at:
www.odoo.com/submit-pr

closes odoo/odoo#117280

X-original-commit: 492fb63063581a0335f6a7d3346b32044a533c1a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-31 07:50:43 +02:00
Louis Baudoux 8016ae059e [FIX] account: fix tax rounding adjustments in _check_total_amount
The tax adjustment could fail in the case where the user used another
language than English.
The `Untaxed Total` key was translated when inserted in the
`tax_totals['groups_by_subtotal']` dictionary but not when it was
accessed.

Ticket #3207452

closes odoo/odoo#117284

X-original-commit: 02b5037ff09ed193dca0899cacae48eaa34f9ea4
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-31 00:27:41 +02:00
qsm-odoo f697decd51 [FIX] portal: use proper muted color for portal chatter published dates
The color that was used for portal chatter published dates was the muted
color that we use at some places in the backend. The portal screens
being frontend screens, it of course did not work with all website color
schemes.

This simply uses the `$text-muted` color to fix the issue. This probably
needs refactoring in master to avoid those extra CSS rules that could
simply be gone with proper bootstrap XML structures.

opw-3146164

closes odoo/odoo#117233

X-original-commit: 29d691327317600ddf2116b7c02709bbeb6cae5b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 20:03:32 +02:00
David b43716af45 [FIX] sale_loyalty: prevent sending coupon message on failed sale confirm
There can be multiple causes that could prevent a sales order gets
confirmed when we push the *Confirm* button. This can be common when
extension modules come to play.

The simplest way to reproduce it (no extra modules needed) would be to
make an automated action on sale.order with a criteria that could avoid
the confirmation throwing a UserError.

The coupon email would be sent anyway as we can't rollback a mail
sending once it's gone away but it wouldn't be valid as the process
stopped after it.

So we want to prevent sending that mail if the sale.order can't be
confirmed.

TT42124

closes odoo/odoo#117215

X-original-commit: 2e5c0bf6568f9ed12a0a93d1519bdee75c5eec80
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 18:59:11 +02:00
Leonardo Pavan Rocha 1fbe56df36 [FIX] calendar: fix videocall location is always readonly
After https://github.com/odoo/odoo/pull/102967, a readonly="1" was added in the
videocall_location field. This forces the field to be readonly instead of
taking into account the readonly domain set in the attrs.

closes odoo/odoo#117214

X-original-commit: 459d5d75edafc2f8796006308e15940889c7dcb6
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2023-03-30 18:59:08 +02:00
Leonardo Pavan Rocha 0d7ebeac42 [FIX] calendar: convert relative URLs to absolute
In case the videocall_location was a relative URL, the link wouldn't work
properly. This commit fixes this by converting all URLs to absolute
automatically. Note that this only works for http and https protocols. If
using proprietary schemes such as :skype is desired, this implementation
should be done in the respective module.

X-original-commit: 16fb60e193d0c79333d95ef2f31f0ec01830571f
Part-of: odoo/odoo#117214
2023-03-30 18:59:08 +02:00
Alexandre Kühn 96ebb86201 [FIX] mail: CTRL-C content in chat window from home menu
Before this commit, when in home menu with a chat window,
it was not possible to copy content in conversation with
CTRL-C.

This was due to keydown event being intercepted by the hidden
home menu input.

This commit solves the issue by not propagating keydown events
above chat window, so it's not intercepted by the home menu for
his input.

closes odoo/odoo#117211

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 18:59:05 +02:00
Arthur Detroux (ard) 1ebcdb0023 [FIX] website, *: check access rights to display elements in New+ modal
*: website_blog,website_event,website_forum,website_hr_recruitment,
website_livechat,website_sale,website_slides

Prior to this commit, elements inside the New+ modal had a `isDisplayed`
property that was meant to be changed by the patches done by each
module. Unfortunately, this was forgotten in the refactor done in [1]
and more precisely when the component was introduced in [2].

This commit fixes that by checking the access rights of the user on each
individual model used on the create form.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/ca2e143d54622d598201826a2cd669bad64b205d

opw-3198700

closes odoo/odoo#117206

X-original-commit: 58704cb7615addd7d40291431e05a894776320d8
Related: odoo/enterprise#39066
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 18:58:59 +02:00
Valeriya(vchu) 305aac3045 [IMP] sale: promote create_invoices button
create invoice is a common action in sales orders listview that should be promoted for the better user experience

task-3037442

closes odoo/odoo#116495

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 18:58:54 +02:00
hiroh-odoo 647cf8fe63 [IMP] project: prevent opening form/list view from reporting
Before this commit open the form/list view from reporting views when clicking
on the graph and pivot.

This commit prevents the opening of the form/list view from reporting.

task-3166747

closes odoo/odoo#113362

Related: odoo/enterprise#37402
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:51 +02:00
Vincent Larcin 20f938bd10 [IMP] project: add fields to burndown chart search view
This commit removes some field from the burndown chart search view that
were previously removed from the task search views.
It also adds a few fields present in the task search views but missing
from the burndown chart.

Enterprise: https://github.com/odoo/enterprise/pull/36804

Task-3142077

closes odoo/odoo#112194

Related: odoo/enterprise#36804
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:43 +02:00
Alexandre Kühn 43bc9897e3 [FIX] mail: read more/less link on message of type notification
Read more/less requires content being `t-ref="body".
It was not properly set for messages of type notification, thus
skipping the read more/less insertion in the content.

closes odoo/odoo#117203

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:58:07 +02:00
Christophe Monniez e878843ee0 [FIX] requirements: fix jinja version for py 3.11
The pinned version of markupsafe for python > 3.10 is incompatible with
the pinned version of jinja.

With this commit, the Jinja version is pinned to follow Debian bookworm
version when python > 3.10 which should fix the issue.

closes odoo/odoo#117191

X-original-commit: 548d177e16f364b35f61f861df132dfcedc71e28
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-03-30 17:58:04 +02:00
Ivan Yelizariev 94cf6128df [FIX] *: fix css issue with labels in Settings page
Settings page lacks a space between some labels and corresponding selection
input. Example: label *Digest Email* and default value *Your Odoo Periodic
Digest*.

Fix it by adding margin via mr8 class

Code analysis
=============

v15 has margin:
https://github.com/odoo/odoo/blob/eee0a77619b0cef70272b24f6ff663210e94eb1e/addons/web/static/src/legacy/scss/form_view.scss#L673

while v16 doesn't have it
https://github.com/odoo/odoo/blob/3ee5d7a0fbccae5f742e1aba8d3d24f8bab3cbdd/addons/web/static/src/views/form/form_controller.scss#L605

v16 was refactored first https://github.com/odoo/odoo/commit/8fa6e923d0fc8695d92e0b114e230d3abab7d9bc

- margin: 0 $o-form-spacing-unit 0 0;
+ margin-right: $o-form-spacing-unit;

but then it was completely removed
https://github.com/odoo/odoo/commit/fb629dc91df1720cb0658d3e9f946a4fda83fbd0

opw-3115232

closes odoo/odoo#117187

X-original-commit: b87e214e7b6ea23aa187f87f922ef8f077393e9a
Related: odoo/enterprise#39054
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-03-30 17:57:58 +02:00
Maruan Aguerdouh (magm) 345fdee4fb [FIX] mass_mailing: fix traceback when creating a mailing campaing with filters
Steps to reproduce:

- Get Marketing Automation module and mass_mailing module
- Go to Marketing Automation > Configuration > Favorite filters
- Create a new filter with for example, Recipient Model as Contact and
the domain to be 'Name contains test'
- Now we go back to Campaigns (Inside Marketing Automation) and create a
new campaign with the filter that we have just created.
- Create a new activity for this campaign with any mail template and
save it.
- Now just pres "start" to start the campaign.
- After that you can also use "Launch a test" to see the trace-back.

Issue:

We receive a trace-back when we try to access to a value of a undefined
object. That it is launch whenever we have a campaign with filters.

Solution:

Added the handling of the case when the inputElement is undefined.

opw-3146908

closes odoo/odoo#117185

X-original-commit: b5b0d665ef2ea492bf7f9823da7f7982b0ddefa6
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
2023-03-30 17:57:55 +02:00
Didier (did) bb8017707c [FIX] mail: restore the ability to disable link preview
Before this PR it was not possible to disable the link preview by setting
`mail.link_preview_throttle` to 0. This feature was lost in the refactoring.

This PR reintroduce this feature.

closes odoo/odoo#117101

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:57:53 +02:00