Commit Graph
165814 Commits
Author SHA1 Message Date
Claire Bretton (clbr) ac28418ff3 [IMP] account_edi,l10n_{eg,es,it}_edi{_eta,_sii}: Disable account_edi auto_install
We change account_edi to be auto_install=False to avoid installing it when
it is not nedeed and create noise data that will always be empty.
It was previously auto_installed when Invoicing was installed.

Note that auto_install=['parent_module'] will automatically install the module
when 'parent_module' is installed (in this case the localization) AND install
missing dependencies (in particular here 'account_edi').

task-3454076

closes odoo/odoo#130997

X-original-commit: 2d2faafb744abdb09f199ab85f11d317ee1d065e
Related: odoo/enterprise#45337
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-08-07 13:42:09 +02:00
Maximilien (malb) 56ea931f32 [FIX] l10n_fr: adding description
In the taxonomy PR: odoo#114638, we changed the
name of the taxes but the description wasn't modified so the users have
difficulty understanding what the codes means. In this pr, we added a
description in english and in french so that people can have a better
understanding.

closes odoo/odoo#130996

Task: 3398682
X-original-commit: ea85cae2275fde939e63eebed73d3453c6b9dcd9
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-08-07 12:32:52 +02:00
Victor Feyens 467619a244 [FIX] sale: show more lines on the order form view
Users are not able to reorder lines on order having more
than 40 lines as only 40 lines are shown by default.

In some advanced flows, new lines are automatically added to the
end of the lines and the user has no way to move them back in
the first ones (or in a specific section if it's not on the same
page).

opw-3437983

closes odoo/odoo#130956

X-original-commit: b316cd61bff1c05f8b07d036e9c0409998982a69
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-07 12:32:48 +02:00
kusi-odoo 7d9b90308e [FIX] hr, hr_contract: set contract end date when we archive the employee
1) If the contract is running when the employee is archived, we move the contract in the
   expired stage and we set the date of the archive wizard to the
   contract's end date.

2) If the contract has expired when the employee is archived, do not change the date.

task-3373275

closes odoo/odoo#130714

X-original-commit: e84106cdc5ae8015ee0c15a6c842d91dc2da1343
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Kuldeep Singh (kusi) <kusi@odoo.com>
2023-08-07 12:32:37 +02:00
Turkesh Patel 23ecf40ced [FW][FIX] website_sale_stock_wishlist: product not found
In the wishlist, if a product has no stock available, the customer can request to be notified when the product is "back in stock".

If a barcode is configured on the product, the request will fail with a "Missing record" error.

Indeed, the code relied on the tracking info (google analytics data) to find the product id.  This is a mistake since the barcode is given as `item_id` in the tracking info if set (instead of the product id).

Since the product id information is already available as node data, use this mean to get the right product id directly.

Fixes #130471

closes odoo/odoo#130949

Forward-port-of: odoo/odoo#130473
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-07 10:58:52 +02:00
Michael (mcm) 00d8aef1c7 [REF] web, *: remove legacy patch
This commit removes legacy patch/unpatch functions and adapts their use
by using the modern patch. There was also a custom patch function used
in tests which has been replaced too.

closes odoo/odoo#130867

Related: odoo/design-themes#685
Related: odoo/enterprise#45271
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-07 10:58:48 +02:00
Lopes Marc (loma) 6c3c4fe370 [FIX] website_forum: allow new user to see own pending post
How to reproduce the bug:
------------------------

- Create a new user
- Log in as that user
- Go to a forum that don't require karma to ask a question.
- Create a new post
- On validation, you'll end up on a 404 page.

If we use the portal user instead, we see the post with a banner explaining
it has to be validated. This should be the result here too.

Specifications:
--------------

- When new users (karma = 0) create a post, redirect them to the page
relating to their question.

task-3372016

closes odoo/odoo#130857

X-original-commit: 9f624795c68d69ddf212657fe43cc45fc32747a0
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-08-07 10:58:37 +02:00
David Monnom (moda) 444d20bd94 [FIX] point_of_sale: missing classes on save button
During the bootstrap refactoring we forgot to add some classes to the
save button of the POS (`btn btn-light rounded-0 fw-bolder`) which are
used on the other buttons of the POS.

They are now added to the save button.

closes odoo/odoo#130718

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-07 10:58:33 +02:00
Lucas Lefèvre (lul) 5318e947bd [IMP] spreadsheet: interpret more months reprensentation
This commit improves the way months are recognized in pivot functions.
It also removes the use of `moment.js` which will be removed in the future
(see task 3391739)

Currently, months in a pivot function must follow a very specific
format.
It must be mm/yyyy

`ODOO.PIVOT(1, "amount", "date:month", "01/2020")`

Among other things: "1/2020" does not work, it must be prefixed by a
leading zeros.

Now, any date-like value would work:

month: "1/2020"
first of the month: "1/1/2020"
any day in the month: "1/2/2020"
using the DATE function: DATE(2020, 12, 1)
using NOW()

Future work: `PIVOT.HEADER` should return a the date as a number
when the date is a month. But it's currenctly quite a mess.
because we use the same method for a million things (`getGroupByDisplayLabel`).

Task 3413243

closes odoo/odoo#129782

Related: odoo/enterprise#44684
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-07 10:58:29 +02:00
Rmi Rahir (rar) b6f2087bf8 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/91607311 [REL] 16.5.0-alpha.1
https://github.com/odoo/o-spreadsheet/commit/b9db2a6f [FIX] find_and_replace: update search undo/redo & add/delete header
https://github.com/odoo/o-spreadsheet/commit/c701edb0 [FIX] find_and_replace: disabled button css and shorten the debounce Task: 3432224
https://github.com/odoo/o-spreadsheet/commit/52e98921 [IMP] Demo: Add an uncaught error catcher Task: 3392372
https://github.com/odoo/o-spreadsheet/commit/5aef9dd4 [FIX] find_and_replace: show formula checkbox not updating properly
https://github.com/odoo/o-spreadsheet/commit/6ace3df7 [FIX] find_and_replace: updating the cell will update the search
https://github.com/odoo/o-spreadsheet/commit/ee0506d2 [FIX] find_and_replace: hidden cell should not be considered
https://github.com/odoo/o-spreadsheet/commit/e1f68c2b [IMP] dates: detect mm/yyyy strings as dates Task: 3413243
https://github.com/odoo/o-spreadsheet/commit/3ba2c3c0 [REL] Bump master version to 16.5.0-alpha.0
https://github.com/odoo/o-spreadsheet/commit/39a37866 [IMP] jest: update jest to 29.5.0 Task: 3047642
https://github.com/odoo/o-spreadsheet/commit/500997ef [FIX] SortPlugin: fix crash whith empty-ish cells
https://github.com/odoo/o-spreadsheet/commit/69051ea5 [FIX] *: unify to strict equality operator
https://github.com/odoo/o-spreadsheet/commit/8a9914a2 [FIX] ActionButton: update SVG icon to display current style in top bar
https://github.com/odoo/o-spreadsheet/commit/9ba05e3a [FIX] dashboard: Fixed filter icon position
https://github.com/odoo/o-spreadsheet/commit/80aec0bc [IMP] topbar: allow double clicking on paint format
https://github.com/odoo/o-spreadsheet/commit/49554975 [FIX] currency: display localized custom format preview Task: 3389619
https://github.com/odoo/o-spreadsheet/commit/87108395 [IMP] format: config default currency
https://github.com/odoo/o-spreadsheet/commit/01823df7 [IMP] menus: localize number format preview Task: 3389619
https://github.com/odoo/o-spreadsheet/commit/599003a3 [IMP] header_size: resize row based on wrapped text Task: 3240138
https://github.com/odoo/o-spreadsheet/commit/fabc8449 [REF] ui_sheet: extract getters into helpers Task: 3240138
https://github.com/odoo/o-spreadsheet/commit/f044ec98 [MOV] helpers: move text helpers to a separate file Task: 3240138
https://github.com/odoo/o-spreadsheet/commit/71cc9589 [FIX] menus: dynamically add all functions
https://github.com/odoo/o-spreadsheet/commit/bd7271e9 [IMP] pr_template: match template with commit format
https://github.com/odoo/o-spreadsheet/commit/dc81d48c [IMP] Figure: add icons to figures context menu Task: 3391903

Part-of: odoo/odoo#129782
2023-08-07 10:58:29 +02:00
Julien Van Roy ad37ebefb9 [IMP] account_edi_ubl_cii: UBL Bis 3 add support for Denmark
Denmark is comprised in the EAS list but is not currently supported in
Odoo. This commit makes UBL Bis 3 available for Danish companies.

The schemeId "0184" corresponds to the "DIGSTORG" and is mandatory for
Danish Suppliers (see: rule DK-R-014,
https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/DK-R-014/).

issue-130519

closes odoo/odoo#130856

X-original-commit: 6e842dac3bd299a68f6358a9bd59c5a3a09665f4
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-08-07 09:51:24 +02:00
hupo-odoo 62f69aaf51 [FIX] account: auto post valid invoices
Previously, when account moves were set to auto post, and the cron was triggered to post them, if a single invoice triggered a UserError, none of them were posted (User error might be for example missing required field to post, archived journal, inactive currency, ...). This commit enables to post all valid invoices. The invoices that could not be posted are now visible on the accounting dashboard on their respective journal card with the 'to check' attribute, and a note is written on the chatter of the problematic invoices, describing the reason why the move could not be posted.

For performance reasons, we lowered the number of moves that can be posted in a single batch. This way, if a move among a batch cannot be posted, all moves of this batch must be handled one by one. Doing batch of 100 is already the case in 16.0

task-3244310

closes odoo/odoo#130958

X-original-commit: 5c0ba84d20334f307834113fdea61f04391cbcbe
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-08-07 07:58:51 +02:00
John Laterre (jol) d94a3087be [IMP] account,analytic: UI/UX improvements
Miscellaneous improvements:
1. In analytic tags, the percentage is now a prefix.
2. In the widget, 0% accounts are now hidden.
3. In the analytic items list/pivot views, it is now possible to search by:
- Financial Account.
- Cross by.
4. By default, the pivot view is now grouped by plans and then analytic accounts.
5. An "Analytic Reporting" menuitem that opens the pivot view is added in Reporting > Management.

task-3446504

closes odoo/odoo#130971

X-original-commit: adb8ec875c9b4e299147c46dc60a87fd26fff91f
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-06 20:27:15 +02:00
william-andre 6a2f9a49fd [FIX] account: suggest default repartition lines
`default_get` is bad m'kay?

Reproduce:
* Accounting > Configuration > Taxes > Create
* Just add a name, save.

There are no repartition lines, but there should be at least one line
for the base line.
This happens because `default_get` was only computing the main field
`repartition_line_ids` and it was allowed because the contraint was not
checking that same field.

closes odoo/odoo#129840

X-original-commit: f05457c82af63358c292350ef110f0b18c27f164
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-06 19:12:13 +02:00
Xavier-Do 76adca8ec9 [FIX] website: clear cache on ir.asset archive
Since #121376 a clear_cache was removed when unlinking an attachment

This clear_cache was not useful when restarting a server with new
sources, an other operation changing the content of an assets should
invalidate the cache manually. This is the case of ir.asset CUD
operations.

Unfortunately, a manual update was left missing in website, when
archiving ir.assets used for snippets.

This was discovered on runbot, with two workers, when the first workers
generates assets before the cron, and the second one after the cron.

The second worker unlinks attachments creating an inconsistency in the
cache of the first one.

This problem can be solved quickly by invalidating the assets cache in
the cron manually but this will be done in all cases. The proposed
solution will check the ir.asset that should change and only clear the
cache if the state changed.

Regarding performances, this should actually be a slight improvement in
query count since at the cost of one more select to prefetch the record
we can avoid multiple update, one per snippet. In most case no update at
all should be done, at most 2 can be done (one for archive, one for
unarchive).

Example with some assets to unarchive:

Before:
TOTAL ENTRIES: 277
SELECT: 158 (~0.16591858863830566s)
UNKWOW: 54 (~0.0202481746673584s)
UPDATE: 65 (~0.03202557563781738s)

After:
TOTAL ENTRIES: 214
SELECT: 159 (~0.1663439826965332s)
UNKWOW: 54 (~0.029229164123535156s)
UPDATE: 1 (~0.0002865791320800781s)

If the number of query is lowered, the python processing is slightly
higher. Locally the test time is similar, slightly longer since an
additional call to _disable_unused_snippets_assets was added to check
the cache invalidation

closes odoo/odoo#130973

X-original-commit: 3aeab51ff4379e6d76172614fd39f09d6c449ac6
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-08-06 17:58:53 +02:00
Audric Onockx (auon) 5f6292ccff [IMP] sale_timesheet: make timesheet revenues accurate for prepaid
...services

In the reporting of Timesheets, "timesheet revenues" represent
`sol.price_unit * sum(timesheets.unit_amount)`.
While this calculation is correct for SOLs with a service
invoiced on delivered quantities, it doesn't reflect the truth
when the product is prepaid/fixed price (ordered quantities).

With this commit, the "timesheet revenues" related to the latter
type of services will be equal to
`sol.price_total / sol.qty_delivered * sum(timesheets.unit_amount)`.
Where we determine the revenue per unit, and apply it to
the total duration of timesheets.

Example:
Say a SOL with a service of type "prepaid/fixed price",
an ordered quantity of 4, and a price per unit of 3.00€.
The total price is 12.00€ no matter how much has been delivered.
Say users A and B, having respectively timesheeted 2h and 1h,
so the delivered quantity of the SOL is 3.
We'll note "timesheet revenue of user X" "TR(X)".

Before this commit:
`TR(A) = 3.00€/h * 2h = 6.00€`
`TR(B) = 3.00€/h * 1h = 3.00€`
`TR(A) + TR(B) = 6.00€ + 3.00€ = 9.00€`
The total timesheet revenues is 9.00€ where it should be 12.00€.

Now:
`TR(A) = 12.00€ / 3h * 2h = 8.00€`
`TR(B) = 12.00€ / 3h * 1h = 4.00€`
`TR(A) + TR(B) = 8.00€ + 4.00€ = 12.00€`
The total timesheet revenues corresponds to the SOL's total price.

task-3368808

closes odoo/odoo#127875

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-05 13:17:02 +02:00
kais-odoo 32dec19ee0 [FIX] web,project: fixes groupby attribute in pivot _getEmptyGroupLabel
Before this commit, since we used to show custom label for project and assignees
as 'private' and 'unassigned' section in pivot view,  if we want to display show
custom label for groupby with sub group type we might get confuse with passing
'groupby' attribute on _getEmptyGroupLabel pivot method.

In this commit, fixes groupby issue by passing 'fieldname' instead of 'groupby'
cause groupby contains 'groupname : subgroup' like 'deadline : year'.

closes odoo/odoo#130960

Task: 3186578
X-original-commit: cae3531deb032289f5f823df7ffa565ee89189ea
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-05 12:20:31 +02:00
Loan (LSE) d271b213a5 [FIX] barcodes: handle ^ with | barcode rule patterns
Before this commit:
 If the barcode nomenclature uses the or `|` symbol.
 The part after it would be used as a "contains" instead of a
 "start with".
 e.g: `123|456`
 would be transformed in the JS code to `^123|456` instead of:
 `^123|^456`
 As such, you would have error "can't find product with barcode" if
 you set such a rule and a product barcode contains the second part.
 For e.g: the barcode `44445666` would match, but should not!

After this commit:
 Force the second (and following if any) part to start with.

Note: in practice it is pretty rare to have `|` in the pattern, but
it is the case for a default rule in version 16, see:
https://github.com/odoo/odoo/blob/5ac58ebf983c1c02019253c0430fde3502e13e7c/addons/pos_loyalty/data/default_barcode_patterns.xml#L10
In this case, if a regular product have `044` in its product barcode,
the PoS will tell that there is no corresponding coupon instead of
adding the product.
But the issue itself still apply in version 14 in case of custom rules

opw-3356951

closes odoo/odoo#130961

X-original-commit: 103566699d3492b682219efc3614f26d2ea972e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loan Sens (lse) <lse@odoo.com>
2023-08-05 01:55:50 +02:00
Claire Bretton (clbr) a469d3700b [FIX] l10n_ar: remove inconsistent tax demo data
Remove tax demo data:
- They have the same tax name which breaks a uniqueness constraint, and
cause error at migration.
- It doesn't make sense to have taxes demo data
Also remove assignation of those taxes on other aml demo data.

closes odoo/odoo#130934

X-original-commit: 9917aa208fbdacb5b06fd728f86abda2905cbbd0
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-08-04 22:30:21 +02:00
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