Commit Graph
157106 Commits
Author SHA1 Message Date
Samuel Degueldre f7f16bd85d [FIX] web: correctly log full traceback for uncaught errors
Previously, we added some handling so that errors that were not
defaultPrevented would have their traceback logged by the error service
instead of the default behaviour of the browser, because not all
browsers correctly log error chains (errors with causes). This did not
actually work because the errorEvent was written on the object at the
top of the error chain and checked on the error at the bottom of it.

This commit fixes that by just looking at the event on the uncaught
error.

closes odoo/odoo#108463

X-original-commit: cefba026ad7fe453da840a948e25d29d4d1837e9
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-12-23 12:10:55 +01:00
Xavier-Do bc61ab4fb2 [FIX] web: format set_profiling output nicely
JSON content can be rendered nicely by browsers when using the
appropriate mimetype

closes odoo/odoo#107708

X-original-commit: 70153bbe233bb81d51752c5f1ed1766414eb875b
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2022-12-23 12:10:52 +01:00
Patrick Hoste 44dba8e572 [FIX] website_slides: fix dropdown item in channel kanban view
Before this commit the dropdown items in the channel kanban
view were not centered, this fix the issue by adapting the
css rules.

Task-3086160

closes odoo/odoo#108552

X-original-commit: 7d1a013b43ce9196e1f2f7a602cf8161d44776ad
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-12-23 11:10:41 +01:00
Mathieu (mano) c1d3cc88f6 [FIX] web: fixing font weight on fedora
This commit replaces Liberation Sans for Noto Sans in the default system
font stack as Liberation doesn't support font-weight: 500 and had a 
fallback at 400.

Liberation Sans was the fallback font on Fedora Linux, this commit fixes
it by setting Noto Sans (variable font) as the fallback font for Fedora.

task-3076171

closes odoo/odoo#106525

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-23 10:09:54 +01:00
Thomas Lefebvre (thle) 8029b467da [FIX] hr_timesheet: prevent user to see other employee's timesheets
Steps to reproduce:
- for a user, define Timesheets access rights to "User: own timesheets only";
- go to Reporting tab in Timesheets application with this user;
- go to pivot view "By Project" or "By Task".

Issue:
It is possible to see timesheets that do not belong to the user.

Solution:
Add rules which force de domain for the `timesheets.analysis.report` model.

opw-3088745

closes odoo/odoo#108553

X-original-commit: 07c9a3687511c2feaf9b6558da8c7f4d93470e64
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-12-23 07:44:44 +01:00
jorv edec9e92c7 [FIX] website_livechat: define auto_init for better installing performance
When installing the website_livechat module, the `_compute_livechat_operator_id`
method is run on every record to update the value for `livechat_operator_id`.
On a large `website_visitor` table this leads to timeouts and livechat installation
stops with a traceback.

We can safely assume that at the moment of installing livechat,
no livechat operator was attributed to any visitor. initializing the value to
a default FALSE seems acceptable.
That way PostgreSQL will not need to touch the rows at all, the operation will
be instantaneous, and the actual values will be lazily initialized when the rows
are modified later.

Example, client database with +7 million `website_visitor` records to run
`_compute_livechat_operator_id` on installation:
- before commit: more than 3 hours (timeout)
- after commit: less than 3 mins

Previous implementation: cc9f59b , c426a45

opw-3095632

rebase + squash :
Switched to using the `create_column` method instead of a raw SQL query.
Added some comments in the `_auto_init` definition.

closes odoo/odoo#108570

X-original-commit: f7eae96e1aeb29a518eddd7dd18267dfc0a39fca
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-12-23 01:41:45 +01:00
Solan Delvenne (sode) 63f52519e7 [FIX] snailmail: Fix base snailmail layouts
Due to some changes to the layout and to some upcoming changes to the
service provider's validation area, the layout had to be fixed to avoid
validation errors.

closes odoo/odoo#108559

X-original-commit: 0ba4a7ea649846b796161206b5ea011cf6fcda27
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
2022-12-22 18:30:07 +01:00
Lucas Lefèvre e73bf6580f [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/4c5002db [IMP] function: hyperlink(url, label)
https://github.com/odoo/o-spreadsheet/commit/9d84b33f [REF] popover: improve popover component
https://github.com/odoo/o-spreadsheet/commit/5a33e7d7 [REM] figures: remove duplicated image component
https://github.com/odoo/o-spreadsheet/commit/6df5f339 [IMP] chart: aggregate data for labels
https://github.com/odoo/o-spreadsheet/commit/ee3d2ab7 [FIX] scrollbars: Fix size of the scrollbars
https://github.com/odoo/o-spreadsheet/commit/11d6eeee [FIX] index.ts: export helper to create empty sheet
https://github.com/odoo/o-spreadsheet/commit/53c18e51 [IMP] model: allow to run evaluation in non lazy mode

closes odoo/odoo#108540

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-22 15:55:12 +01:00
Ahmed Khalaf d7246ef786 [FIX] mrp: fix change MO qty to produce
Before this commit, if a user changes a MO move qty to 0
and then tries to change the MO qty to produce, an error occurs.

The move with 0 qty is no longer cancelled or unlinked as this was not
the intenteded behavior.

Since the change production wizard no longer deletes cancelled moves
a test was updated accordingly.

closes odoo/odoo#108534

Taskid: 3082611
X-original-commit: 39abadb30dc8fab6b2a1ca24cb2916ab148fb5fa
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Ahmed Khalaf  <ahkh@odoo.com>
2022-12-22 15:55:09 +01:00
Patrick Hoste fe6fd32adf [FIX] website_slides: fix dropdown item in channel kanban view
Before this commit the dropdown items in the channel kanban
view were not centered. This fix the issue

Task-3086160

closes odoo/odoo#107542

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-12-22 15:55:07 +01:00
Pierre Rousseau 180ddd6da2 [FIX] spreadsheet: autoresize pivot table
Before this revision, the pivot table was not autoresized when group bys
contains a many2one or a many2many field as it required an extra
request to get the name_get of the values.

With this revision, the values of the relational fields are extracted
from the pivot model in order to save an extra request.

Note: this fix is not ideal as it introduce a dependency between the
pivot model and the server data source. However, it is the best
solution in a stable version.

Task-id 2928601

closes odoo/odoo#108527

X-original-commit: d6a1aa63702132ffc59d2412c2a009912eba797a
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-12-22 14:49:29 +01:00
Pierre Rousseau 0fa9d984f3 [FIX] spreadsheet: call the correct callback when fetching data
Before this revision, the callback passed to the constructor of
BatchEndpoint which should be called when there is an error when
fetching data was not called.

Part of task-id 2928601

X-original-commit: 6b4d5e4274c7644f9fda40c96f6b08a6bfd9ff37
Part-of: odoo/odoo#108527
2022-12-22 14:49:29 +01:00
Denis Roussel ca17c97920 [FIX] delivery: Really use propagate_carrier option on stock rules
closes odoo/odoo#108501

X-original-commit: c41d64507cd08c6e6cb033e8802d537acce5aaab
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-12-22 14:49:26 +01:00
William Braeckman ae497d22e5 [FIX] website_sale{,_stock}: fix issue with tests
Multiple tests introduced in 16.0 created a product template and then a
default product for that template, however a default product is already
created by default in the product module when creating a template and it
somecases triggered an unicity constraint.

closes odoo/odoo#108523

X-original-commit: 3c9ff6e148cd0ee77442dd31079f0fec9c456b4c
Related: odoo/enterprise#35180
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-12-22 13:47:58 +01:00
niyasraphy f9ec85614b [FIX] repair, sale, stock: translatable string and typo
currently the returned warning from the sale, stock and repair apps are not translatable to user languages.

this pr makes the string's translatable and correct the grammer of the warning.

closes odoo/odoo#108379

X-original-commit: 217115e68d117d7cf1eeb94794118819d6082547
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-22 12:45:48 +01:00
Adrien Widart (awt) 1f3cbfd7ca [FIX] mrp: hide smart buttons for kits
When a kit template has several variants, the on hand quantity can be
incorrect.

To reproduce the issue:
1. Create two products P_compo, P_kit:
    - P_kit:
        - Storable
        - Variants:
            - Color (White, Black)
    - P_compo:
        - Storable
2. Update the on hand quantity of P_compo: 10
3. Create two BoMs:
    - BoM01:
        - Product: P_kit
        - Variant: Black
        - Type: Kit
        - Components: 1 x P_compo
    - BoM02:
        - Product: P_kit
        - Variant: White
        - Type: Kit
        - Components: 2 x P_compo
4. Open the form view of the template P_kit

Error: it displays "15 units on hand", which is impossible (there are
only 10 P_compo available)

Since it is difficult to determine the expected value, a decision has
been made: hide these smart buttons if a template has more than one
variant and if at least one of the variants is a kit.

OPW-2645299
OPW-2678400
OPW-3076502

closes odoo/odoo#108284

X-original-commit: cf3b83d6a48c080d900d9cf343e4012be718c79d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-12-22 11:40:55 +01:00
xO-Tx 3b9406419a [FIX] web_editor: fix shape animation loss
To apply a shape on image, we use its base64 string as source on the
<image/> of the shape svg file. Then, the svg is used as source on the
targeted DOM element (<img/> on snippet).

When the targeted image is an animated GIF, the behaviour is different:

CHROME:
- The animation works correctly.

SAFARI & FF:
- The GIF animation is lost (only on non-animated shapes). The animation
works correctly on the svg file but once it is used as src of <img/> tag,
the animation is lost.

The goal of this commit is to fix this behaviour by forcing the
animation on SVG content.

task-2679905

closes odoo/odoo#108229

X-original-commit: 996acc3977de0346a45da328f42583b4366d1d47
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
2022-12-22 11:40:52 +01:00
vishal padhiyar e9f99dff16 [IMP] web_editor: improve link popover
PURPOSE

Simply improve the design of the link popover

SPECIFICATION

- "ellipsis" the link preview instead of wrapping it
- only keep a 0.5rem gap between each of the right icons

Task-2916270

closes odoo/odoo#108497

X-original-commit: bb1f37226dcd842abf4ec63ecf037f5ce3a3441b
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-22 10:39:35 +01:00
Nicolas Bayet cb3dc19969 [FIX] web_editor: make monetary field unremovable
Before this commit, the span within monetary field could wrongly be
removed. Python code that parse the value (see `from_html` of
`ir.qweb.field.monetary`) expect to have that span available.

This commit make that span being unremovable.

opw-3090775

closes odoo/odoo#108496

X-original-commit: 7576c88fec4f993e525279d15c22077a11132281
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-22 10:39:31 +01:00
Swapnesh Shah 97ec1f4ab3 [FIX] hr_holidays: correct date format on leave name
Before this Commit, dates was not formatted based on user's language.

With this commit, we use format_date to correctly format dates.

closes odoo/odoo#108442

X-original-commit: 4da7129695f2619711f08ed7c36a37543deaa31d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-22 10:39:28 +01:00
Rohitkumar (roku) 30f4b615d3 [FIX] project: stat button content align
Before this commit, the content of the stat button not aligned.

So this commit fixes by the stat button's content is aligned to the left and vertically centered.

task-3054386

closes odoo/odoo#108504

X-original-commit: e87284cebe64cc1f5bf31198ca221f14cffdc671
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-22 09:38:07 +01:00
Abdelouahab (abla) 2c7ab4d85f [FIX] website_sale: set t-key to unique value
To reproduce
============
- add a second image to a product and publish it on the website
- on the website make sure to enable image popup when clicking on it
click on the product image -> error

Problem
=======
the `t-key` is set to `image` which has the value `[object Object]` as `string`
so for the `t-foreach` loop all the keys are the same which leads to keys duplication error

Solution
========
set `t-key` to the `image.thumbnailSrc` because we are sure
that the src is unique.

opw-3090782

closes odoo/odoo#108485

X-original-commit: 6059b8ca68cfe8f631451f7d306387c6ed4f7844
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
2022-12-22 09:37:59 +01:00
Lucas Lefèvre d073dd968c [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/7daa2dd5 [FIX] registry: introduce contains method
https://github.com/odoo/o-spreadsheet/commit/a71edfd9 [FIX] grid: Capture context menu events triggered by keyboard
https://github.com/odoo/o-spreadsheet/commit/475c646f [FIX] index.ts: export helper to create empty sheet
https://github.com/odoo/o-spreadsheet/commit/53707349 [FIX] GridOverlay: Only react to self targeted double clicks
https://github.com/odoo/o-spreadsheet/commit/77820dc0 [FIX] figure: apply dragging style on actual drag, not on mousedown
https://github.com/odoo/o-spreadsheet/commit/7c113676 [FIX] figure: Avoid scroll on a focused figure
https://github.com/odoo/o-spreadsheet/commit/1bda41ee [FIX] composer: keep focus after changing sheet
https://github.com/odoo/o-spreadsheet/commit/143764ae [FIX] composer: close text composer when changing sheet
https://github.com/odoo/o-spreadsheet/commit/b4aac2b3 [FIX] dashboard: copy event is still present
https://github.com/odoo/o-spreadsheet/commit/c1c6133a [FIX] bottom bar: very large numbers badly displayed in automatic sum
https://github.com/odoo/o-spreadsheet/commit/b593fd27 [FIX] data filter: icon not centered
https://github.com/odoo/o-spreadsheet/commit/1b37ce68 [FIX] images: import and export images
https://github.com/odoo/o-spreadsheet/commit/be10c889 [IMP] components: Remove sidePanelIsOpen props from components
https://github.com/odoo/o-spreadsheet/commit/5f680455 [FIX] dashboard: click cells to close filter menu

closes odoo/odoo#108364

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-22 09:37:54 +01:00
Jordan D. (Joda) ae1272428c [FIX] sale: disable confirmation warning after cancellation on portal
When cancelling a quotation using the portal, the state will remain on
sent but the message given with it will be displayed on the chatter.

This bug is caused by the framework trying to display a cancellation
wizard.

opw-3084216

closes odoo/odoo#108476

X-original-commit: c662da9f1c8926cb2cebbb632a3621e2e26e2f36
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-21 19:34:58 +01:00
Barad Mahendra 37e9ae0d11 [FIX] hr_timesheet: fix the remaining hours border color
Currently, the remaning hours border is not displayed in the
project kanban view.

so in this commit, added the border class to display the
colored border on project kanban view.

task-3052597

closes odoo/odoo#108440

X-original-commit: 4f6bf04ded020475847212cbbebbfc3f77324799
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-21 19:34:55 +01:00
Barad Mahendra 7702087180 [FIX] project: truncate the alias name in project kanban
Currently, when alias name is too long then it was going to
display in the new line and ui is broken in the project kanban card.

So in this commit, if alias_name is too long then truncate the
text and display the ellipsis for name in project kanban card.

task-3052597

X-original-commit: fb111d1f828a4e7580afe758e5c6dbfc9d16a51d
Part-of: odoo/odoo#108440
2022-12-21 19:34:55 +01:00
Barad Mahendra d571b7bbe3 [FIX] note: fix the width of form sheet
Currently, the form sheet of the note is not displayed in
full screen due to the max-width set as 1320px inside the
o_form_sheet.

So in this commit set the max-width as 100% to display the
sheet view in whole sheet area.

task-3052597

X-original-commit: 851fe4b2d163a20e3cd9cb129a42b96690e5b908
Part-of: odoo/odoo#108440
2022-12-21 19:34:55 +01:00
Barad Mahendra 8131f917fb [FIX] project: hide the translation alert on sharing view
Currently, the translation banner is displayed inside the project
sharing view.

So in this commit hide the translation alert on sharing view of
the task.

task-3052597

X-original-commit: b39a5e4a1f074a53bf0bd0831b73564f52757d6e
Part-of: odoo/odoo#108440
2022-12-21 19:34:55 +01:00
xO-Tx abe2ec83ad [FIX] website: fix homepage translation overwriting
To reproduce the issue:

- Go to website > Add language > Add blocks to your homepage and
translate it.
- Make translations on the "Contact us" page (or a new custom page).
- Install a new app > The translation of the homepage is lost (only on
homepage).

Explanation:

After [1], The `_load_module_terms()` method was updated on website
module to copy translations from base to specific views when module
translation is loaded. And since [2], the translated field's column is
either NULL or a JSON dict mapping language codes to text (the field's
value in the corresponding language).

To explain what happens exactly when new app is installed, let's suppose
we want to load module translation for the config {'en_US', 'fr_BE'} in
the following situations:

S1 (e.g. "Contact us" page):
-=-=-=-=-=-=--=-=-=-=-=-=-=-

```
generic_arch_db = {
'en_US': '<div>Generic (EN)</div>',
'fr_BE': '<div>Generic (FR)</div>'
}

- specific_arch_db = {
'en_US': '<div>Specific (EN)</div>',
'fr_BE': '<div>Specific (FR)</div>'
}
```

`_load_module_terms()` will copy translations for 'fr_BE' from generic
to specific `arch_db` (using generic translation dictionary).

result:

```
new_specific_arch_db = {
'en_US': '<div>Specific (EN)</div>',
'fr_BE': '<div>Updated Specific (FR)</div>'
}
```

S2 (new custom page):
-=-=-=-=-=-=--=-=-=-=

```
generic_arch_db = NULL

specific_arch_db = {
'en_US': '<div>Specific (EN)</div>',
'fr_BE': '<div>Specific (FR)</div>'
}
```

result:

Nothing to do here (only specific version), the specific translation
will not be updated.

S3 (e.g. website homepage):
-=-=-=-=-=-=--=-=-=-=-=-=-=

The generic view has no translated `arch_db` (only the 'en_US' version):

```
generic_arch_db = {'en_US': '<div>Generic (EN)</div>'}

specific_arch_db = {
'en_US': '<div>Specific (EN)</div>',
'fr_BE': '<div>Specific (FR)</div>'
}
```

`_load_module_terms()` will copy generic translations only for languages
available on "generic_arch_db" and the 'fr_BE' version will be lost.

result:

`new_specific_arch_db = {'en_US': '<div>Specific (EN)</div>'}`

The goal of this commit is to prevent this behaviour by keeping the
specific translated `arch_db` even when the generic value has no content
for the translation language.

Remark: This behaviour occurred while loading module translations,
as a consequence, the specific translations are also lost when the
website module is updated.

[1]: https://github.com/odoo/odoo/commit/94db81d8d28c4cbc7b51ae1688c9362042ee3619
[2]: https://github.com/odoo/odoo/commit/ef00294e7189359c47638c4a71626f1937395edb

opw-3083480

closes odoo/odoo#108477

X-original-commit: 91a9c870eede96040ac49d2375fe0e18342342e1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-21 17:41:57 +01:00
aliya 91c99b6653 [IMP] l10n_lu: adapt tax report to 2023 updates
Luxembourg added new fields and modified some rules for VAT reports: monthly, simplified, and annual.
- Add new fields
- Adjust formulas

task-2993792

closes odoo/odoo#108472

X-original-commit: f5101ea5f5da4e27a1e44490231eb8cf28c47e08
Related: odoo/enterprise#35154
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2022-12-21 17:41:54 +01:00
MerlinGuillaume 7766d24070 [FIX] stock: delivery address for entire packages
The delivery slip of a picking with an operation type where 'Move Entire
Packages' is enabled doesn't print the delivery address

Steps to reproduce:
1. Go to Settings > Inventory > Operations and enable 'Packages'
2. Go to Inventory > Configuration > Warehouse Management > Operations
   Type
3. Open operation type 'Delivery Orders' and enable 'Move Entire
   Packages'
4. Create a new transfer with operation type 'Delivery Orders', add a
   delivery address and a move and save
5. Mark as todo, put in pack and validate

Solution:
Always use the partner of the `move_lines` in the delivery address
Apply the same logic to the address used in the picking operations
report

Problem:
The delivery slip always uses the partner of `move_ids_without_package`
but there might not be any if the picking uses packages

opw-3091139

closes odoo/odoo#108465

X-original-commit: d113e0d7a5aa1c1f6bb933771cda4a3365361ba0
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-12-21 17:41:49 +01:00
roen-odoo e1aa9c1e39 [FIX] pos_coupon: correctly filter out global discount
Current behavior:
When a global discount is applied, it is considered as a regular
orderline when computing the order discounts. Because of this if you
applied a coupon and a global discount, the pos would add a discount of
infinity value.

Steps to reproduce:
- Create a promotion with a discount of 10%
- Create a product with no taxes
- Enable the global discount feature, and make sure the Discount product
  has a tax set on it.
- Create a new order, add the product, apply the promotion, and apply
  the global discount.
- The order will have a discount of infinity value.

opw-3094784

closes odoo/odoo#108441

X-original-commit: 1ea082b933a9583a9af1839164e919a0ac7512f9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-12-21 17:41:44 +01:00
Hoang Tran 6c15957a60 [IMP] stock: improve traceability report perf
When checking if a line in traceability report is unfoldable,
`_get_move_lines` is a costly operation and should be executed last when
all other conditions are satisfied.

closes odoo/odoo#108119

X-original-commit: 36697278b6130e066deb994d879a8567e45d3451
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-12-21 17:41:41 +01:00
Bastien (bvdn) 92375f487b [IMP] project: improve recurrence notebook and project sharing
Description of the features in this PR:

add the date deadline to the order of tasks (sort priority)
add the day of the week (only the first 3 letters) for the recurrence message in recurrent tasks
display the name of the project in the action instead of 'Project Sharing'

By changing the sorting order of the Project.Task model
some indexations in the tests didn't point to the right tasks
Now each task that has a deadline will be placed in front of other tasks (except for the high priority task)

Task-3034635

closes odoo/odoo#105701

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-21 17:41:39 +01:00
aath-odoo 9e5be974e0 [FIX] web_editor: spacing when changing format in checklists
Before this commit:

On changing style of a list item to normal it wrapped the content in a <p> which
results in extra spacing to next list item.

After this commit:

Now the content is not wrapped in a <p> which removes the extra spacing as well.

Task-2990517

closes odoo/odoo#108434

X-original-commit: b4cf3bcc893e345c25d863c0afaab71bbbfb404c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-21 16:36:54 +01:00
Lucas Vermeulen (luve) 0d0ab5d8db [FIX] e-commerce : hide pricelist if only one pricelist is available
If only one pricelist is available, it is not necessary to allow the user to click to dropdown the pricelist menu. If only one is available then the pricelist dropdown menu is hidden.

task-3058654

closes odoo/odoo#108418

X-original-commit: caba846362fdc443aa22e1997d7668fa4fd50d6d
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-12-21 16:36:51 +01:00
Adrien Dieudonne 87858d6e00 [FIX] web: status_indicator: 'unable to save' not aligned
Before this commit, the warning message was below the buttons.

Steps to reproduce:
- Accounting -> Configuration -> Payment Providers
- Select one of them (e.g. Stripe)
- Change the state to 'Test Mode'
- Try to save

Task-ID: 3106197

Related PR: https://github.com/odoo/odoo/pull/107227

closes odoo/odoo#108411

X-original-commit: 94f8c4875e3c79709450986ba03e7dee6cb60afe
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-12-21 15:35:55 +01:00
momegahed 636601c4a4 [FIX] payment: user is able to delete linked journals
Steps to reproduce:

1- install any payment acquirer (e.g. stripe)
2- configure the payment acquirer and link it to a journal
3- try to delete the journal
4- the journal can be deleted which will create an internal server
error when this payment acquirer is used

Bug:

There is no restriction on deleting `account.journal` linked to
payment acquirers

Fix:

add a restriction that forces the user to remove the journal from the
payment acquirers first

OPW-3089006

closes odoo/odoo#108403

X-original-commit: 3ec6fe4ab1df3e3368fd06ff0e18a240caf088e5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-12-21 15:35:53 +01:00
Benjamin Vray 48b79275f2 [FIX] website: fix table of content scrollSpy offset
Note: this bug is not possible to reproduce in 16.0 anymore, since the
Bootstrap 5 update. This commit is however kept as it makes the behavior
more efficient keeping the original fix's diff + it also cleans things
that were not necessary anymore since the "website-in-backend" update
that was made at [1].

Steps to reproduce the bugs (in older versions):
- In edit mode, choose the "contact" header template.
- Drag and drop a table of content snippet on the page.
- Save the page.
- Click on the table of content links.
- Bug => the links are not activated correctly.

The reason of the bug was that the scrollspy offset (calculated against
the header height) was not updating when the header height changed.

We did make a new call to scrollspy at the right time but that had no
effect because we first had to destroy the existing scrollSpy to be able
to make a new call that works.

opw-2951315

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

closes odoo/odoo#108223

X-original-commit: edd9d2b3df597786b2db416aed382dc5666623e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-21 15:35:50 +01:00
Dossogne Bertrand b213e479ba [IMP] {|website_}hr_recruitment: explicitate files purpose
Before this commit, recruitment models and views were mostly
set inside 'hr_recruitment.py' and 'hr_recruitment_views.xml'
respectively. In order to navigate easily, models are separated
into distinctive files.

closes odoo/odoo#105935

Related: odoo/upgrade#4048
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-21 15:35:44 +01:00
Joseph Caburnay 8da3b25b2e [FIX] sms: improper reload of form view after sms wizard on new record
**Issue:**

- Install crm (to have a form view with phone field).
- Click crm icon.
- Open list view.
- Create a new record.
- Enter title and phone number.
- Click sms button from the right of phone number field.
- On the wizard (dialog), enter a message and send.
- The wizard is closed but (BUG) the form view returns to the state where
  a new record is being created.

**Solution:**

The record containing the new sms message is properly created, however
the form view is reloaded with undefined `resId`, thus the form reloaded
as if it is "new".

The simplest fix is to specify the `resId` of the newly created record in
the `model.load` call as proposed in this commit.

closes odoo/odoo#108431

X-original-commit: edaf37eeb9244976ecc6c60aec089f9a2b4e3020
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-12-21 13:34:00 +01:00
Horacio Tellez c3f865e1dd [IMP] payment_custom: allow for recomputing of pending message
Before this commit (in the case the `custom_mode` is set to `wire_transfer`)
the model tries to find existing bank accounts to compute a pending message
with the necessary information. When bank accounts are not already setup
we end with an incomplete message.

After this commit we can at any point recompute the pending message and it
will be updated with the current bank information.

Task - 2511080

closes odoo/odoo#103903

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-21 13:33:55 +01:00
Antoine Guenet 9143cef960 [FIX] web_editor: do not remove styles of non-custom buttons
This prevents the removal of styles on non-custom buttons, which the
user may have applied to them back when it was possible to apply styles
to non-custom buttons. The removal of styles now only happens when
picking a new link style in the "Style" dropdown, which is what the
removal was intended for.

task-3096806

closes odoo/odoo#108384

X-original-commit: eb4edac560227b46efdcfe958e3b93e0b88def64
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-21 12:33:00 +01:00
Antoine Guenet 331346dc60 [FIX] web_editor: keep gradient background on custom button on edit link
If a custom button had a gradient background, clicking in it removed
that gradient. That is because that opened the link tools, which updated
the DOM before having fetched the custom colors.

task-3096806

X-original-commit: c3d22aa0e03588cc8781f015ada9002c6a0a4384
Part-of: odoo/odoo#108384
2022-12-21 12:33:00 +01:00
Olivier Dony 9bd642de7f [FIX] tools/transpiler: avoid nested quantifiers
It made the regex much slower in case of non-match, due to backtracking.

closes odoo/odoo#108046

X-original-commit: 56b1b17d6fdf493368ce219f981f94d9efdc9b7f
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-12-21 11:26:32 +01:00
Guillaume (gdi) 82fff80020 [FIX] website: allow step to fill more than 9/12 of the page width
Prior to this commit, the steps block options could not support a column
that was more than nine out of twelve (bootstrap columns) wide.

Steps to reproduce the bug:
- Drop a block step on a page
- Set a width of 10 columns on the first step
- Set a width <= 2 columns on the second step

=> the connector is not well displayed.

task-3033126

closes odoo/odoo#108362

X-original-commit: 9c4e0eaa60ad89140661e3c297ea1b4e22d6faae
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2022-12-21 09:58:54 +01:00
Samuel Degueldre deacb8c94b [FIX] web: remove incorrect usage of patch in mock_env
Previously, when restoring service metadata after clearing it, we would
use the patch function instead of an Object.assign. This is probably a
relic of a previous version of the code that used patchWithCleanup, but
in this context it is completely wrong, as we are giving something other
than a string as the patch name and no object at all as the patch value.

closes odoo/odoo#108390

X-original-commit: b83ab5061fe15e69f6c0703baf6f1eec61332f0e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-21 07:59:57 +01:00
Toufik Ben Jaa 17a25ee69d [FIX] web: incorrect CSS selector
- When clicking on settings we get a crash for an incorrect
    CSS selector.
    `Caused by: SyntaxError: Element.querySelectorAll: 'footer:not(field footer' is not a valid selector`

    This issue happens on outdated version of Firefox (tested on firefox 78)

closes odoo/odoo#108371

X-original-commit: 68b05bc9911f899a2b8a8c3335af90d9ed8129cb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-21 07:59:55 +01:00
Victor Feyens 036c4a4886 [FIX] sale_management: do not recompute quote template on company change
closes odoo/odoo#108380

X-original-commit: f143893af2d1bd2c167c1aa2e23e0bedc1a46c7a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-21 00:38:48 +01:00
Aaron Bohy 02244890d4 [FIX] web: kanban: quick create buttons misaligned
In a grouped kanban view with progressbars, click on a progressbar
to filter a column, and then click on the "+" icon of that column
to quick create a record (e.g. in a project). Before this commit,
the buttons ("Add", "Edit" and trash icon) overlapped the bottom
of the card.

This is due to special rules applying when a progressbar filter is
applied. Those rules aim at grouping non filtered out cards on the
top, s.t. the other ones (e.g. a dragged&dropped card) are displayed
below.

It was decided that this grouping isn't really wanted anymore. For
instance, it could lead to weird UX if the filtered column contains
a lot of records, as the dropped one would appear at the bottom,
i.e. would not be visible for the user.

This commit thus simply removes those rules, which fixes the issue.

closes odoo/odoo#108396

X-original-commit: 69fa3654e479f427606d05cdb244fd24225f9eeb
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-12-20 18:31:53 +01:00