Commit Graph
167330 Commits
Author SHA1 Message Date
Victor Feyens 844dbbca4f [FIX] sale: invoices not displayed on SO portal
task-3584770

closes odoo/odoo#141276

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-06 16:55:48 +00:00
Adrien Widart (awt) b7335cb75d [FIX] stock: skip putaway rule if dest loc set by user
To reproduce the issue:
1. In Settings, enable:
   - Storage Locations
   - Storage Categories
2. Create and confirm a receipt with one product
3. Open the detailed operation
4. Add a line
   - To: WH/Stock/Shelf 1
   - Done: 1

Error: Once the user sets the done quantity to 1, the destination
location will be automatically set to WH/Stock

Since the Storage Locations option is enabled, when updating the
done quantity of the SML, it triggers an onchange in charge of
applying the putaway rules. Since the Storage Categories option is
enabled, the putaway process starts from the SM's location (i.e.
WH/Stock). Then, since there isn't any putaway rule, the process
will simply return the initial location (WH/Stock) and we will use
it as new destination location of the SML.

Since the destination location has already been set by the user, we
should avoid overriding it, otherwise he will have to set the
location again.

OPW-3511560
OPW-3549579

closes odoo/odoo#141252

X-original-commit: ce9a1437de0093dd3c66152148d4c973915d00f4
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-11-06 16:55:48 +00:00
Valeriya(vchu) 861290ce40 [FIX] payment_stripe: instantiate stripe object only once
Steps to reproduce:
1. Activate Stripe and at least two payment methods
2. Click on the first pm
3. Click on the second pm
3. Select again the first one and try to pay

The bug was caused by reinstantiation of stripeJS for each payment
method. So that each stripe element was created from different
stripeJS object which raised the following error from Stripe:
"Invalid value for stripe.confirmPayment(): the 'elements' provided was
created by a different Stripe instance. Please use the same Stripe instance
to create the 'elements' and call stripe.confirmPayment()"

After this commit StripeJS object is instantiated only once.

closes odoo/odoo#141247

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-11-06 16:55:47 +00:00
Demesmaeker ca3d390033 [IMP] sale_pdf_quote_builder: add documentation link
closes odoo/odoo#141243

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-11-06 16:55:46 +00:00
Aaron Bohy 5b0870ab01 [IMP] web: tooling: enable tooling in 17.0
closes odoo/odoo#141237

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-11-06 16:55:44 +00:00
aliya 5272c3a051 [FIX] l10n_pe: fix tax amount for purchase 0%
`purchase_tax_exp_0` tax is supposed to have 0 amount, which was changed in saas-16.2 to 18.0. This commit fixes the amount, changing it back to 0.0.

closes odoo/odoo#141192

X-original-commit: 7e4f5b702998e88faf056205d2b7aae319f094be
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-11-06 16:55:43 +00:00
Louis (wil) af5a5f4986 [I18N] *: export source terms
closes odoo/odoo#141127

Related: odoo/enterprise#50247
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-06 16:55:41 +00:00
Rémi Rahir (rar) 8c01a611cd [IMP] spreadsheet: cache PivotCache cells
This revision extends the caching introduced in [1] to cache the
Pivot cells of a `PivotTable` for every combination of `includeTotal`
and  `includeColumnHeaders`. the conditions for the `clickableCell` of
`ODOO.PIVOT.TABLE` cells fetch the pivot cells a LOT, which becomes
problematic for big pivots.

For a spreadsheet with a formulat `ODOO.PIVOT.TABLE` that spreads over
2562 (122*21) cells:

|                                  | Before  | After  |
|----------------------------------|---------|--------|
| `getPivotDomainArgsFromPosition` | 1227 ms | 124 ms |
| load spreadsheet as dashboard    | 7.97 s  | 2.4 s  |
|                                  |         |        |

[1] https://github.com/odoo/odoo/pull/138594

closes odoo/odoo#141116

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-11-06 16:55:40 +00:00
roen-odoo d66dcf820d [FIX] point_of_sale: Show correct tracking method on receipt
Current behavior:
The PoS receipt was always showing SN on receipt even when the tracking
method was set to Lot.

Steps to reproduce:
- Create a product with tracking method set to Lot
- Create a PoS order with that product
- Validate the order
- The receipt is going to show SN XXXX instead of Lot Number XXXXX

opw-3517788

closes odoo/odoo#141007

X-original-commit: fde614b80c90ce62598b6ddd3ddac4d3c6bb4dc7
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-11-06 16:55:39 +00:00
Joseph Caburnay f4e9dd9ec3 [FIX] point_of_sale: discount product as special
closes odoo/odoo#141001

Related: odoo/enterprise#50282
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-11-06 16:55:38 +00:00
Joseph Caburnay f0ac47845d [FIX] pos_restaurant: default floor on restaurant config when no demo
- We remove default floor on when demo data is active.
- We do the automatic creation of floor and table on a restaurant config during
  the write method of the pos.config. It shouldn't be done in the
  res.config.settings at onchange because of risk of retriggering the creation
  multiple times.

Part-of: odoo/odoo#141001
2023-11-06 16:55:38 +00:00
Claire Bretton (clbr) 4cfdf55f16 [FIX] account: Accounting dashboard - burger menu cleanup
1. Remove some options from the burger menu to make it more clear.
2. Make some actions on the journal's dashboard card conditional on
the Bank Feed type.

closes odoo/odoo#140164

Task-id: 3573286
Related: odoo/enterprise#49762
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-11-06 16:55:35 +00:00
qsm-odooandBrieuc-brd b6a747239a [FIX] portal, website_blog: align the navigation
Prior to this commit, the navigation of `website_blog` wasn't correctly
aligned. This commit reworks the alignment to match the page layout.

This was actually a "bug" of our override of BS4/5 to match BS3 behavior
regarding container float-clearing. This fixes that override. It may
be backported in stable versions later if the need arises.

Related to task-3097005

closes odoo/odoo#137692

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
2023-11-06 16:55:33 +00:00
william-andre b6c108e775 [FIX] analytic: insert analytic lines in spreadsheet
How to reproduce:
* Install Accounting and Documents
* Accounting > Configuration > Settings > check Analytic Accounting
* Accounting > Accounting > Analytic Items
* Cogs > Spreadsheet > Insert List

Issue:
The header in the spreadsheet displays errors.

closes odoo/odoo#141230

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-11-06 15:36:59 +00:00
Maximilien (malb) d6bd6d5eec [IMP] hr_expense: attachment expense sheet
The goal of this pr is to remove the name of the file on the expense report.

closes odoo/odoo#141226

Task: 3473105
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-11-06 15:36:58 +00:00
Leonardo Pavan Rocha c0dc12f464 [FIX] hr_homeworking: change default WL and allow deleting default WLs
This commit changes the default worklocation set for the employee from "office"
to false. Also, this commit adds the possibility to delete a default
worklocation from the calendar view.

A typo is also fixed from "exception" to "exceptions" which was causing a bug
returning the worklocations.

task-3584193

closes odoo/odoo#141209

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-11-06 15:36:57 +00:00
jorv 02df60b307 [FIX] survey : use correct page_ids for progression template
Bug

A previous commit b1ec81ed fixed an issue relating to wrong progression
percentages when a survey was set as "one page per question" and
"random selection".
In doing so, it inadvertently added an issue in the following  simplified case:

1. Create a new survey, and add 2 questions
2. Set layout (`question_layout`) to "one page per question" (`page_per_question`)
3. Set selection (`question_selection`) to "all questions" (`all`)
4. Now share the survey with a participant (send out the email)
5. As the participant, start the survey and answer question one
6. In the backend, go and modify the survey template by adding a new
question after question 2. Save modification.
7. Now, in the ongoing survey, answer question 2 and try to move on to
the next question.

This will create an error traceback. Example
'''
'page_number': page_ids.index(survey_data['question'].id)
ValueError: 108 is not in list
'''

The error arises because the added question will have an id that is not
in the `survey.user_input.predefined_question_ids` field. This list gets
initialized when the `survey.user_input` gets created and reflects all
the question ids of the original survey template (or the random ids in
case of a random selection).
So in other terms the set of questions given to a participant, starting
in `survey_survey._get_pages_or_questions` is not aligned with those used
for the references in the progression template

Proposed fix:
We add an extra check for `survey_sudo.questions_selection == 'random'`
to decide if we use `survey.user_input.predefined_question_ids` or
`survey.survey.question_ids` information to calculate the progession.

opw-3516304

closes odoo/odoo#141171

X-original-commit: 643fceff43770483f11e95bd57fae60e611f83d4
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Joel Rodrigues Vitória (jorv) <jorv@odoo.com>
2023-11-06 15:36:55 +00:00
snd 7dd22c9076 [FIX] stock: hide source package column on incoming pickings
closes odoo/odoo#140984

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-06 15:36:52 +00:00
Antoine Vandevenne (anv) 181e2bdbde [FIX] payment_(adyen,authorize,stripe): unique key for inline form values
closes odoo/odoo#140711

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-11-06 15:36:51 +00:00
Valeriya(vchu) b024dd76d4 [FIX] payment_adyen: add 'amount' to adyen checkout configuration
Steps to reproduce:
1. Create a company with currency as Euros.
2. Set up Adyen on that company with the test credentials and enable
paypal.
3. Create an invoice with the currency in Euros.
4. Generate a payment link.
5. Attempt to pay on that payment link with paypal.

After this commit the Adyen checkout configuration is correctly set up
which allows to pay with PayPal

opw-3543970

Part-of: odoo/odoo#140711
2023-11-06 15:36:51 +00:00
Chrysanthe (chgo) 09df480c3e [FIX] hr_attendance: review menu layout
This commit fixes the layout of the hr attendance menu.

Prior to this commit, the layout was a bit cluttered and had a lack of
white space, making it difficult for the user to extract the information
he needed.

To fix these issues, we adapt the design of the menu, mainly by
reorganizing the layout and adding more white space.

With this commit, we were also able to clean the files, reducing the
number of lines needed to achieve a good visual result.

task-3577098

closes odoo/odoo#140454

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-11-06 15:36:50 +00:00
Odoo's Mergebot dbabdf624e [MERGE][IMP] mail: fine-tune new plan feature
We do the following improvement:
- some wording changes
- the activity templates can be edited directly in the list view instead of in
a popup except in hr because sub module add too many field to be edited in
directly in the list view.
- when scheduling a plan, the due date of the created activities are computed
as the plan_date_deadline + activity type delay and if the plan_date_deadline
is not specified, as today + activity type delay.
- there were 2 res_model fields in the mail_activity_plan_view_form that was
causing a selection box to appears on many form where the model shouldn't be
selectable. We remove one of them here.

Add activity plan menus and configuration to sale, project.

Re-add the launch plan button in HR. When generalizing the plan, we have
removed the custom "launch plan" button in the hr module. We re-add it here.

Task-3558929

closes odoo/odoo#138998

Related: odoo/enterprise#49414
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-11-06 15:36:45 +00:00
Pierre-Yves Dufays 846dd759bd [IMP] {test_}mail, crm, hr{_fleet}: improve plan
We do the following improvement:
- some wording changes
- the activity templates can be edited directly in the list view instead of in
a popup except in hr because sub module add too many field to be edited in
directly in the list view.
- when scheduling a plan, the due date of the created activities are computed
as the plan_date_deadline + activity type delay and if the plan_date_deadline
is not specified, as today + activity type delay.
- there were 2 res_model fields in the mail_activity_plan_view_form that was
causing a selection box to appears on many form where the model shouldn't be
selectable. We remove one of them here.

Task-3558929

Part-of: odoo/odoo#138998
2023-11-06 15:36:45 +00:00
Pierre-Yves Dufays 2fe11d4131 [IMP] sale: add activity plan menu
We add the activity plan to allows sale managers to configure it.

Task-3558929

Part-of: odoo/odoo#138998
2023-11-06 15:36:45 +00:00
Pierre-Yves Dufays 472c7ad45f [IMP] hr: re-add the launch plan button
When generalizing the plan, we have removed the custom "launch plan" button in
the hr module. We re-add it here.

Task-3558929

Part-of: odoo/odoo#138998
2023-11-06 15:36:45 +00:00
Pierre-Yves Dufays 9ce9d69788 [IMP] project: allow to create project plan directly from project module
The new plan form view in project module now allows to choose between project
and task as target model.

Task-3558929

Part-of: odoo/odoo#138998
2023-11-06 15:36:45 +00:00
sofiagvaladze 61d24eb270 [FIX] hr_skills: add text in openSkillsReport link for clarity
Prior, there was only icon and it was not clear enough.

closes odoo/odoo#141132

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-11-06 13:58:45 +00:00
Jorge Pinna Puissant 85a1148a71 [IMP] web: remove autoresize function from dom.js
closes odoo/odoo#141125

Part-of-task: 3439226
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-06 13:58:44 +00:00
Benoit Socias acfca25e48 [FIX] web_editor: ignore device visibility upon snippet drop
Since [1] when device visibility became a visibility option, when
dropping a snippet that contains device-invisible blocks, all those
blocks were made visible.

This commit makes that behavior limited to blocks that are not
device-invisible. (E.g. when dropping a popup)

Steps to reproduce:
- drop a Columns snippet
- hide a column on mobile
- hide a column on desktop
- save snippet
- drop saved snippet in either desktop or mobile preview

=> All columns were shown with the `o_snippet_override_invisible` effect
on the conditional ones.

[1]: https://github.com/odoo/odoo/commit/3103e0553011b5c1f4078972d7a88fa3fd4068b2

task-3538535

closes odoo/odoo#140505

Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
2023-11-06 13:58:39 +00:00
Pierre Pulinckx (pipu) ebe64aafac [IMP] web: make model reload silent
When a request to the server takes more than 3 seconds, the blockUI
then prevents the user from taking another action. For example, when
you want to apply several filters quickly, the blockUI appears and,
in the end, you may want to apply yet another filter.
In this commit, we remove the blockUI because we believe that blocking
the user makes little sense. This only makes sense when installing
a new application.

task-3279095

closes odoo/odoo#140042

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-11-06 13:58:38 +00:00
yhu-odoo 461d311b73 [IMP] mrp: add pre-production rules' delays in _get_lead_days
If there are pre-production rules, their delays should also be added to
the total delay of a manufacture route.

Task-3081481

closes odoo/odoo#137810

Related: odoo/enterprise#48516
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-11-06 13:58:37 +00:00
yhu-odoo 78e44dc5a3 [IMP] mrp{,_subcontracting_purchase}, {purchase_,}stock: add DTPMO to lead days
For subcontracting, we need to consider both vendor lead time and
manufacturing lead time, and DTPMO (Days To Prepare MO) on the BOM.
Subcontracting delay =
    max(Vendor lead time, Manufacturing lead time + DTPMO) + Days to Purchase + Purchase security lead time

Same thing applied to Bom overview, except:
1. Availability state will be computed based on the delay time of it's
   components. DTPMO on the bom won't be take into account.
2. Lead time will use the DTPMO on the BOM. DTPMO will be added to
   the lead time when it's a manufacturing bom or when it's a
   subcontracting bom with Manufacturing Lead Time + DTPMO > Vendor Lead Time

Task-3081481

Part-of: odoo/odoo#137810
2023-11-06 13:58:36 +00:00
Romain Estievenart 6c749a4b0d [FIX] website: UrlAutocomplete is displayed behind the modal
Since this fix[1] of the overlapping. The `UrlAutocomplete` wasn't
working as expected, The `AutoCompleteWithPage` dropdown is displayed
behind the dialog when it was inside a dialog.

Steps to reproduce:

* Open the `Website` app
* Click on `Site` > `Edit Menu` > `Add Menu Item`
* Start to type in the url field, the dropdown is displayed behind the
  dialog. => bug

Link

[1]: https://github.com/odoo/odoo/commit/9682cfa174fb39ec9d9874951ea9ee2884058d96

closes odoo/odoo#141159

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-11-06 12:32:07 +00:00
tsm-odoo f10c9114e6 [FIX] mail: fix scroll flicker on thread start
The `onWillStart` hook that was used in the thread component but was
replaced  by the `onMounted` hook. Indeed, fetching the messages in
the `onWillStart` hook was leading to an infinite loop (props updated
as a side-effect of the `onWillStart` hook).

After messages are loaded, the scroll position of the thread is
restored. Since this is done after the component is mounted, another
render is triggered and results in a flicker when opening the thread.

This commit fixes this issue by waiting for the thread to be mounted
and for the scroll position to be restored before showing the message
list.

closes odoo/odoo#141145

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 12:32:06 +00:00
Mayurrajsinh Rathod 99d19caec1 [FIX] website_slides: correct auto_delete on mail
Steps to reproduce
==================
1. Open course with enroll policy onInvitation or
   Click on three dot of any course in kanban view
2. Click on Invite > add a recipient
3. Go to mail template internal link 
4. Go to setting tab
5. Disable the 'Auto delete' > save & close it 
6. Click on Send
7. Go the Technical/Emails (in debug mode)
8. Send the mail by clicking 'Send now'
Issue - Even if we unchecked auto delete still the mail is deleted automatically

Technical
=========
In the '_prepare_mail_values' method of the 'slide.channel.invite' model, the
mail values for 'mail.mail' are prepared and the auto delete is set to True.

After this commit
=================
You can view the sent mails since the auto_delete is configured based on
the template value for invitation.

Task-3546212

closes odoo/odoo#141141

X-original-commit: 3d9640d5c24f345d67e4e74e62584e60cc27815b
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-11-06 12:32:05 +00:00
Antoine Guenet 8e0f1e08ac [IMP] web_editor: reduce the timeout for chatgpt calls
The timeout for calls to the OLG API in the editor was set to 300
seconds, which is far too long for a chatbot. This reduces it to 30s.

closes odoo/odoo#141135

Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
2023-11-06 12:32:04 +00:00
Xavier ALT 9976d707f0 [FIX] base_import_module: fix crash for imported module icon
With normal module, the icon is always loaded from the filesystem but
when importing a module that contains a module icon (by default in
static/description/icon.png) it crash with a `FileNotFound` exceptions
because the image is not available on the filesystem but as an
ir.attachment.

This ensure that for imported module we load the icon from the
corresponding imported attachment

closes odoo/odoo#141133

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-11-06 12:32:03 +00:00
Pieter Claeys (clpi) 61db286a91 [FIX] mrp: MO reservation state bug for serial final product
To reproduce:
- Set tracking mode on Table Leg to no tracking and add 100 to inventory
- Create MO for table with quantity more than one and confirm
- Click the "+" button to generate a serial

Current behavior: The reservation state of the MO goes to "available" in
orange, indicating its components are not all assigned.

Expected behavior: The reservation state of the MO stays "available" in
green, indicating the MO has all of its components assigned and is ready
to produce.

closes odoo/odoo#141130

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-11-06 12:32:02 +00:00
Benjamin Vray 988a215339 [FIX] web_editor: fix anchor link selector broken
Steps to reproduce the bug:

- In website edit mode, drag and drop an 'Image-Text' snippet onto the
page.
- Click on the button in the second column of the snippet.
- Type "/" in the URL input of the link options in the customize panel.
- Open the 'Page Anchor' selector and select the '#top' anchor.
- Bug: The anchor is not added to the link in the URL input.

The bug was introduced by this commit [1]. Indeed, the events in the
'Start' of LinkTools were no longer attached to the main element but
directly to the event target. This means that in this particular case
where the 'we-button' elements are created after the 'Start', the click
event had no effect because no event was properly attached to it.

This commit also includes test steps to prevent this bug from
reoccurring in the future.

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

task-3580414

closes odoo/odoo#141034

X-original-commit: 72eb761545c51c9dc7c6490c0ce0e38650dfa985
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-11-06 12:32:01 +00:00
tsm-odoo bad8d093f5 [FIX] mail: incorrect message order on previous messages load
Discuss models use relationnal fields. Since [1], the implementation
of the `unshift` method changed for `many` fields. The new
implementation is incorrect: unshifting several records results in an
insertion on the inverse order which differs from the native
implementation.

This issue broke the loading of older messages in discuss: older
messages are inserted with the `unshift` method thus in the inverse
order.

[1]: https://github.com/odoo/odoo/pull/136539

closes odoo/odoo#140747

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 12:32:00 +00:00
Chrysanthe (chgo) dfbe78e9e0 [FIX] website_forum: fix avatar renderer
This commit allows avatar that would not be squared to be rendered with
a correct aspect ratio inside Forum.

Before these changes, if the user avatar was not uploaded in a squared
size, it would be stretched while being rendered inside the forum UI.

To solve this issue, we simply add the `o_object_fit_cover` class to
these avatars, ensuring they are well rendered.

We also changed the resolution to 128x128, to provide a better render.

task-3580131

closes odoo/odoo#140660

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-11-06 12:31:58 +00:00
mano-odoo b38d3b837b [FIX] web, mail: searchbar facet cog overlapping
When discuss is not installed, hovering a facet in the searchbar makes
the cog overlap the icon/text.

This is due to the `o-bg-inherit` class which is set in the mail module.
Therefore if discuss is not installed, the SCSS for the background
doesn't exist.

This commit moves the `o-bg-inherit` as a new utility class `bg-inherit`
, allowing it to be used even if no apps are installed.

Therefore also renaming the occurences of `o-bg-inherit` into
`bg-inherit`.

task-3575837

closes odoo/odoo#140334

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-11-06 12:31:58 +00:00
Romain Derie d64b4adf1e [IMP] website: allow fallback images when industry image not set
When creating a new website through the configurator, the images that
will be used on the website will be the one specified by the selected
industry.

We recently introduced 2 new images with commit [1] for which the
industries have no images set as we did not have time to do it.
It would require going through the ~4000 industries and finding a
relevant image on Unsplash for it.

This commit is simply using another existing set image instead.

Indeed, if an industry hasn't set an image, the theme one will be used
instead, which is less ideal.

Step to reproduce:
- Create a new website
- Select "Garden furniture store"
- Select the Orchid theme (the one in the middle to this day)
- Drag & drop the Banner snippet, 2 out of the 3 images used in this
  snippet will use the theme images (images about flowers) instead of
  images of furniture (related to the selected industry)

[1]: https://github.com/odoo/odoo/commit/3cbdf754ff8fac8a77887c4307b658cb86b0be1d

closes odoo/odoo#141117

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-11-06 11:16:48 +00:00
Benjamin Vray f504bb7bc3 [FIX] web_editor: fix custom snippets thumbnail
This commit fixes 3 issues with the custom snippets thumbnail:

- The tooltip ("Drag and drop the building block") appears during
edition of the name of the custom snippet, it should not.

- There was no space between the "Confirm" and "Cancel" buttons when
editing the name of the custom snippet.

- Starting from version 16.2 (although already fixed in the 16.0
commit), the "Cancel" button was positioned below the "Confirm" button
instead of being on the same line. This was due to JQuery 3.6.3, which
no longer correctly supported self-closing elements like "<we-button>"
for this particular issue.

task-3572270

closes odoo/odoo#140998

X-original-commit: 9f682306a9d4c1fc9bcd55a41d411ccc190573ad
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-11-06 11:16:45 +00:00
Pierre Masereel 407f1b1d7e [FIX] base_import_module: split get_dependencies function
Since we need to get the list of dependencies for the saas (and not noly
a Text of the module names, we split the function to be able to easily
get the list of dependencies.

closes odoo/odoo#140994

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-11-06 11:16:44 +00:00
ravb-odoo 29caafdf93 [FIX] project: fix allocate hour of sub-tasks issue
Description of the issue/feature this PR addresses:
in project task form, allocated time of parent task. The 'incl. x on sub-tasks'
field is taking allocated time of all the child task as well as sub-tasks of its
child task. Field should only take into account time allocated to the first
level of sub-tasks.

Current behavior before PR:
field shows allocated hours of child task as well as sub-task of child-tasks.

Desired behavior after PR is merged:
field shows allocated hours of only child-tasks.

Fix:
removed child_task.subtask_planned_hour from the compute method of
subtask_planned_hour fields so that its only add the hours of its child-tasks
and not its sub-task of child-tasks.

task-3277977

closes odoo/odoo#140989

X-original-commit: f42cfb351a86f8ec551066d71271b97a56ce92b4
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-06 11:16:44 +00:00
Brieuc-brd 4ec329d26f [FIX] point_of_sales: combo configurator UI review
This commit reviews the UI of articles in `ComboConfiguratorPopup` to
maintain consistency with the rest of the layout.

task-3582072

closes odoo/odoo#140942

Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-11-06 11:16:43 +00:00
Louis (loco) f13a8afdbc [FIX] website: re-render the visibility selector on field label change
Steps to reproduce the bug:
- Add a form on the website.
- Add two fields on the form ("A" and "B").
- Change the conditional visibility of "B" and put it to "Visible only
if".
- Change the label of "B" and set it to "A".
- Try to change the dependent field.

-> "A" is still on the list of the eligible dependent fields. It should
not be the case as setting this field as a dependent field would create
a circular dependency.

To solve the problem, the file visibility selector is rerendered after
modifying a field label. Because of the `_findCircular()` check at the
rerendering, the problematic field will not be displayed in the list of
of the eligible dependent fields.

task-3291044

closes odoo/odoo#140928

X-original-commit: 788218dff61e65f2213c31ebc660183ef3e73087
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
2023-11-06 11:16:42 +00:00
Louis (loco) 92e3cf48b2 [FIX] website: prevent circular dependency of renamed fields
Steps to reproduce the bug:
- Drop a "Form" snippet on the website.
- Change the "Label" of the first field (and put it to "test" for
example).
- Select the last field and change its visibility so that it depends on
the first field.
- Change the "Label" of the selected field and put it to the same than
the first one ("test").
- Save.

-> Traceback "Maximum call stack exceeded" appears.

At the end of the procedure, the last field visibility depends on itself
and a circular visibility dependency is created. To solve the problem,
this commit checks that the renamed field does not bring a circular
dependency while updating the dependencies. If it is the case, the
problematic dependency is deleted.
To resolve this bug, the `visitedFields` set has been introduced. Its
goal is to register the already visited fields to not enter an infinite
check loop. Let's take an example to illustrate this: Imagine there is a
form of type A->B->C->D. In this form, the field "A" depends on "B" that
depends on "C" that depends on "D". Imagine you rename "D" by "B". You
now have A->B->C->B. The system will check that the renamed field does
not create a circular dependency. To do so, it will apply
`_recursiveFindCircular` with "A" as the `targetFieldEl` and "B" as the
`dependentFieldEl`. Because there is a circular dependency between "C"
and "B", the system would enter in an infinite loop. Note that we do not
notify the system if such indirect circular dependency has been found as
it will be detected as a direct circular dependency  while the system
will apply `_recursiveFindCircular` with `C` as the `targetFieldEl`.

task-3291044

X-original-commit: 5f0b62fc30867e03e69a824d5e426bf3f74c8ff5
Part-of: odoo/odoo#140928
2023-11-06 11:16:42 +00:00
Louis (loco) 34e4049b80 [FIX] website: prevent circular dependency of duplicated fields
Steps to reproduce the bug:
- Drop a "Form" snippet on the website.
- Add three fields and rename them by "a", "b" and "b".
- Change the conditional visibility of the first "b" and make it depend
on "a".
- Change the conditional visibility of "a" and make it depend on "b".
- Save.

-> Traceback "Maximum call stack exceeded" appears.

A field with a conditional visibility is visible if at at least one
field with the dependency name is visible. The problem is that in our
case, it exists a circular dependency between "a" and one of the "b"
leading to an infinite loop during this check. Before this commit all
the fields of the form were checked and all the labels of the fields
that do not create a circular dependency were proposed in the file
visibility selector. The problem is that in our case, one of the "b"
field does not create a circular dependency while the other does. To
solve the problem, the `_recursiveFindCircular()` function has been
adapted in order to not propose a label that would create a circular
dependency in the file visibility selector.

task-3291044

X-original-commit: f010b128be29e884c89dd58f1c575a163e229d5b
Part-of: odoo/odoo#140928
2023-11-06 11:16:42 +00:00