Commit Graph
158817 Commits
Author SHA1 Message Date
Nasreddin Boulif (bon) b3be95860b [FIX] event_[booth_]sale: don't allow event product on quotation template
Current behavior:

In a sale order: a wizard pops up to complete the link with the event
and attendee when we add an event product (same issue with event booth).

In quotation template: the wizard doesn't pop up when we add an event as
optional product.

When we create a sales order with the quotation template, the event
is added as product but the wizard still does not pop up, and therefore,
the SO is not linked to the event.

After this commit:

  Don't allow adding event (or event booth) as optional product to a
  quotation template.
  A same fix was already done on products (not optional) here:
  https://github.com/odoo/odoo/pull/100499

opw-3081853

closes odoo/odoo#113730

X-original-commit: a6bc38598f695ead9d9816b6858823b28b4ba95d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-02-27 13:56:07 +01:00
Nicolas Bayet d7ea3c1aec [FIX] web_editor: test equality of stripped values in updateValue
Since
https://github.com/odoo/odoo/commit/1b8d663cdccced35fd294ef3481aa7ce294880f0,
in `updateValue`, the `value` and `lastValue` could have different
`data-last-history-steps` and still be the same value.

This commit fixes the method to compare the values stripped of their
history ids.

opw-3134569

closes odoo/odoo#113726

X-original-commit: 5abb2ced63caffaf528f7b71eb1c193729ecd327
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-02-27 12:54:48 +01:00
sofiagvaladze 2810aa3422 [IMP] hr_recruitment: rename the search field
task - 3203196

closes odoo/odoo#113653

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-02-27 12:54:45 +01:00
Zahrah 859afd748e [CLA] signature for ZahraBadzohreh
closes odoo/odoo#113717

X-original-commit: eaf3f389806b606fc66f5f3e0322575bde1048a7
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-02-27 11:47:16 +01:00
Jigar Vaghela ce837df5cb [IMP] l10n_in_edi*: improve invoice print
Move QR from header to next to the invoice total,
now it's look like this https://drive.google.com/file/d/1kNge9eWUc0rMD_6VIDni7F4iHDa4QAE7/view?usp=sharing
Fix the QR code size, increase the QR code pixel and give max size so the quality of the QR code is improved.

Merged waybill number and valid until date so it takes less space, same for E-invoice Acknowledgement

task - 3147187

closes odoo/odoo#113671

Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-02-27 11:47:11 +01:00
Jigar Vaghela a14783bb90 [IMP] l10n_in: sort tax name so in invoice PDF it takes low space
task - 3147187

Part-of: odoo/odoo#113671
2023-02-27 11:47:10 +01:00
Maruan Aguerdouh (magm) c2b82c89a5 [FIX] pos_loyalty: enter code button now displayed with discount codes
Steps to reproduce:

- Install pos, pos_loyalty, sales and activate the discounts and coupons
- Create a Discount code for the POS.
- Go to the POS see panel of buttons.

Issue:

Having discount codes in active won't trigger the button for enter the
code to be activated.

Solution:

We added the discount codes (`promo_code`) to the part in
`PromoCodeButton.js` that handles when we display the button.

opw-3193426

closes odoo/odoo#113646

X-original-commit: 200cf4ffa2e18498fdda62c51f7016cf0172e273
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-02-27 11:47:07 +01:00
Xavier Morel 0d5b9d2030 [IMP] core: increase FileStorage buffer size
Closes odoo/odoo#83176

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-01-23 09:32:06 +01:00
Antoine Guenet f5c906770b [FIX] mass_mailing: ensure inlining of HTML with all required assets
Commit [1] cloned the contents of the edited e-mail to a temporary
iframe before inlining its HTML (`convert_inline`). However, the assets
were not properly loaded in the iframe, which prevented the inliner from
doing its job properly, in particular with fonts (e.g., Font Awesome
icons were not loaded so they couldn't be converted to images).
This uses the `srcdoc` attribute of the iframe instead of replacing its
HTML element with a clone of the edited e-mail's, making sure to remove
all scripts from the iframe to prevent them from running, and disabling
script execution in it as a safeguard.

Steps to reproduce an example bug fixed by this commit:
1. Start a new e-mail with the "empty" template
2. Add a "Left Logo" snippet
3. Save
-> The Font Awesome icons are missing from the saved e-mail, the font of
the text is wrong, and the image is stretched out.

[1]: https://github.com/odoo/odoo/commit/582567fa13cef3e5fee00a17ff52c623ba5422f2

closes odoo/odoo#113687

X-original-commit: 79dc6384329b1e8bd2338160d62028ac0c1cdce4
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-02-27 09:37:26 +01:00
xO-Tx 4c03b3651a [FIX] website: fix header shadow color
To reproduce the issue:

- Website > Edit mode > Click on header
- Change the shadow color of the header to a suggested gray > it only
  works with normal colors but not grays.
- Change the header to "Header full" (it has no shadow by default)
- Add a shadow > It works
- Change the shadow color to a gray > it is reverted to no shadow.

To explain what happens exactly, let's suppose we want to set the gray
color from the custom property "--900":

When this color selected on colorpicker, the `customizeWebsiteVariable`
method will update assets to set a new user value:

`'menu-box-shadow': var(--900) ...`

But when the SCSS is compiled, the property name (here "--900") is
computed as a number which generates a wrong CSS value: `var(900) ...`

The goal of this commit is to prevent this behaviour by protecting
colorpicker variable names so they cannot be used for any further math.

task-3069518

closes odoo/odoo#113376

X-original-commit: 3e58af4bd9151f491c6a609b23f956191c594632
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-02-27 09:37:24 +01:00
luvi 7cd4c148eb [IMP] web, *: improve ProgressBarField visual state
*: hr_skills, project

This commit improves the behavior of the ProgressBar field. Before 16.0,
views had a readonly mode, and to avoid having the inputs always visible,
the user had to click on the progressbar to enter into an edition mode.

Nowadays, this is redundant, and make it difficult to guess that the field
is editable. With this commit, the input is always visible, which also
allow to improve the template and the code of the component. The commit
delete unused props/options that were no longer used by the widget.

This commit also remove a legacy scss file that was still present, and the
style of the component has been moved to its own file. Some dead classnames
have been dropped, or replaced by bootstrap classes, reducing the size of
the scss file.

Tests had to be adapted, because some assertions were irrelevant, or were
triggering the click to enter edition mode.

task #3178958

closes odoo/odoo#113002

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-27 09:37:21 +01:00
Aaron Bohy 211ad04773 [FIX] web: Many2One in dialog: open related record in dialog
The external button of the Many2one field has been changed with the
"always edit" feature of the form view, s.t. it displays by default
another icon (a right arrow) and when clicked, opens the related
record in another plain screen action instead of a FormViewDialog.

However, this doesn't work for Many2One fields that are already in
dialogs, because
 1) if it's an action dialog (target="new"), that dialog will be
    closed when opening the related record and the user loses its
    working context
 2) if it's another type of dialog (e.g. FormViewDialog), the
    related record opens in the background and the dialog remains
    open, which is obviously a bad UX experiment. This had been
    locally fixes at some places [2].

This commit fixes the issue by automatically opening the related
record in a FormViewDialog if the Many2One is itself already in a
dialog.

This commit also fixes an issue with the scenario where the related
record opens in a dialog: if there were changes done in the main
record, those changes where lost when the user clicked on "Save"
in the dialog of the related record. We now only reload the
display_name of the related record, and apply it to the model.

[2] https://github.com/odoo/enterprise/commit/ba0e95fe42696dcf44b8feddeb302f04876fcbdc

Task 3191319

closes odoo/odoo#112959

Related: odoo/enterprise#37213
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-27 09:37:18 +01:00
David Monnom (moda) c7fbae7a34 [REF] point_of_sale, pos_*: remove usage of useListener
*:point_of_sale,pos_ayden,pos_discount,pos_hr,pos_loyalty,pos_mercury,
pos_restaurant,pos_sale,pos_six

Previously, the point of sale and related modules made heavy usage of
`useListener`. This is because the pos was converted early to owl, and
in owl 1, using events to communicate between components was encouraged.

In owl 2, the decision was made to stop encouraging this way of
communicating between components, because it encourages communication
accross many layers of components, and is also hard to debug. In
addition, in owl 2, because components can have 0 or more than node,
including non HTMLElement nodes like text or comment nodes, owl removed
the implementation of useListener, as useListener relies on the presence
and unicity of a root HTMLElement per component on which we can attach
event listeners.

Another problem is that events rely on the fact that the components are
in the DOM so that the event can propagate, which can lead to issues in
some cases and in particular, in the PoS, if you load the point of sale
and switch tabs, some things will be broken because we are triggering
events, but there have not been any animation frame fired in the tab
because it's not focussed, and so owl has not mounted the component yet.

When migrating odoo to owl 2, we introduced a shim for this.el and
useListener in LegacyComponent, with the hope to remove it as soon as
possible.

This commit removes all usage of useListener from the pos modules for
those reasons. In some cases, useListener was incorrectly used intstead
of t-on, and the event was triggered and handled by the same component,
in other cases, a simple callback could be passed to a child component.
In a few cases, a method had to be implemented on the store as we wanted
this method to be available everywhere.

closes odoo/odoo#112219

Related: odoo/enterprise#36888
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-02-27 09:37:12 +01:00
Davor Bojkić - Bole 6900eba5bf [FIX] obvious change , as it is valid since 1.1.2023
closes odoo/odoo#113492

X-original-commit: dfcc91ca1844abd284386e55d1d3700ca66b4148
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-02-27 08:41:42 +01:00
Christophe Monniez dfe7bcecbf [FIX] account: adapt pypdf2 import for both versions
As PyPDF2 was bumped from 1.2.6 to 2.12.1 and made some breaking
changes, we made an attempt in 8e0564dff to have Odoo working with both
versions. This is necessary because of the imminent release of Debian
Bookworm that will provide PyPDF 2.12.1. In the meanwhile this import
broke the Bookworm nightly build.

While at it, let's remove the unused `textwrap` import.

closes odoo/odoo#113667

X-original-commit: 7431019b35ee71813ce8602f46ddc50a70c661ed
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-02-27 07:45:01 +01:00
Abdelouahab (abla) 0d1a074854 [FIX] mail: uncheck recipient without partner
To reproduce
============
- on website add or edit **contact us** form to create a task on a project
- fill the form from Incognito
- on project -> the created task : try to send message on chatter
- you will find the email used when filling the form with possibilty
to check it as receiver
- check the box, a dialog will open to create a Partner for this email
- close the dialog without modifying anything

Problem
=======
the checkbox will remain checked, but when you send a message no email will be sent

Solution
========
as stated in this comment https://github.com/odoo/odoo/blob/de1f701e7bd7ebb6f7ebea5c097d980039c4f904/addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js#L128-L130
we will only send the message to partnenrs, so if no partner is
created we must uncheck the checkbox.

opw-3168779

closes odoo/odoo#113701

X-original-commit: 24e6a16e349e1521fadc8c18574c15389c550f0c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2023-02-26 21:11:08 +01:00
Paolo Gatti (pgi) a8dc624635 [FIX] l10n_it_edi: cannot reset to draft moves sent to SdI
If there's a l10n_it_edi_transaction id on the move, then the move
has been sent to the SdI and it has received no rejection yet.
So we avoid showing the Reset To Draft button in that case.

Task link: https://www.odoo.com/web#id=3191726&model=project.task
Task-3191726

closes odoo/odoo#113694

X-original-commit: dc088f2dabc369a3c7a00be7d20e81a56aeffef5
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2023-02-25 16:26:39 +01:00
momegahed 01489bfab5 [FIX] sale: a missing space in mobile view
Steps to reproduce:

- go to any sale order
- force mobile view
- refresh

Bug:
there is no space between the quantity and the unit

Fix:
putting both in the same line makes odoo add the space between them

OPW-3185674

closes odoo/odoo#113273

X-original-commit: 1a0d4c32161444902467c3ec18003c24e885edd1
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-02-25 13:33:07 +01:00
Thomas Lefebvre (thle) 5da3ab038b [FIX] base, sale_project, project_purchase: convert currencies in profitability
Steps to reproduce:
- create a project with an analytic account;
- create sale orders/invoices and purchase order/bills for a project;
- use other currencies;
- go to the "Project Updates".

Issue:
The amounts are used without being converted
into the currency of the analytic account.

Solution:
Convert amounts used in the currency of the analytic account.

Note:
For performance reasons, it is acceptable to fetch all currency
on the same date to get the conversion rate.
In this case, today's date is the most appropriate
(as the project is in progress).

opw-3193676

closes odoo/odoo#113684

X-original-commit: 68b4ea69c173dd5894bcb42b99e6818f241f9734
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-02-24 20:14:01 +01:00
Guillaume (gdi) b1ada1af7d [FIX] website: avoid TOC test failure
This commit adds a trigger in the table of content test to make sure the
edit mode is ready before clicking on the first TOC block. This is
necessary because the test often failed on the runbot.

task-3203031
runbot-17505

closes odoo/odoo#113668

X-original-commit: 4775cfc38ed4e601c9ab6ae88c39c77299a50636
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2023-02-24 18:16:27 +01:00
Lois Rilo c2f499c365 [FIX] base: fix same_vat_partner_id multicompany computation.
Creating a new partner with no company selected should raise the
same VAT partner warning if there is any other partner **in any**
company with the same VAT.

closes odoo/odoo#113649

X-original-commit: 97bf59848e6e0dabda28db4b6fc1cc20844f0b97
Signed-off-by: William André (wan) <wan@odoo.com>
2023-02-24 18:16:25 +01:00
Stefan-Calin Crainiciuc (stcc) 53324c44de [REV] mrp: create productivity line before modifying workorder
Reverts https://github.com/odoo/odoo/pull/110666 because of breaking
behaviour introduced in https://github.com/odoo/enterprise/pull/35696

- Install quality_mrp_workorder
- Manufacturing > Config > Create 2 workcenters: WC1 and WC2
- Products > New Product > Name: P, type: Storable, Routes: Manufacture
- Manufacturing > BoMs > Create > Product: P, Operations Tab, add 2 lines:
- 1. operation: OP1, Work Center: WC1, Save
- 2. operation: OP2, Work center: WC2, Save
- Manual Save BoM, don't exit
- Components Tab, unlock column Consumend in Operation, add 2 lines:
- 1. Product: P1, Create and edit > type: Storable
- 2. Product: P2, Create and edit > type: Storable
- Both lines, quantity: 2.
- Each line, Consumed in operations: OP1 and OP2
- Save and exit
- Operations > Manufacturing orders > New > Product: P, Quantity: 2 > Confirm
- Workorder Tab > open first line tablet view: Quantity = 2.00/2.00 Units > Validate
- open second line tablet view: Quantity = 0.00/2.00 Units (!)

closes odoo/odoo#113574

Issue: The recommended quantity should also be 2.00/2.00
X-original-commit: 67774c967b587a660be032712b7a2369ed7abc3a
Related: odoo/enterprise#37500
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2023-02-24 18:16:19 +01:00
roen-odoo 70057bc721 [FIX] point_of_sale: Cash opening difference not shown in closing popup
Current behavior:
When there is an opening difference, the closing popup does not show it.

Steps to reproduce:
- Create a new POS session
- Add some cash to the register (100€)
- Close the session with the same amount
- Open the session again
- Change the cash amount in the register (80€)
- When closing the session the popup should show the -20€ difference

opw-3101297

closes odoo/odoo#113539

X-original-commit: 03860317dfcc998b5d0716d08b4267b6ee4689e5
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-02-24 18:16:16 +01:00
Anita (anko) b9975214c4 [REM] website_payment(_paypal): remove paypal quick onboarding
PayPal no longer supports receiving payments without an account.

task-3166217

closes odoo/odoo#113138

Related: odoo/upgrade#4354
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-24 18:16:11 +01:00
Morgane (morm) e095e62f4a [IMP] web_editor: different layout in mobile for toolbar
Prior to this commit, the responsive behaviour of the toolbar was a
scroll-x.
I added conditions with widget.isMobile(), to allow the layout to change
in mobile (ex: all the list options in a dropdown).

closes odoo/odoo#110161

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-02-24 18:16:05 +01:00
David Monjoie 6b974fd540 [IMP] web_editor: make isMobile accessible from toolbar template
The property is needed in the template for mobile design purposes.

task-3087826

Part-of: odoo/odoo#110161
2023-02-24 18:16:05 +01:00
Morgane (morm) 350e719504 [FIX] mass_mailing: fix dropdown and display issues
This commit fixes the issues in the mass_mailing module where the display
needs to be grid, and the dropdown dynamic is causing issues because of
the css rules transform and unset.
Popper.js manipulates transform and the position of the dropdown, and
in mass_mailing, its calculations are wrong.
These !important rules stops it from doing so, by unsetting the automatic
rules generated by Popper.

Part-of: odoo/odoo#110161
2023-02-24 18:16:05 +01:00
Morgane (morm) f37e089c8a [IMP] web_editor: floating bar and commandbar scss review
Prior to this commit, there were functional issues for the floating toolbar
and design issues for the Powerbox in the web editor.

This commit fixes those issues, like alignement for the icons in the list
of the commandbar, box shadows, and the responsiveness of the floating
toolbar on mobile.

In commit [1], the toolbar dropdown had the display static added, but it
causes problems to the responsiveness.
This commit put the display back to dynamic on the dropdown and so, fixes
the dropdown not showing on mobile because of the overflow-x on auto.
The dynamic state also allows the dropdown to change direction (dropdown
to dropup) when there's not enough space for the content of the dropdown.

Would be nice to have : use display state on the all the editor
toolbars (frontend and backend) to modify the layout of the toolbar for
mobile, for a better behavior and design (ex: the different lists in a
dropdown).
For now, it's just a horizontal scroll.

[1]: 459d4e27a8

task-3087826

Part-of: odoo/odoo#110161
2023-02-24 18:16:04 +01:00
Anita (anko) 1d846c36d9 [IMP] payment(_*): allow specifying extra allowed states
Some providers require additional allowed states due to their refund or
transaction process justifying it. Until now, these extra states were
specified in the `payment` module, which was not ideal as it allowed
every provider in every flow to accept these additional states.

With this commit, additional states are now specified only in the
coresponding flow of a provider that requires them.

task-2869678

closes odoo/odoo#107110

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-24 18:16:00 +01:00
snd 4ab6f383e1 [FIX] mrp: translate blocking reason
Blocking reasons on workorders are not translatable, this fixes that.

closes odoo/odoo#113641

Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-02-24 17:13:13 +01:00
amdi-odoo deaf9939b5 [IMP] survey: add every question type filters
Purpose
=======
Improve the results page filter to allow the filtering
on questions of type text_box, char_box, numerical_box,
date and datetime.

Specifications
==============
Updating the URL filters representation to avoid passing the
question types directly in the URL parameters.

Answer matching per question type:
- char_box, text_box: 'ilike'
- numerical_box, date, datetime: '='
Adding a new filter restricts the current filter results.

Handling the filters depending on the 2 different answer models:
'survey.question.answer': matrix, simple_choice, multiple_choice
'survey.user_input.line': char_box, text_box, numerical_box, date,
datetime.
The filters can be combined but their query count doesn't add up
if their related answers data are stored in the same model.

Task-3138245

closes odoo/odoo#110252

Related: odoo/enterprise#36383
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-02-24 17:13:05 +01:00
Sébastien Geelen (sge) aa252adf4f [ADD] web,mail : new dynamicplaceholder tour
Add a tour that test the basics of the dynamic placeholder
dropdown functionality.

task-3081325

closes odoo/odoo#109326

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-02-24 16:09:45 +01:00
Sébastien Geelen (sge) eae20c47eb [REF] web,web_editor,mail : dynamicplaceholder hook
Refactor the Dynamic Placeholder hook to have better
separation of concern from the Field that need it.

task-3081325

Part-of: odoo/odoo#109326
2023-02-24 16:09:45 +01:00
Sébastien Geelen (sge) 3e5d16967f [FIX] web_editor: strip history ids in isDirty
The presence of the history ids in the html resulted in false
positive in the  `_isDirty()` comparison. This lead to unwanted
writes when switching records, even when no change were made.

task-3186072

closes odoo/odoo#113633

X-original-commit: dcd3a538ecd4d7dc35bd7de6a8e2655e7392660a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-02-24 14:20:41 +01:00
Julien Van Roy 6938ff40d0 [FIX] account_edi_ubl_cii: float_repr should not be used for rounding
The `format_float` function is calling `float_repr`, which should not be
used for rounding operation (see its docstring). Instead, we should use
the `float_round` function.

opw-3171987

closes odoo/odoo#113631

X-original-commit: 0267c0d11ad1a5882aa5520bbf9455156b83149c
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-02-24 14:20:38 +01:00
Mathieu Duckerts-Antoine 965fed0cd6 [REF] *: add dialogService in setupControlPanelServiceRegistry
From a practical point of view, it seems better to also add the
dialog service in the service registry when calling
setupControlPanelServiceRegistry.

closes odoo/odoo#113610

Related: odoo/enterprise#37510
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-24 14:20:30 +01:00
Benoit Socias dafb99681d [FIX] website, website_sale: prevent Chrome from selecting hidden tabs
When selecting the content of a tab with Chrome, if the selection
reaches the end of the tab content and there is additional content after
the Tabs snippet, the selected range also includes the next inactive
tabs that are hidden. Because of this, when replacing that selection,
the next inactive tabs are removed, and the Tabs snippet is corrupted.

This commit avoids this by including the `.tab-pane`s in the read-only
areas while including its `.oe_structure` in the content-editable areas.
This makes the selection adjustment mechanism stop within the active
tab pane.

Steps to reproduce:
- Use Chrome.
- Drop two Tabs blocks inside a web page.
- Select the first tab of the first one.
- Select the last word, including the dot. (Double-click the word and
  drag beyond the dot before releasing the mouse button.)
- Change the selected text's color.
=> The content of the second and third tab also had the chosen color.

- Select the text in the first tab with a triple click.
- Type something to replace the text.
=> The content of the second and third tab were removed and clicking
on the tab's header did therefore not reach them anymore.

opw-3117305

closes odoo/odoo#113624

X-original-commit: fd57dae13179c286da99749e77a3b26efd2f73f2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-02-24 13:17:06 +01:00
Thomas Lefebvre (thle) 5b709043af [FIX] hr_expense: add label for total amount company field
Steps to reproduce:
Create an expense with a product which has a cost.

Issue:
There is no label that explains the amount displayed.

Solution:
Correct the label display.

opw-3132937

closes odoo/odoo#113623

X-original-commit: e1a90c39111a0210d043d6708fd283af720bd128
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-02-24 13:17:04 +01:00
Frédéric Garbely 2cfdbef535 [CLA] Clean-up of the CLA for brain-tec AG.
Renamed brain-tec.md to braintec-group.md and removed the contributors who never contributed.
Created a new file braintec.md and added the currently needed contributors there.
Due to our rebranding and the associated change of the domain, this adjustment was necessary.

closes odoo/odoo#113619

X-original-commit: a1dab0536744086297d5d7407dc9ba873c8e8117
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-02-24 13:17:01 +01:00
Noe Antoine a547f73df7 [IMP] crm_iap_mine: clean views from lead generation button
Remove the "generate leads" buttons from most crm lead views:
we do not show buttons if active_model is set to something else
than crm.lead. It is both done in the kanban and in the list views.

Some create are also set to False.

Task-3107232

closes odoo/odoo#108445

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-02-24 13:16:56 +01:00
Victor Feyens aefbb3d17c [CLN] product: style pass on split files
closes odoo/odoo#113612

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-02-24 12:14:45 +01:00
Victor Feyens efbe5d837e [MOV] product: split product_attribute.py
Part-of: odoo/odoo#113612
2023-02-24 12:14:44 +01:00
Jinjiu Liu a211b7bf02 [FIX] web: don't reset column size in list view after resizing
Reproduction:
1. Install Sales
2. Go to the quotations
3. Drag the column “name” and change the size
4. Check any sale order in checkbox
5. The column size is reset to default

Reason: the keepColumnWidths parameter isn’t set to True after changing
the size. This happens to all the list views

Fix: we freeze the list after resizing the columns. Remove the extra
keepColumnWidths setting in reordering since it's already set to true
after resizing. Also added tests to check the column size is kept after
toggling the checkboxes

A similar fix is here: https://github.com/odoo/odoo/pull/10902

opw-3113822

closes odoo/odoo#113607

X-original-commit: 30a346a90b633dd73fa823de2cdaf37a0e52c526
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2023-02-24 12:14:41 +01:00
xO-Txandqsm-odoo 1096ed7b5a [FIX] web_editor: prevent async code on link tools update
Starting from [1], the `_updateColorpicker` method was added on the
"link tools" widget to update colorpickers with the selected link colors
(and it will create the colorpicker for each CSS property on widget
`start`).

Following this update, the code on [2] and [3] added some fixes to
handle the async parts of `_updateColorpicker`. [3] was done very
recently, more than one year later after the introduction of [1]. It
turned a synchronous method into an asynchronous one (rightfully
considering the async calls to `_updateColorpicker` that were inside).
As a fix, this commit will try to re-made it a synchronous method, and
other parts related to `_updateColorpicker` too.

The goal of this commit is to separate the link tools colorpicker
"creation" code (`_addColorPicker` now) from colorpicker's "update"
code. These changes are supposed to fix a race condition issue that
appeared on 16.0, but since the code is the same on 15.0 and subject to
the same issues, we target 15.0 with this fix. Hopefully, this prepares
for an easier refactoring in master.

[1]: https://github.com/odoo/odoo/commit/26d37812f0217ae913c8ddf761bcb26b5c44bff5
[2]: https://github.com/odoo/odoo/pull/78301/commits/6f1a6b76642db2e4f81cf3474ad0ec745a4bb3c9
[3]: https://github.com/odoo/odoo/commit/d15fdca644ef9ed1dfb011d3790f403e0157f55b

runbot-5753

closes odoo/odoo#113510

X-original-commit: 2d4a3efe0d7c9618c388575b4bb652a26913fe68
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-02-24 12:14:35 +01:00
Andro Gvivradze 385721586e [IMP] website_slide: add slide count and completion time to categories
This commit intends to add information about the number of slides,
as well as the time needed to finish said slides to the slide sections.

We now also round completion time values up to minute when getting said values
from youtube, google drive or vimeo.

In addition, we add responsible, course and tags options in the search bar.

Task-3054391

closes odoo/odoo#107507

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-02-24 12:14:32 +01:00
Martin Trigaux a17e44aad3 [I18N] l10n_it_edi: correct translation
Courtesy of Marianna (cima)

closes odoo/odoo#113595

X-original-commit: b8f65c0ecb1680c3f30c007454f92b6d135f585f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-02-24 11:11:43 +01:00
Martin Trigaux cd10bee519 [FIX] transifex: still support old .tx/config format
If one of the theme was not migrated to the new tx api, still support
the previous notation.
Happened on the design-theme repository

closes odoo/odoo#113571

X-original-commit: a8355ba3dddb5f3c8a8e8e777aff85d558410971
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-02-24 11:11:40 +01:00
Xavier-Do 723c0c24f6 [FIX] models: remove set iteration
A set iteration was creating a random number of queries on some tests.
This was noticed in TestEventPerformance were a random additionnal query
 could appear in default_get depending on _get_description and
_get_default_stage_id order.

This commit uses a list to get a deterministic order. It looks like
the set was not useful anyway.

closes odoo/odoo#113563

X-original-commit: 13572df256ccc6351588851d385c381ace155e0d
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-02-24 11:11:37 +01:00
Aaron Bohy 9374a6f2b7 [REF] *: js fields: extractProps receives fieldInfo
This commit is part of the preliminary work to rewrite the form,
list and kanban model. We want this new Model to only be aware of
field related information it needs (whereas in its current
implementation, the model stores all the information extracted
from the field node in the arch). This would allow to properly
manage multiple occurrences of the same field in views, that is,
each occurrence would be represented by a field component (if
visible of course), and that field component would use the field
information of the arch node it represents. To this end, we want
fields from not using anymore information stored in activeFields
in the record datapoint. Instead, we now call extractProps with
the whole fieldInfo (the information extracted from the arch), s.t.
each field can generate the props it needs from those information
(e.g. sub views for x2manys).

This commit doesn't remove the use of record.activeFields in
concrete fields (this will come later), but reworks the fieldInfo
object generated by parseFieldNode, and provide it to the calls of
extractProps. In fieldInfo, the `options` key is no longer inside
`attrs`, as it is now top-level, alongside several other generic
keys that have been processed (like on_change, modifiers...). For
that reason, a lot of extractProps definitions had to be adapted.

Part of task 3179751

closes odoo/odoo#113092

Related: odoo/enterprise#37266
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-02-24 11:11:32 +01:00
Victor Piryns (pivi) 8401192620 [FIX] snailmail: don't delete letter we trying to resend
Current behaviour:
When trying the resend a snailmail that had a format error, by
adding a cover we get an error that a record we trying to access is
deleted.

Expected behaviour:
We shouldn't delete the letter that we are trying to resend.

Steps to reproduce:
- Install Invoicing
- Add an IAP account with some credits
- Create a contact with a reallllyyyy long address, to overfill the
  fields.
- Create an invoice for that customer, try to print/send a snailmail
- It should fail without a message, then scroll down to the red
  paperplane, add the cover and update resend, you get an error
  about the missing record.

Reason for the problem:
This legacy code, so maybe in the past it used to work a bit
differently. When trying to resend the letter, we are unlinking it's
attachment (reasons for that are unknown to me), which is linked
with a `Many2One` with letter with a cascading delete, so we end up
deleting the `snailmail_letter` that we are iterating over, then
when trying to write, it throws the error.

Fix:
Remove the link between the attachment and the letter before the deletion
of the `attachment_id`, so the letter is not being deleted.

Affected versions:
- 14.0
- 15.0
- saas-15.2
- 16.0
- saas-16.1
- master

opw-3111774

closes odoo/odoo#113596

X-original-commit: 5cfbfa8e1103081dab89a3114b20edfe9c724c26
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-02-24 10:06:32 +01:00