Commit Graph
163895 Commits
Author SHA1 Message Date
abd-msyukyu-odoo 5feda35e6f [IMP] web_editor: put rollback code assignation on its own line
If the `_toRollback` property of the editor is assigned on its own line, it is
easier to identify which assignation caused/prevented a rollback when
debugging.

closes odoo/odoo#130894

X-original-commit: 263dcbaf9aa0c48bd61bf85b091c746d7850cfe1
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-04 16:35:12 +02:00
Joseph Caburnay 7100f014cf [FIX] account: PdfReadError import error
As introduced here:
https://github.com/odoo/odoo/pull/112611/commits/dce4ec8380aad1a1d1b40c33a50ab5914838ba18,
PdfReadError should be imported conditionally as it is now possible to have dev
environments with different versions of PyPDF2.

We are employing the same strategy done in the mentioned commit to avoid import
error when the environment has python > 3.10 and PyPDF2 v2.12.1

closes odoo/odoo#130892

X-original-commit: 0163edfb16c849eac61fb33b400faedda33f667f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-04 16:35:08 +02:00
oco-odoo 78a8e0a98e [FIX] l10n_fr_fec: alleviate memory error when exporting too many move lines
We now split the export of the FEC files per batch of move lines. This was necessary, as the fetchall() ran on the cursor to get the results could return a huge amount of data on big databases, saturating the RAM.

This fix is not exhaustive, and memory consumption could be lowered by removing the need to convert the whole file to base 64 and write it in attachment. Those changes are not doable in stable ; further improvements will come to master.

OPW 3442579

closes odoo/odoo#130884

X-original-commit: 86a221fa3773b5b23ae8f1ad653c1aaac607482e
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-08-04 16:35:05 +02:00
Martin Trigaux 7f4da03e36 [IMP] mail: allow posting HTML message via RPC
Since 69f911d994 it was no longer possible to post an HTML
message via a script. Allow to do it but log a warning to discourage
doing so. Markup object should still be the propoer way to do it.

closes odoo/odoo#130883

X-original-commit: a890db49935813d0794765492c057404592e5977
Related: odoo/documentation#5273
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-04 16:34:58 +02:00
Aaron Bohy 435834915e [REF] web, website: move initAutoMoreMenu to website
There's a single usecase left for this helper, which is in website.
This commit directly moves the function definition in the file
using it.

Part of task~3439226

closes odoo/odoo#130843

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-04 16:34:51 +02:00
Aaron Bohy 8c510e9223 [REF] web,website_slides: remove legacy BrowserDetection
This module was no longer used.

Part of task~3439226

Part-of: odoo/odoo#130843
2023-08-04 16:34:50 +02:00
Aaron Bohy 6774530101 [REF] web,*: remove KeyboardNavigationMixin from website
This mixin was still applied on the RootWidget but was useless
since the website relies on the hotkey service [1].

This commit ends the life of the frontend_legacy asset.

[1] https://github.com/odoo/odoo/commit/daf5963845a8dda4d669e512a4ef6dcfebdd8813#diff-fe005825c9360edbc616517111aa67926161221c42003cad29f88a0214cd909eR13

Part of task~3439226

Part-of: odoo/odoo#130843
2023-08-04 16:34:50 +02:00
Aaron Bohy 20eb303cfd [REF] web: remove unused template
The Widget using it has already been removed, but it looks like we
forgot to remove its template.

Part of task~3439226

Part-of: odoo/odoo#130843
2023-08-04 16:34:50 +02:00
Jorge Pinna Puissant 8a89676f2c [FIX] web: renderToElement should always returns an element
Before this commit, when the first element of a template is a non
fulfilled condition :
'<t t-if="false"/>'
The function renderToElement returns an empty text. This occurs because
it returns the first child, which in this case is an empty text.

Now, the function returns the first element.

closes odoo/odoo#130858

X-original-commit: 8dabc4e1d5ebd94f6a315ce56b9bf60240dd7fdd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-04 15:02:42 +02:00
Renaud Thiry e7635bc705 [FIX] mass_mailing: toggle fullscreen once
In 16.0 and up, when toggling full-screen mode on the mailing editor
the iframe content is not properly made scrollable.

This is due to the toggle method being triggered 4 times
which effectively cancels the effect.

The reason for it being triggered 4 times is that the check that would
prevent multiple event listeners from being set on the button compares
an existing jquery object to a new one on the same element.
As these are two different references to the same element
they are still different objects and thus the listener will be added
even if they reference the same iframe.

The fix is simply to compare the html elements directly, if they exist.
We also add the expected state of 'full screen' to the class toggle
as it may avoid other inconsistencies from blindly toggling.

task-3446768

closes odoo/odoo#130853

X-original-commit: 30f27563868af4b247c96c24135c1003aa191cef
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-08-04 15:02:38 +02:00
Alexandre Kühn e46ce4ef00 [FIX] mail: close popover on marking activity as done
Since [1], marking the activity as done from the activity popover
was not automatically closing it.

Steps to reproduce:
- Open Contact kanban view
- Schedule an activity on a contact
- Click on activity widget on kanban card
- Edit activity and mark it as done
=> The activity popover was not automatically closed

Also fixes a bug where marking activity as done in activity view
was crashing.

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

closes odoo/odoo#130828

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-04 15:02:30 +02:00
Pierre Paridans 3fd016a443 [IMP] web,survey,website_slides: remove unused jQuery Form plugin
None of the main methods provided by this plugin were stil used; only
the internal method `enable()`.

This commit replaces these calls by toggling the `disabled` HTML
attribute.

closes odoo/odoo#130817

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-04 15:02:27 +02:00
Didier (did) 1113272d56 [FIX] mail: discuss search results should match input
Before this PR, RPC made by input inside the discuss sidebar could
resolve in the wrong order, witch display outdated results.
This PR ensure that only the most recent RPC is sent to the server,
cancelling irrelevant RPC.

Note: This PR also remove the support for Promise inside the
NavigableList component since it's not compatible with useSequential.

closes odoo/odoo#130767

X-original-commit: ba2d029d876f9acd7c869cc3d345cc4ed7cab00a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-04 15:02:23 +02:00
Stanislas Sobieski 436503e1f4 [IMP] core: readable representation of the cache
When the cache is filled with binary field, it can fill the logs with
unreadable and (probably) non compressible data

closes odoo/odoo#130741

X-original-commit: 6afba8fafe79dcf9bc28710a7edbd33b6a5b459f
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-04 13:42:07 +02:00
rolandojduartem 103583192b [FIX] website_sale: Fix access to partner from website sale
When the user is not signed up, in the address tab of the cart, an error
appears because this user does not have the access to the model
l10n_latam.identification.type with 403 Forbidden. The model is accessed
by [1] [2], therefore sudo is required to access the information of the
partner.

References:

- [1] https://github.com/odoo/odoo/blob/600bd9c8/addons/website_sale/controllers/main.py#L1043
- [2] https://github.com/odoo/odoo/blob/600bd9c8/addons/l10n_latam_base/models/res_partner.py#L21

closes odoo/odoo#130455

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-04 13:42:03 +02:00
Pierre Paridans d6edddb216 [IMP] web,point_of_sale,website_slides: remove legacy daterangepicker
Note: the "event_tour" stil has step targetting the .daterangepicker
selector... but as this tour is broken since (at least) 14.0, its fix
will be tackled in another PR.

closes odoo/odoo#129993

Related: odoo/enterprise#44742
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-04 13:42:00 +02:00
pedrambiria c97cc9498e [FIX] point_of_sale: ensure accurate price display with tax exclusion
Before this commit, when a product's tax was included in its price and
the Point of Sale setting was set to "Tax-Excluded Price",
the following issues were encountered:

 1. The product screen displayed the orderline's price tax included.
 2. If the pricelist's discount policy was set to without_discount,
    and a discount was applied to a line, the old/new price would
    not be displayed.
 3. The receipt showed the discount based on the price inclusive of
    tax, rather than the tax-excluded price.

Additionally, when the product's tax wasn't included in its price and
the Point of Sale setting was set to "Tax-Included Price", the
discount displayed on the receipt was incorrect.

This commit resolves these issues, ensuring the correct tax-exclusive
and tax-inclusive prices are displayed in all scenarios, providing
accurate discount calculations on the receipt.

opw-3324090

closes odoo/odoo#130820

X-original-commit: f2569a6583ac799b1b01c023cb8ccb65d294f867
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-04 12:22:02 +02:00
Aaron Bohy 8a787f1866 [REF] web,web_editor: move SmoothScrollOnDrag to editor
This commit moves the smooth scroll on drag helper from web to
web_editor, which allows us to move it from frontend and common
assets to web_editor.assets_legacy_wysiwyg which is only loaded
in the website editor, the only place where it is used.

Note that it uses legacy Class and mixins, so it still needs to be
converted to the modern codebase, alongside editor snippets.

Part of task~3439226

closes odoo/odoo#130813

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-04 12:21:58 +02:00
Pedram (PEBR) 1dda5b84d1 [FIX] pos_loyalty: update rewards even if disallowLineQuantityChange
Before this commit, if you update the quantity of a line that it's
`disallowLineQuantityChange` it will call `_showDecreaseQuantityPopup`
to update the quantity and it will call the `set_quantity` to modify
the quantity. Calling 'set_quantity' won't call the `_updateRewards`
and it causes us to not update the rewards.

Steps to reproduce:
- In a French company, install the module "France - VAT Anti-Fraud
Certification for Point of Sale"
- Create a Loyalty program that gives you 1 point for each euro spent.
- Add items to the cart, and the points sum up.
- Remove items from the cart, the points don't subtract.
+ If points reward is added to the cart and then removed, the points
are still considered as used.

The solution is to override the `_showDecreaseQuantityPopup` function
in the pos_loyalty to call the `_updateRewards`.

opw-3430349

closes odoo/odoo#130794

X-original-commit: 1bbeaefe0f750fceba19cc9199cd7a0681fd1f7a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-04 10:59:26 +02:00
Thibault Delavallée e61e600bfd [FIX] mail: fix missing trigger on 'mail.tracking.value' field_groups
'field_groups' computation is missing their triggers. As field is not stored
it is not that annoying, but better be explicit.

Task-3345979 (Mail: Simplify tracking model)

closes odoo/odoo#130791

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-04 10:59:23 +02:00
Mahamadasif Ansari 30992d8148 [FIX] l10n_it_edi: filter invoice lines whose display type is product
Currently, an exception is generated when the user selects multiple taxes
in the invoice line and runs cron "EDI : Perform web services operations"

This error is generated in V16 because the validation check failed due to old
code [1] (filtering invoice line ids that don't have a display type). Before
V16, the display_type's default value was False (see code [2]), but after the
change [1], its value was always set(also check upgrade [1]), so our filter
was not working here.

This commit fixes the above issue by filtering the invoice lines
whose display type is product.

code [1]- https://github.com/odoo/odoo/blob/c5928c900ee396ad0456ac77615facdfd73d5e78/addons/l10n_it_edi/models/account_edi_format.py#L150
code [2] - https://github.com/odoo/odoo/blob/d4614015d22e74ba4a54e6753ab567604f856fb3/addons/account/models/account_move.py#L3814-L3817
change [1]- https://github.com/odoo/odoo/commit/d8d47f9ff8554f4b39487fd2f13c153c7d6f958d#diff-78f3e1847de8ca0acf28d72a412947a549acdb08142d1dadf7646363d7972cb0R268-R280
upgdare [1]- https://github.com/odoo/upgrade/pull/3715/files#diff-d922f992286b3bd9a80f6c9e1248508a8fb23f06a47e2dba1e176b3e74846160R12

sentry-4320557982

closes odoo/odoo#130780

X-original-commit: 88ed12bb7a4a758149633feaae04b487a0d05f30
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-08-04 10:59:19 +02:00
Pierre Paridans 690e184dd2 [IMP] web,website_slides: removes placeholder attribute polyfill
Mainly used for Internet Explorer support (cf. placeholder attribute is
supported since IE 10).

We are in 2023...

closes odoo/odoo#130692

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-04 10:59:16 +02:00
stefanorigano (SRI) c9dc3409dc [IMP] web: o_searchview_facet interaction design
This commit enhances the o_searchview_facet design with hover
interactions, focusing on providing a clearer visual representation when
facets are selected:

- Implemented an overlay to indicate when a facet is selected, similar
  to https://github.com/odoo/odoo/pull/129991.
- Replaced the facet's icon with a cog icon, serving as a visual cue
  that the domain is now editable, improving user understanding.
- Overall appearance improvements, resulting in a more polished and
  user-friendly design.

task-3444675

closes odoo/odoo#130017

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-08-04 10:59:09 +02:00
Kamlesh Pathekar 3298c0ddba [IMP] project, sale_(project, timesheet): display helper
In this commit, we show a helper message in case there
are no records to show under those section (milestone, profitability,
sales section) in project right side panel.

task-3293012

closes odoo/odoo#128220

Related: odoo/enterprise#43972
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-04 10:59:01 +02:00
niyasraphy b62f5081aa [IMP] website_forum: show popover info only for public profile
before this commit, even it the user profile is not public,
or if the user karma is less than karma_profile_min set
in the website, on hovering the move on the user image
in the post, the user details is shown in the pop over

after this commit, the pop over information is shown only
if the user's profile is public profile and user karma is
greater than karma_profile_min in website

closes odoo/odoo#126628

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-04 10:58:55 +02:00
Antoine Boonen 0b18fa884b [FIX] l10n_in: Fix python compute taxes.
Problem
---------
During the conversion from XML to CSV, some python taxes were broken.

Objective
---------
The task consist in checking all python taxes and ensures it's working.

Solution
---------
Problem appears to be that the migration script from XML to CSV, removed
the '\n' in the python compute code, making things like
`result=base_amount * 0.21tax=quantity * 4.17` appear.

The solution consists in separating the operations using semi-colons and
a ternary operator to execute the if statement. The goal was to keep the
operations in a single line to avoid added escape caracters.

task-3319164

closes odoo/odoo#130792

X-original-commit: 2beea5f14a3886c5da9e81ccb8797141e7d7a186
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
2023-08-04 09:43:37 +02:00
Gauthier Wala (gawa) e8d9a21b5c [FIX] analytic: filter analytic distribution boolean inverted
- Create Journal Entries with analytic distribution
- Go in Journal Items list view
- Filter with 'Analyic is set'
=> The wrong entries are filtered

The problem is that the replacement of the domain for the search
has changed with a factoring of the function, which causes the
search replacement to occur with booleans, which is not needed.

closes odoo/odoo#130760

X-original-commit: 5d2accdf56ccd86c8797743f151ad80b614f0f77
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-08-04 09:43:20 +02:00
dhba-odoo a1f8de1454 [FIX] web_editor: avoid traceback when copying a list from a table
Before this commit:

When a user attempted to copy a list from a table, it would result in a
traceback.

After this commit:

Now, when a user copies a list from inside a table, the traceback error
will no longer occur.

Task-3384289

closes odoo/odoo#130759

X-original-commit: 53f5b98b350f6d7db80d2d1921c91c28ed7c3148
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-04 09:43:16 +02:00
Aaron Bohy 850427e4ba [REF] web,mail: remove legacy MockServer and related utils
This commit removes the legacy implementation of the MockServer
and test utils making it available in the test environment (e.g.
addMockEnvironment).

Part of task~3439226

closes odoo/odoo#130671

Related: odoo/enterprise#45141
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-08-04 09:43:08 +02:00
FrancoisGe 41750141c2 [FIX] web: drag and drop kanban flicker
Before this commit, in a kanban view, if you resequence records or
groups by dragging and dropping, there is a flicker.

How to reproduce:
- Go to a kanban view
- Drag and drop a kanban card

Before this commit:
    The moved kanban card returns to its previous position during a render.

After this commit:
    The kanban card keeps its new position.

closes odoo/odoo#130561

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-04 09:42:58 +02:00
Hugo Carlier (Huca) 825df5c5f5 [IMP] project: generate a portal user when sharing a project
Currently, when the creation of an user access is set to `invitation
only` in the website settings, a project shared to a partner with no
user account will not be accessible to that partner. The link sent to
this partner will instead redirect him to the homepage of the website.

This commit address this situation by allowing the partner that receive
the link to create a portal access. The user that share the project is
warned that partners will be able to create user accounts and offered
the option to proceed or not.

task-3356419

closes odoo/odoo#129790

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-04 09:42:55 +02:00
dane@odoo.com 29a1b46afb [IMP] website_event: filters on multi website
When having a multiple website filters appear on both website.
event_tag_category determines what the filter should be. The problem is if I assign one event_tag_category
one website it also appears as filter on other website.
task-3254058

closes odoo/odoo#118136

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-04 09:42:51 +02:00
Odoo's Mergebot 0a8d046290 [FW][FIX] mail: notify alias owner when fetching
[1] introduces an issue when a response is sent to an aliased email.

In that case, it is intended that the message should be created by the owner of the alias by [2]
Which breaks the assumption of made in the first commit, as the message is being passively processed by fetchmail.

This causes the owner of the alias to never be notified on reponses in cases where the message could be an alias update. i.e. on any model where the alias applies.
Because the responses are assumed to have been authored by the owner.

To avoid this issue while keeping the behaviors intact we check that we did not come from fetchmail.
If that is the case we consider the author is the stated author for notification purposes.

[1]: c676ed3ea906e99d27a6116cd77218c5ec95b416
[2]: af80c68ae5

task-3383275

closes odoo/odoo#130798

Forward-port-of: odoo/odoo#126189
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
2023-08-04 08:26:03 +02:00
Renaud Thiry 4dd17a201b [FIX] mail: notify alias owner when fetching
[1] introduces an issue when a response is sent to an aliased email.

In that case, it is intended that the message should be created
by the owner of the alias by [2]
Which breaks the assumption of made in the first commit, as the message
is being passively processed by fetchmail.

This causes the owner of the alias to never be notified on reponses
in cases where the message could be an alias update.
i.e. on any model where the alias applies.
Because the responses are assumed to have been authored by the owner.

As we do not actually care who creates the message records
and deciding the alias owner 'created the message' does not
actually make sense.
We make sure messages are created by odoobot even
if the message was sent to an alias address.

[1]: c676ed3ea906e99d27a6116cd77218c5ec95b416
[2]: af80c68ae5

task-3383275

X-original-commit: 96fe37d37c94c3d6f4642bd6c28d13fcd87075b7
Part-of: odoo/odoo#130798
2023-08-04 08:26:01 +02:00
Renaud Thiry 9da5f6e0f6 [FIX] mail: no default alias owner
Before this change aliases were assigned to the user creating them

The purpose was originally to reduce the number of records created by
odoobot however this leads to unexpected
behavior for the users who just wanted to create an alias without fuss

We make remove the default user such that any automated record
modification/creation will be applied by root instead of some
arbitrary user.

task-3383275

X-original-commit: 3edf18168b92545fc29e078a155494f2781adff6
Part-of: odoo/odoo#130798
2023-08-04 08:26:01 +02:00
Abdelouahab (abla) 58a7f6cc61 [FIX] stock: don't require lot_id on reporting/location
To Reproduce
=============
- enable multi step routes
- edit Receipts operation and uncheck the two options under Traceability
- create storable product with Traceability using lot/serial number
- make purchase of this product and receive it in your inventory
- under inventory/reports/Locations click on line of this product
you will be stuck at that page even if you click discard

Problem
=======
There is an inconsistency between the view and backend, as we allow
receiving traceable product without setting `lot_id`, but in view
require `lot_id` if tracking is enabled on product.

Solution
========
following this [comment](https://github.com/odoo/odoo/blob/16.0/addons/stock/models/stock_move_line.py#L558-L560), `lot_id` shouldn't be required on view.

opw-3422259

closes odoo/odoo#130793

X-original-commit: 768b1755909fa10c39a51c68675b7aa99c91b462
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-08-04 08:25:57 +02:00
Thomas Lefebvre (thle) ef47fd0d7d [FIX] hr_holidays: calculate the number of days left for the report
Steps to reproduce:
-------------------
- create a time off type;
- create two 5 days allocations for an employee;
- validate them;
- create a leave of 8 days for the same employee;
- be in debug mode;
- go to employee form view;
- in action menu, click on "Time off Analysis by Employee and Time Off Type".

Issue:
------
The number of days remaining ("left") for the employee and leave type is -6 instead of 2.

Cause:
------
The query that generates the report is in two parts

```
Find the number of remaining leaves by subtracting leave taken from allocations
(model: hr_leave_allocation and hr_leave) ==> will generate the "left" column

UNION ALL

Find the number of leaves already taken
(model: hr_leave) ==> will generate the "taken" and "planned" columns
```

In the part that generates the "left" column, we relate leaves to allocations.
As there is no "unique" link between allocations and leaves,
we can only link them via employee and type.

We are therefore obliged to use aggregation methods.

The measure that returns negative numbers is:
```sql
CASE
    WHEN request.number_of_days > 0 THEN allocation.number_of_days - request.number_of_days
    ELSE allocation.number_of_days
END as number_of_days
```

It should be read as follows:
If there are validated or planned leaves, the number of days remaining
for an allocation is the number of days of this allocation minus
the SUM of the days of leaves (validated or planned) for this allocations
(same employee and type).

For example:
2 allocations of 5 days and a leave of 8 days,
we will have (5 - 8) + (5 - 8) = (-3) + (-3) = -6 days remaining ==> this is wrong
In this example, we want: (5 + 5) - 8 = 2 days remaining

Solution:
---------
As it is not possible to link a leave to a specific allocation,
we have to make difference between sums like this:

days left = [SUM(days of allocations) - SUM(days of leaves)]_(for one employee AND one type)

The frontend will sum these days left.
This difference must therefore be calculated only once.
By default, we use allocation with the smallest id.

The result is:
days left frontend = [day left_(for min id) + 0 * (nbr allocation - 1)]_(for one employee AND one type)

opw-3366530

closes odoo/odoo#130781

X-original-commit: a273148cf931f220cc4252c638ae14890f889c9e
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-08-04 06:56:33 +02:00
Julien Alardot (jual) 1453b42fa4 [FIX] l10n_ca: fix document layout override
During the refactor of the module the override
of base.document.layout was removed by mistake,
This is needed to add the PST number to the template

related commit: fd2c6dce8e5bee5ac526e7f3edeb398a992f84b1

runbot build errors: 23816, 23817, 23800, 23801,
23802, 23803, 23804, 23829

closes odoo/odoo#130790

X-original-commit: 32ab5d9b2591a288606f77779d479384bb3b2599
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-03 21:57:01 +02:00
Odoo's Mergebot 39b1b3b136 [MERGE][REF] test_mail: prepare tests for multicompany aliases support
RATIONALE

We plan to move from a single alias-domain configuration to a multi
company enabled support for alias domains and aliases. First step to
prepare this change is to cleanup some tests: prepare multi-company
environment, make tests clearer, lessen future diff when updating
alias and alias domain usage.

This merge is mainly about test move and internal content renaming.

Task-3453577 (TestMail: Update Alias/Gateway tests for MC)

Next planned steps

Prepares Task-3453343 (Mail: Cleanup Alias Usage)
Prepares Task-3453347 (Mail: Move Alias Domain Support)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

closes odoo/odoo#130768

Related: odoo/enterprise#45204
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-08-03 21:56:58 +02:00
Thibault Delavallée aa69554a61 [REF] base, : move and cleanup ir mail server tests
Have all ir.mail.server tests as well as their configuration-related tests
moved into 'test_ir_mail_server' file. That way all tests are contained in the
same file, easing their update.

Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130768
2023-08-03 21:56:57 +02:00
Thibault Delavallée b5949d1672 [REF] test_mail, various: prepare gateway / alias tests
Rename alias domain and aliases used a test data. This allows to make
them easier to read, follow, grep and understand.

Activate multi-company on alias and gateway tests, ensuring it currently
has few impact on tests.

Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130768
2023-08-03 21:56:56 +02:00
Thibault Delavallée 71c58a7e93 [MOV] test_mail: move alias tests in their own file
Move alias-specific tests in their own file. This model deserves its own
test file containing unit tests for both alias model and alias mixin. This
helps improving and debugging the model, instead of having them mixed with
gateway-specific tests.

Activate multi-company in setup, preparing multi-company support for aliases
and alias domains.

Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130768
2023-08-03 21:56:56 +02:00
Thibault Delavallée 700a84edc9 [FIX] google_calendar: avoid browse(False) instead of void records
If no partner is found for a given email after calling '_mail_search_on_user'
and '_mail_find_partner_from_emails' the returned result is a void recordset
for the email.

When rebrowsing partners afterwards, browsing p.id for each partner leads
to potentially browsing False, which gives a different recordset from a
void recordset. This further causes a crash in '_write_from_google' as
he considers [False] as not being void.

This commit fixes that by correctly filtering out void partners. This is
globally a followup of odoo/odoo#99330.

Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130768
2023-08-03 21:56:56 +02:00
Zelong Lin 12e2be6ae0 [FIX] mail: spacing in composer send button
The spacing was lost.

closes odoo/odoo#130754

X-original-commit: 6d0af6dee9eabe1ad7569cd78907c4134d9389b0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-03 20:39:53 +02:00
Gaetan Vanden Bergh (gavb) 254d2422bb [FIX] website_sale: Text translation
Cause by #105848
opw-3427995

closes odoo/odoo#130732

X-original-commit: af1f23c956f7ccbf11d8d5d512f656901c92ad00
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-08-03 19:32:06 +02:00
Leloup Loïc (lole) 6ec298fabe [FIX] sale_product_configurator : fix variants dynamic creation
Before this commit, when selecting a dynamic attribute on the
configurator, an RPC call is made to the server, and the id of the
variant was returned if it existed. If it didn't exist, the server
didn't return the id, and the previous id, if any, was kept in the
client, causing the dynamic creation to fail believing that the product
was already created.

Now, the server will return `False` as `id` if the variant is not yet
created. This value will override any value previously saved as `id` in
the client, allowing the creation of new variants when needed.

opw-3423821

closes odoo/odoo#130720

X-original-commit: 4540f971db2d65bc3453e9579c39109775cd5794
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-03 19:32:02 +02:00
tong-odoo 24edd423dd [FIX] web: list.binary field should show filename
Steps to reproduce:

- Make any list binary field with filename attribute

Current behaviour:

- The binary file does not use the filename field

Expected behaviour:

- The binary file should use the filename field

Explanation:

After the updates of list-specific binary field [1], the list
binary cannot get the attributes field name of the record anymore.

[1] odoo/odoo#129631

closes odoo/odoo#130719

X-original-commit: ddfa65782a8ff59c07adcb8c56797c57a06789a0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-03 19:31:59 +02:00
MerlinGuillaume d8848e0147 [FIX] web: limit the width of the filter field selector
If we use a long enough sequence of field in a custom search filter, the
sequence of fields will overlap the operator or value

Steps to reproduce:
1. Open any view with a search
2. Add a custom filter
3. Use enough related fields in the filter so that it creates a long
   sequence of fields, it will overlap the operator at one point

Solution:
Limit the width of the `o_model_field_selector_value` class and break
its content

opw-3450099

closes odoo/odoo#130675

X-original-commit: 472923933e145b39f995051ebe8b45a75669a707
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-08-03 19:31:52 +02:00
Xavier Bol (xbo) 0f8fcb56da [FIX] project: fix planned date removal of projects
This commit's purpose is to allow the user to remove the planned date
end, or the planned date start of a project from the list view, or the form
view of the project. If the user removes either the planned date end, or
the planned date start, both dates will be removed. If the user tries to
add only a date end or a date start while keeping the other date empty
on a project with no planned date, these changes will be discarded.
The goal of this fix is for the projects to always have either both dates
set, or both dates set to False.

closes odoo/odoo#130651

X-original-commit: 250a0d233c8c2e074b967d59d53b1d4aac5feba2
Related: odoo/enterprise#45131
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-03 19:31:48 +02:00
Xavier Bol (xbo) 9045c52c7a [FIX] project: use directly the daterange picker in planned dates
Before this commit, when the user defines a planned date for a project
in the form view, he has to click on `Add end date` button to be able
to select the start and end dates directly in the date picker.

This commit allows to directly select the both dates in the date picker
instead of having the planned date end optional in the form and list
views of project.

X-original-commit: e4f11e7a694c26e23ecf1437f3a98b2d3dd3bd7d
Part-of: odoo/odoo#130651
2023-08-03 19:31:48 +02:00