Commit Graph
160522 Commits
Author SHA1 Message Date
Jeremy Kersten cb1388ed9e [ADD] website_cf_turnstile: add cloudflare turnstile support
This module allows to add secret key to add the turnstile captcha on
each snippet website_form.

Cloudflare Turnstile
--------------------
A friendly, free CAPTCHA replacement
Turnstile delivers frustration-free, CAPTCHA-free web experiences to
website visitors.
Turnstile stops abuse and confirms visitors are real without the data
privacy concerns or awful UX that CAPTCHAs thrust on users.

closes odoo/odoo#119246

X-original-commit: 4aca39a533e9d41f5f452f36a1ffc001f586b4f4
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-04-24 18:25:53 +02:00
Julien Carion (juca) 761d39658e [FIX] web: Format fields with rawAttrs in kanban
This commit makes sure that fields without widget
in kanban are properly formatted using the rawAttrs.

Steps to reproduce: create a float kanban field without
widget, set the digits to anything other than default and
see if the digits attrs are applied to the field.

opw-3263583

closes odoo/odoo#119161

X-original-commit: 1e635154654efcea59fe1f8bae679fb6bac41809
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-24 16:57:46 +02:00
Julien (jula) 0a267b3336 [FIX] tools: x_studio image field size
__Current behavior before PR:__
The size of an image field is guessed using the field name. For instance, an image field with `field_name = "XXXX_123"` is resized to 123 pixels when fetched.
This is can be an issue if a user creates an image field using studio in a form view.
If the user sets the label of the field as "Image 1", the technical name will become `x_studio_image_1`. Therefore, the image field will be resized to 1 pixel width.

__Description of the fix:__
Refactor the `image_guess_size_from_field_name` method to return `(0, 0)` when the field name starts with `x_studio_`.

__Steps to reproduce the issue:__
1. Open a form view (of any model)
2. Open studio
3. Add an image field with label "Image 1" (notice the technical name becomes in `x_studio_image_1` in debug mode)
4. Close studio
5. Upload an image on the created field
6. Save... The image is resized to 1 pixel width

opw-3242084
opw-3249632
opw-3253133

closes odoo/odoo#118960

X-original-commit: 3318f0e67da40983f52595aba933d8c8fd0f5cc5
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-24 16:57:44 +02:00
William Henrotin d9972ddec4 [FIX] mrp: clear finished moves
The finished move of a production order should be deleted if we change
the product to avoid having draft stock move detached from any business
documents

closes odoo/odoo#118957

Task: 3172098
X-original-commit: 4478560d7769a8a795a94aead875e02d1394dd71
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-04-24 16:57:41 +02:00
lejeune quentin 0fa36d664b [FIX] pos_stripe: Fix loading stripe ressource
Currently the POS does not load if a Stripe payment method is configured and there is no internet connection.
This commit fixes the loading of Stripe resources
to allow the opening of the POS and the display of related errors

task 3177045

closes odoo/odoo#118946

X-original-commit: 00b113721cf6a1de862794f06bd3ba293039ecd5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2023-04-24 16:57:38 +02:00
Rodolpho Lima afe5455116 [IMP] web_editor: rename colorpicker tabs
The first tab of the colorpicker can, depending on the context:
- display a selection of color combinations for the current **theme**
(when launched as a snippet option, for example, in the website builder);
or
- display a selection of **solid** colors (when lauched from the toolbar).

The commit changes the tab's name to conditionally reflect its content:
"Theme" or "Solid".

The second tab allows the user to pick a **custom** RGBA color. This commit
renames it to "Custom", replacing the inaccurate "Solid" name, now in
use for the first tab.

task-3274225

closes odoo/odoo#118852

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-24 16:57:35 +02:00
hupo-odoo f8f1e8e119 [ADD] l10n_tn : new localization package
Added the first package for the Tunisian accounting localization. This includes:
 - Chart of Accounts
 - Account groups
 - Taxes
 - Fiscal Positions
 - Tax groups
 - Tax report
 - Translation in French
 - A demo company

links to documents can be found in the task details

task-3093908

closes odoo/odoo#119376

X-original-commit: f8cd8eef62034ab2d05e975f03c79a6057f6287f
Related: odoo/enterprise#40139
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-04-24 12:50:46 +02:00
InCeyN 23d7c12c5a [FIX] stock_account: location default account_id
Behaviour before commit:
If the location is a production or inventory location, you can set an
account_id for the valuation. Once this account_id is set, it will still
be there if you change the type of location to a view location for
example. This may
not be the right account_id given the new type of location.
Behaviour after commit:
Check if the location is of a specific type, if it's not inventory or
production, it will take the default valuation account id from the
product category. Otherwise it will take the one set on the location.
OPW-3269584

closes odoo/odoo#119344

X-original-commit: 3f0ea5d0fa5a96eb78e4637781698121434ee069
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-24 12:50:43 +02:00
William Henrotin 008f758536 [IMP] mrp: (de)activate workorder demo data
Some demo data bill of material have workorder operation. Trying to use
them without the workorder setting activated will give an error on some
fields not instantiated.

This commit activate/deactivate the operations depending on the
workorder setting.

opw - 3229621

closes odoo/odoo#119254

X-original-commit: aaba4eb4deb3f9e10fd611924c5a24680d633537
Related: odoo/enterprise#40092
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-24 10:20:20 +02:00
Renaud Thiry 1196d470eb [IMP] mail, crm: reword notification actions
Prior to this notification actions are shown as such:
MODEL RECORD_NAME won | lost | settings

After they will be shown as such:
MODEL won lost settings RECORD_NAME

with the action links colored to match the company color.

The aim is to streamline the layout of e-mails and make actions
clearer.

task-3067315

closes odoo/odoo#106307

Related: odoo/enterprise#34284
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-24 10:20:12 +02:00
Renaud Thiry 87b0189ff1 [IMP] mail: remove default logo
Many templates use the company logo that is set by default on
database creation. As that logo is clearly a placeholder and the user
isn't necesserely prompted to update it. It's possible for a user to
inadvertently start sending emails with "your logo" placeholders
plastered all over.

This removes the default logo of the company and removes it from
templates conditionally.

The logo isn't simply replaced with a transparent PNG as the templates
set a fixed height for the logo, which would look weird.

task-3067315

Part-of: odoo/odoo#106307
2023-04-24 10:20:12 +02:00
amdi-odoo 9ee0b9182e [FIX] sale_stock: fix picking policy field width
Fix the picking policy selection field width which
is currently too short and is consequently hiding
the selected text.

Task-3267526

closes odoo/odoo#119099

Forward-port-of: https://github.com/odoo/odoo/pull/118059
X-original-commit: c98e30fba6d4cd4fe67439caad4d83eb15f67b26
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-04-24 08:38:14 +02:00
amdi-odoo 30d29a48fb [FIX] web: fix selection widget caret overlap
When the text in the selection is long enough to
reach the selection caret, the caret is overlapping
the text making it unreadable.

Adding a gap between the end of the text and the caret
to prevent any text overlapping.

Task-3267526

Forward-port-of: https://github.com/odoo/odoo/pull/118059
X-original-commit: 717bba692d7167dbcd651299e84432dcecf13ab4
Part-of: odoo/odoo#119099
2023-04-24 08:38:14 +02:00
Valentin Chevalier 17fc488e08 [IMP] product,sale(_product_configurator): refactor in OWL
The product configurator dialog was still in legacy code as it was not
required for the migration of the views to OWL. Now that we're moving
forward with the removal of other parts of the legacy code, this dialog
had to be converted as well.

Some parts of the logic have now been rewritten in OWL, getting a better
share of the logic between the server and the client.

The product configurator in e-commerce still uses the old implementation
and will be refactored in another task.

task-3056806

closes odoo/odoo#106511

Related: odoo/enterprise#39525
Related: odoo/upgrade#4550
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-04-24 08:38:11 +02:00
Valentin Chevalier 7e42f381c3 [MOV] website_sale: move variants logic from sale to website_sale
Currently, `website_sale` uses the same logic as `sale` to show the
product variant configuration.

This commit aims to separate this logic and let each module handle its
own product variant configuration.

task-3056806

Part-of: odoo/odoo#106511
2023-04-24 08:38:11 +02:00
JF Aubert 204d4ebf5e [FIX] mrp_subcontracting_dropshipping: ease po's
Ease 'dropship' purchase orders for subcontractors.
At the moment, it is not possible to dropship a subcontractor
with a mix of products, some of which are part of a subcontracting BOM
and some of which are not.
This becomes possible, but it remains mandatory to choose between
- Dropship (for the 'customer' location)
- Dropship Subcontractor (for the 'subcontracting' location).
Due to the destination location, it is not possible to combine
the two streams in a single purchase order.

closes odoo/odoo#119404

Task: 3199595
X-original-commit: c7f49776c74303e277246a4b6302e8a87d6a7def
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Jean-François Aubert <ajf@odoo.com>
2023-04-24 07:33:22 +02:00
Thanh Dodeur 74af371bc9 [FIX] mail: prevents crash when trying to close the audioContext
Before this commit, since https://github.com/odoo/odoo/pull/119014,
the audio context could be closed when already.

Until the implementation of AudioContext.state*, we have to catch the
error.

This commit also removes the forwarding to the destination that was
not necessary.

`* https://webaudio.github.io/web-audio-api/#widl-AudioContext-state

closes odoo/odoo#119444

X-original-commit: 0d28d067d2b848701312deea419acc3fe68ab4c9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-23 00:51:12 +02:00
Bastien (bvdn) 68508f8bae [FIX] web: fix footer button alignement in listview dialog
The footer 'selected count' button in the plan gantt view (project) wasn't aligned,
It's the case for every dialogbox where you can select many records,
simply removed a forced bottom-margin on the container

Task-3254488

closes odoo/odoo#119424

X-original-commit: 0125a3e233eeb4cf11ec7fc0ef429dabfaada05c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-22 15:53:19 +02:00
william-andre 40967ac434 [FIX] account: computation of "Use in Tax Closing"
The computation of `use_in_tax_closing` was overlooked when refactoring[^1]
the CoA templates. Since it was using a `onchange` with an extra code in
`create` of the `account.tax.repartition.line.template`, it didn't work on
its own after the refactoring.

[^1]: 5125748616

closes odoo/odoo#119440

X-original-commit: e51ffcb01be3238338f23946b75f7e034032cf37
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-22 06:54:00 +02:00
hupo-odoo 04489abea9 [REV] account: journal task reminder
Revert the following commit : https://github.com/odoo/odoo/commit/66672cf7f63548638ad218d5cae44cde5868b318
The reason is that it is at the end not functionally desired. We do want to see the task reminder for tax return on journal dashboard no matter the date.

task : 3231957

closes odoo/odoo#119428

X-original-commit: f1f5c5025ac2c7132590065fe701e3117490680c
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-04-22 06:53:57 +02:00
Julien Alardot (jual) ca0fabca1c [FIX] account: fix resequence triggers unique constraint
In the resequencing, if an account.move new name
correspond to an old name, it could trigger
the unique constraint ValidationError.

This temporarily rename the concerned moves to avoid triggering the constraint

Task-3280680

closes odoo/odoo#119427

X-original-commit: 18d73e235908b63534105434c78b3a637b827e10
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2023-04-22 06:53:55 +02:00
Julien Alardot (jual) 1fddf0d02d [FIX] account: fix lockdates in sequence holes
The lockdate date should not be included in the check
for sequence holes, as it is supposed to be locked

Task-3280680

X-original-commit: 18573b7c47f19933e6a420f8bb8d72687b568a5b
Part-of: odoo/odoo#119427
2023-04-22 06:53:54 +02:00
Jinjiu Liu a2350508b1 [FIX] web_editor: switch the checkbox of checklist to right for rtl
Reproduction:
1. Create a /checklist, switch the direction by /swith
2. Type something and the list element is rtl, but the checkbox is on
the left

Fix: add margin to the right for checklist with the same value as what
we have on the left, reset left and right position for the li element
when we have rtl direction on the whole list. When we switch direction
on a li element when set the direction on the list level, e.g. we get
the cloest list element and set the direction for the whole list.

opw-3215701

closes odoo/odoo#119423

X-original-commit: 01b42c7d76c814e13325f8880dc9de765b0f43c8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2023-04-22 06:53:51 +02:00
Rémy Voet (ryv) 70fd18ef67 [FIX] web: fix bad groupby as str instead of list
A mistake introduced in  234db70d86, the
`groupby` of  `_read_group` should be list/tuple of  `str`, not a `str`.

closes odoo/odoo#119400

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-04-22 06:53:49 +02:00
Stanislas Gueniffey 8f971c045c [FIX] web_editor: fix newline bug in code sections
This commit fixes a bug that was occurring in the code sections when
using Shift+Enter (soft return) for new lines.

Steps to reproduce:
- in a code section (a `<pre>` node)
- write two or more lines separated with Shift+Enter
- make the last line at least two characters long
- place the cursor at the end of the section and press backspace, or
before the last character of the section and press delete

Example (in a code section):
ABC
DEF
  ^ cursor before or after "F" (for delete or backspace respectively)

Unexpected behaviors:
- an extra line is inserted before the current line
- the cursor is teleported at the beginning of the current line

The bug originated from method `enforceWhitespace` which iterates over
the dom from the cursor's position. There, the conditions unintendedly
allowed the iteration to pursue until a `BR` node was found, in which
case a rule which should not have been enforced would add another `BR`
node, which also had the side effect of teleporting the cursor.

This commit adds a break statement such that if none of the "main"
conditions are met in the first iteration, it is stopped right away
instead. Meeting those conditions still allows the iteration to proceed
as before. Not meeting any of those conditions only happened in code
sections as far as we can tell, as they are explicitly excluded because
of their lower-level management of spaces. Should other cases occur,
they should have their own conditions added and not rely on a top-level
"else-by-default" to continue the iteration indefinitely.

task-3239097

closes odoo/odoo#119390

X-original-commit: e47c2eddb3b675324c181593a3243175a1095732
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-22 06:53:44 +02:00
sofiagvaladze 012a5e761d [FIX] hr_recruitment: simplify application_count computation
Prior, application_count was computed in batch. In order to do
so, the complex query was used, which can be error prone.

As the field is only used for smart button on the form, we can assume
that the method will be called for one record at a time, thus using ORM
methods will not make big difference in terms of speed, while it is more
elegant and secure.

Note: that we still need to have _compute_application_count in batch,
as it is a compute method.

task - 3266694

closes odoo/odoo#119373

X-original-commit: 8480a6a6da8ef319047d11be489f546d368dfc56
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-22 05:52:31 +02:00
paso-odoo f1edebeaee [FIX] sale: fix singleton issue on portal view of sale order
If applied, this commit will solve the issue of QWebException when the user
clicks on the 'Customer Preview' button and the sale order have a section in
'Order Lines' and the pricelist is not set.

Steps to produce:
- Create a sale order without a pricelist.
- Add a section in Order Lines.
- Click on the 'Customer Preview' button.

Solve the issue by using the sale order's currency instead of the pricelist's
currency.

sentry - 4092292347
see - https://tinyurl.com/26gt5hoh

closes odoo/odoo#119361

X-original-commit: ad0ed4b9ff34ae8f785435845864dc5dbd6d5e0a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-22 05:52:26 +02:00
Gaetan Vanden Bergh (gavb) 4ba88044ee [FIX] website_sale: Search domain for shop must manage
- company
 - published state

Search a product on shop, Filter on shop
must compute data and take care of company and published state

opw-3251404

closes odoo/odoo#119352

X-original-commit: 4ea5ca541a12435c48a4f9f41f2cee3cf21532c4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-22 05:52:21 +02:00
Thomas Lefebvre (thle) 56ddfdaa6a [FIX] payment: initialize txContext before await
Steps to reproduce:
- install website_sale;
- install website_sale_picking;
- enable just "Pay in store when picking the product" provider;
- pusblish just "[On Site Pick] My Shop 1" shipping method;
- go to ecommerce and make the purchase flow.

Issue:
A traceback appears on the "/shop/payment" page.

Cause:
We use the `txContext` field in the `_setPaymentFlow`
method before it is initialized.
Indeed during the `start` method, we have to wait for the end
of the super before `txContext` is initialized.
Since the `start` method is asynchronous, this will not block
the `_setPaymentFlow` method call which will use the uninitialized field.

opw-3257641

closes odoo/odoo#119351

X-original-commit: 18b629bfc26ab69e5e3bdc8aac090de66cf13f36
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-04-22 05:52:19 +02:00
Mathieu Duckerts-Antoine bf2cc8d7d1 [FIX] web: SampleServer: many2many in mockReadGroup
closes odoo/odoo#119350

X-original-commit: e63f8206e9658c517743966bb9e24d110fa43508
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-22 05:52:16 +02:00
Arnaud Baes cec7436b8e [FIX] base_import: Don't convert properly formatted date format
When importing documents that have a `date` or a  `datetime` field
a conversion is done on the format string in case it was still in the
old moment format (e.g. YYYYMMDD).

The problem is that this conversion was done regardless if the format
string was valid or not. This was producing botched format strings that
would prevent any import having a date or datetime field with proper
format string.

closes odoo/odoo#119340

X-original-commit: 20f4102e9aef42c557c6f7e0b5b5e591a18b1b4f
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-04-22 05:52:09 +02:00
Claire Bretton (clbr) 2fb19756ef [FIX] account: dashboard crashes when activity set on misc.op.
When you create an entry on Miscellaneous Operations journal and
schedule an activity on that entry, the Accounting dashboard
crashes and gets completely inaccessible because of an untranslated
field on mail.activity.type.

closes odoo/odoo#119318

Task: 3283382
Opw: 3277677
X-original-commit: 14481724cb5d6a164332586eb18f3195c6508b12
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Claire Bretton <clbr@odoo.com>
2023-04-22 05:52:04 +02:00
Lucas Lefèvre 34edfdd290 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/6304f41c [REL] 16.3.0-alpha.5
https://github.com/odoo/o-spreadsheet/commit/5d6d39ff [IMP] history: add the possibility to repeat commands at redo Task: 2508693
https://github.com/odoo/o-spreadsheet/commit/f48587de [IMP] grid: add F4 shortcut to redo Task: 2508693
https://github.com/odoo/o-spreadsheet/commit/6ada2a17 [REF] history: transform history into a UI plugin Task: 2508693
https://github.com/odoo/o-spreadsheet/commit/f8490e90 [IMP] *: use deepCopy instead of JSON.parse(JSON.stringify) Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/65387405 [IMP] model: store handler arrays Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/5ebc4e30 [IMP] formats: performance of `splitNumber()` Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/a4b68944 [IMP] sheet: move cells methods performance Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/0b4b8ab0 [IMP] header_visibility: improve perfs of `findVisibleHeader` Task: 3272878
https://github.com/odoo/o-spreadsheet/commit/4178abad [FIX] grid: don't focus input if it's unmounted
https://github.com/odoo/o-spreadsheet/commit/9c801ee0 [IMP] xml_bundle: make bundling xml templates sync
https://github.com/odoo/o-spreadsheet/commit/58a15c79 [IMP] FilterIconsOverlay: vertical align for filter icon Task: 3162258
https://github.com/odoo/o-spreadsheet/commit/76141f75 [FIX] test: jest.setTimeout() pushed by error

closes odoo/odoo#119314

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-04-22 05:52:02 +02:00
Sébastien Theys bcce4be8e9 [REF] mail, im_livechat: move /mail/chat_history to im_livechat
It is only used there.

In preparation of splitting discuss and mail modules.

Part of task-3265211

closes odoo/odoo#119302

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-22 05:51:59 +02:00
Sébastien Theys a1fcb6ffe6 [REM] mail: remove unused _default_request_uid
closes odoo/odoo#119301

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-22 05:51:56 +02:00
Florian(flg) e3bb3cd9c4 [IMP] account: Add transaction_details field on bank statement line
For some reasons, we need to store information about a transaction
in the bank statement line. This commit adds the field to handle
this information.

task-3270965

closes odoo/odoo#118943

Related: odoo/enterprise#39955
Signed-off-by: Laurent Smet <las@odoo.com>
2023-04-22 03:20:11 +02:00
Florian Charlier 9942eb3dcc [IMP] spreadsheet: add document test model field
See the added field in documents in ENT PR.

Task-3209385

closes odoo/odoo#119299

Related: odoo/enterprise#38171
Related: odoo/upgrade#4579
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-22 00:52:07 +02:00
hupo-odoo 57a730a414 [IMP] l10n_dz : Better CoA, Taxes, Tax report and account groups
Reduce the CoA which was too complete in regards with the business need.
Add the tax report mostly based on the series G°50 official document (only VAT part).
New taxes have been added to correspond to the tax report.
New fiscal position have been added.
Official documents must be in French -> add a French translation.
All references can be found in task details

task-3047876

closes odoo/odoo#113165

Related: odoo/enterprise#37298
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-04-22 00:52:02 +02:00
Mathias Mathy (MAMA) 0ef8c4f01d [IMP] stock: Warning on Replenishing too much
**Steps to reproduce :**
- Create a Product A, with no stock and a 0 min 1 max manual reordering rule (no sales lead time, no purchase lead time)
- Sell 10 of A with a delivery scheduled today
- In Replenishment, create a PO for A, confirm it with reception scheduled today
- Reschedule reception of PO in 7 days

**Expected Behavior :**
The forecast icon is replaced by an orange warning icon.
When hovering the icon, the user is warned that replenishing can lead to an overstock.

**Current behavior :**
In Replenishment, Product A has a forecast of -10 and Qty to Order is set to 11.
When the user replenish A again, the PO is created and may lead to an overstock.

task : 2918947

closes odoo/odoo#97802

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-04-22 00:51:59 +02:00
Soukéina Bojabza 6669e1d5d6 [FIX] web_editor: avoid horizontal scrollbar in right panel
In edit mode, if the grid mode is toggled and if there are enough
options in the right panel to have a vertical scrollbar (e.g. when we
click on an image to have the image options), a horizontal scrollbar
appears. This happens because the "Add Elements" widget is too large and
it therefore overflows.

This commit improves this widget style so it does not overflow, which
will prevent the horizontal scrollbar from appearing.

task-3098222

closes odoo/odoo#119288

X-original-commit: 784a8f36471a6b7c05452f6b39ee61f6b859d9c9
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-04-21 23:46:27 +02:00
Alexandre Kühn f34c5c64f8 [FIX] mail: save record on schedule activity
Before this commit, when adding a tag on record and then
scheduling an activity, the tag was removed from the record.

This happens because reloading the chatter does not save changes.

Although there is a `keepChanges: true` option, this looks
ineffective. This commit fixes the issue by letting chatter reload
always save any changes.

closes odoo/odoo#119275

X-original-commit: 97465dfb0ec53080bf05c3614dfa7429629729a6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-21 23:46:21 +02:00
Sébastien Theys 75bda9a79c [IMP] mail, bus: move "admin" password warning into bus notification
Remove complex dependency on discuss.channel for this simple warning.

closes odoo/odoo#119252

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-21 23:46:19 +02:00
Michael (mcm) 1e1c447d0d [REF] tools: transpile esm to sync module
This commit changes the js transpiler to write sync module.
The goal is to remove all async module and simplify the
module loader in the future.

task id: 3265979

closes odoo/odoo#119186

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-21 23:46:16 +02:00
Aaron Bohy e8b75e4d99 [FIX] web: multi edit list: crash after validating with ENTER
Have a multi edit list view, select several records and edit a
field represented by an input (e.g. a char field). After typing the
new value, press ENTER to validate. The confirmation dialog opens,
click on OK/Confirm to save. Before this commit, an error was
thrown afterwards, because we tried to retrieve the value from the
input, but the input doesn't exist anymore as the edited row has
already been switched back to readonly. This commit fixes the
issue.

closes odoo/odoo#119082

Related: odoo/enterprise#40012
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-21 23:46:11 +02:00
Aaron Bohy 105299eb1d [REF] web: move list specific logic about multi edit
The primary goal of this commit is to simplify the RelationalModel
API, and in particular to remove its "fieldNodes" param, which was
only necessary for a list specific usecase, which is the opening of
the ListConfirmationDialog when multi editing. We also remove the
"blockUpdate" logic from the model s.t. it remains local to the
list controller. About this logic, we fix a minor issue as we no
longer open the "No valid record to save" dialog when the mousedown
event is trigerred on "Discard" (we instead wait for the mouseup,
like already done to open the multi save confirmation dialog).

Part of task 3179751

Part-of: odoo/odoo#119082
2023-04-21 23:46:11 +02:00
Julien Van Roy d026dfa38c [FIX] account_edi_ubl_cii: if no VAT PartyTaxScheme should appear
If a partner has no VAT number (for instance: a public administration),
the xml tag `PartyTaxScheme` should not appear for UBL Bis 3.

opw-3263542

closes odoo/odoo#119261

X-original-commit: 270ed9f92ee9c71cc38c4cc69fb2d7c2c780cf52
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-04-21 20:18:47 +02:00
Kevin Baptiste 9d216634c5 [FIX] website_hr_recruitment: sort jobs / departments by name
The jobs / departments / offices were not in alphabetical order but
ordered by the job they were in, which didn't make sense.

task-3278949

closes odoo/odoo#119260

X-original-commit: 5da763a8ef0503286fa5cc55e32970f4d785825a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-21 20:18:44 +02:00
Kartik Chavda b4ac7f54fa [REM] project: remove task dependency sub-type feature
Before this commit there is a sub-type to notify parent
if child stage change but with new to-do state feature
we don't to unnecessory notification on parent which is
more problemation then informative.

This commit remove task dependency sub-type and it's related
code.

task-3252755

closes odoo/odoo#118418

Related: odoo/enterprise#39972
Related: odoo/upgrade#4542
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-21 18:46:48 +02:00
clesgow 38c3861d78 [FIX] sale_mrp: enforce order on picking_ids
Given that `assertRecordValues()` is order-dependant to check the
values, ensures that the pickings given in the test are in a fixed
order.
If the test is run too quickly, both delivery picking and return picking
would have the same scheduled date, ordering them by 'id desc' since
both priority and scheduled date would be equals. Sorting them manually
ensures their order is consistent, and thus the assert checks the right
values.

closes odoo/odoo#119282

X-original-commit: 9bc41db19b6da7947b2d430d47de1c8f3220765b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-04-21 16:47:34 +02:00
Deependra Solanki bb914f863d [FIX] web_editor: do not scroll up when inserting a link
Before this commit:

When we write a long pad and go to bottom a insert a link when the modal opens
the editable area scrolls to the top.

After this commit:

Now from the bottom of the pad when we insert a link the editable area does not
scrolls to the top.

task - 3138700

closes odoo/odoo#119279

X-original-commit: 2c50808d9cebc7ba0913a098bf79a15ef36da47f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-21 16:47:31 +02:00