Commit Graph
155638 Commits
Author SHA1 Message Date
Juan Daniel Alvarez f255306e56 [CLA] add new members to Trescloud CLA
closes odoo/odoo#103848

X-original-commit: 7683a4658a4d9893107d8d307486d36d5a762128
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-10-22 22:26:52 +02:00
Thanh Dodeur 3698a189c0 [FIX] mail: allows the callMainView to adapt its content on resize
Before this commit, only the window resize would trigger a rerender of
the mainCallView. This commit makes sure that any resize of the
component will trigger a recomputation of the content layout.

closes odoo/odoo#103818

X-original-commit: 0d95da350898b6555a59d379b03181f688456c9d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-22 01:33:29 +02:00
Bruno Boi c964462774 [IMP] web: update owl from 2.0.0-beta-22 to 2.0.1
Release notes: https://github.com/odoo/owl/releases/tag/v2.0.1

- fix: runtime: correctly throw an error for duplicate object keys
- fix: parser: give t-set-slot="default" priority over the content
- fix: blockdom: correctly reorder children in heterogeneous t-foreach
- fix: portal: correctly move portal content when target is after it
- fix: blockdom: fix event_catcher traceback when a parent component has an empty child

closes odoo/odoo#103847

X-original-commit: be996cf423ce09be4e4661c0b42a97d92a4dcdb4
Related: odoo/enterprise#33097
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-10-21 23:13:48 +02:00
Du-ma c41228a27d [FIX] base: make data argument optional
It was not always set (e.g. in the generate_email call of
mail.template) and it executes methods like _render_qweb_html where
data was already optional.

closes odoo/odoo#103840

X-original-commit: ddb2bf9f9cb6ea3a4bbdc4fb68c7fbcb0e66aa43
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-21 22:18:52 +02:00
qsm-odoo 9f3463aad3 [FIX] web_editor: prevent crash when colorpickers receive split values
Steps to reproduce:
- Edit
- Add a snippet with columns
- Save
- HTML editor
- Set up a border on one column of the snippet with different colors for
  the top/right/bottom/left sides
- Edit
- Click on the column => crash

This is only an example, but if a colorpicker widget is linked to a
SnippetOption instance's `selectStyle` method designed to handle the
"border-color" property of an element, the value received can be split
if the item uses different colors for its top/right/bottom/left borders.
For instance, you could receive "red blue" if the item has red top and
bottom borders and blue left and right borders. In that case, the
colorpicker widget code would try to add the class "bg-red blue" on its
preview item which would crash because of the space inside).

After this commit, we simply do not show any color for this case.

opw-2803311

closes odoo/odoo#103842

X-original-commit: 484230481cd7195e2c992e673a2b6e627baf505d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-21 21:21:47 +02:00
Raouf ead52d72a7 [FIX] project: add missing stage when import tasks
Before this commit:
Let's consider project P1 having no stages.
Let's consider project P2 having Stage 1, Stage 2
When importing tasks via csv file:
- Task 1 for project P1 and Stage 1
- Task 2 for project P1 and Stage 2

Stage 1 and Stage 2 are still assigned only to project P1.

After this commit:
Stage 1 and Stage 2 are now assigned to P1 and P2.

Task-2996393

closes odoo/odoo#103819

X-original-commit: 2e6a7741dd2c993daa1b1aafe4ebd422cd57235c
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-21 18:10:59 +02:00
sofiagvaladze 470674ead4 [FIX] hr_holidays: correct the dashboard validity date
Prior to this fix, closest_allocation_to_expire was the upcoming allocation regardless
whether there were remaining leaves on it or not.

That lead to misleading information on the dashboard.
For example, let's say user has two allocations and used up the first allocation
and has X days left on the second allocation. Still, the user will see that they have
left X days (Valid until -- the first allocation expiration date --). Which is misleading,
Instead they should see X days (Valid until -- the second allocation expiration date --).

task - 2978789

closes odoo/odoo#103813

X-original-commit: dee3552659bec78fbbce4e8af155b3259e721dbd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-21 18:10:54 +02:00
David Monjoie eb22913e20 [REV] web_editor: reactivate collaboration conflict detection
This reverts commit 77a8f7f9fded793948daf0ebef67c2674c7a79f8.

closes odoo/odoo#103809

X-original-commit: d3855e9852be6549b80c63fe6cf27ed647f74df1
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-21 17:17:21 +02:00
Hubert Van de Walle (huvw) 7b948a731f [FIX] web: discard rejected reloadProms in magicReload
Steps to reproduce:

  - Go to a list view with multiple items
  - Click on an item
  - Delete it
  - Go back in history twice (Using the browser navigation) to return to the list view
  -> We can't click on another record

opw-2854113

closes odoo/odoo#103808

X-original-commit: 92c90823139b413c8289d1c323ad694fc8220a61
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-21 17:17:19 +02:00
abd-msyukyu-odoo 495628336b [IMP] web_editor: prevent table handle in contentEditable false
When a table isContentEditable=false:
- Don't show the resize cursor
- Don't show the table ui menu (which allows to move columns/rows)

Currently in Knowledge, when an embedded view contains a `<table>` element, it
was possible to use the editor to edit rows and columns of the view and it is
not intended. Those table are not editable, and as such the menu to edit them
should not be shown.

Task-3000318

closes odoo/odoo#103805

X-original-commit: aec6b02dacf02f18b53cb8b31ffbb52772f5ac27
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-10-21 17:17:16 +02:00
Benjamin Vray 2c46e15198 [FIX] website: prevent animated navbar flicker
Before this commit there was an issue with the header effects (except
the 'Scroll') if the page did not have much scroll height when the
header decreases in height when scrolling down. When this issue appeared
it was impossible to reach the bottom of the page.

This was due to the fact that when the header size is smaller when
scrolled (e.g. height scrolled logo option), the padding-top of the
`main` is decreased and therefore the scroll height of the page too..
Which meant that, during the transition that changes the height of the
header, this decrease in scroll height immediately increase the height
of the header, then decrease, etc. in an endless loop.

This commit fixes that by no longer triggering an animation that changes
the height of the header if the scroll height is too short.

This commit also fixes an issue with the standard effect which was not
properly destroyed and left a 'translate transform -100%' on the header
when changing the "standard" effect to a "scroll" effect and the page
was scrolled.

opw-2812482

closes odoo/odoo#103804

X-original-commit: 46993910eb31e9cbaf60a7d4e4c3014d60e7bb2b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-21 17:17:12 +02:00
Walid HANNICHE (waha) d0d7dbb00d [FIX] base_address_extended: enforce city in "Contacts & Addresses"
Steps to reproduce:
-Install "base_address_extended" module ("base_address_city" in 15.0)
-Go to an already existing contact.
-Add a new address to this contact.
-Use a country that enforces cities (contact>configuration>countries).
-No drop menu for cities is displayed.

Bug:
unable to select all the city fields in the inherited XML views

Fix:
selected the correct city fields

opw-2960154

closes odoo/odoo#103775

X-original-commit: 829541fa509f84cf4c8b0e22181770267a3e6e59
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-10-21 17:17:07 +02:00
ArnaudVerlaine d4e3a44a35 [IMP] account: new tooltip for delivery address
closes odoo/odoo#103547

Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-10-21 17:16:58 +02:00
Pedro M. Baeza 205ec645f0 [FIX] base: config fields_get arg name mismatch
The arguments for the method `fields_get` are `allfields` and
`attributes`, but this model is overriding it with different name,
provoking the error:

TypeError: fields_get() got an unexpected keyword argument 'allfields'

This commits fixes it renamign the argument to the correct one.

TT40013

closes odoo/odoo#103771

X-original-commit: 3884136b73b1efe4de6a28b9447a72a5d257666c
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-10-21 16:15:03 +02:00
Shawcker be7e487dfd [FIX] mail: fix tag style not applying color/box-shadow
Currently, the rounded-pill around many2many_tags_email tags is not rendered correctly: the color and the box-shadow style attributes are not applied.

This commit fixes that by adding the o_tag class to email tags, in order to apply the o_tag.o_tag_color_0 css rule.

closes odoo/odoo#103770

X-original-commit: 2a61a3c17c933c712c05a10359ee0d8bffa1dccc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-21 16:15:00 +02:00
Didier (did) 365f5a9863 [IMP] mail: introduce notification handler mail.record/insert
Some of our current bus notification only insert data in the models system. We
can now simplify the way we handle them by using a generic `mail.record/insert`
handler.

closes odoo/odoo#102863

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-21 15:19:18 +02:00
pedrambiria 192b212123 [FIX] pos_restaurant: synchronize orders in TicketScreen
Before this commit: if more than one user work on a PoS restaurant, the
synced validated orders wouldn't remove from other user devices.

Steps to reproduce the issue:
1. Create a PoS resturant
2. Login to the PoS with two different browser
3. Create some orders with some products in one of the browsers
4. Complete the orders in another browser
=> Orders will not remove from the first browser

The solution is to retrieve the latest orders of every table when going to
the TicketScreen

opw-2925193

closes odoo/odoo#100353

Related: odoo/enterprise#32871
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-21 15:19:13 +02:00
Kevin Baptiste e2232c8909 [FIX] hr_attendance: use correct reference for kioskDelay
A traceback would occur in some situations because of incorrect
reference to `this.kioskDelay`.

closes odoo/odoo#103753

X-original-commit: 5069c8fd1cee063827873de0f6c2d9fe938337a9
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-21 14:06:22 +02:00
maximilien(malb) 5f00654491 [FIX] account: reconcile model display improvement
Most of the dropdown of the account reconcile model view were weirdly displayed, the case was too small for the text, by removing the class oe_inline most of the dropdown were fixed, and for the other just a slight modification on the width did the job.

Also on the left column the two first line were not aligned with the rest, same for the right column on the first line, now it's fixed but I had to put the invisible in the field

Other thing, the counterpart entries were too much on the left of the page due to a useless group, it's now removed

Also change some display name and added the translation

closes odoo/odoo#103682

Task-id: 3000402
X-original-commit: 487cc0959991d804a48f44b914540786a85f180f
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-21 14:06:16 +02:00
Demesmaeker 183ad845eb [FIX] sale: rework the test
Be clearer on what is tested to avoid confusion and potentiel error

closes odoo/odoo#103678

Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2022-10-21 13:06:16 +02:00
Xavier Morel 75adabf11f [ADD] *: examples of Model.grouped
closes odoo/odoo#101522

Related: odoo/documentation#2783
Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-10-21 13:06:09 +02:00
Xavier Morel d50db0587b [ADD] core: ORM-level internal grouping utility
When looking to fetch grouped data from the database, `read_group`
should work(-ish), especially with support for `array_agg`. This also
means this need should be more or less solved around RPC: client can
either `read_group` or group on the client side.

This leaves a glaring hole in the fabric: there's no convenient tools
to apply grouping to recordsets. `itertools.groupby` exists, but it
requires that the input be grouped by the key function, and it yields
an iterable of items which is not the most convenient for recordsets.

This here utility:

- is exclusive to recordsets
- returns a mapping of grouping keys to subsets of the input recordset
- keeps the prefetching of the source recordset
- allows grouping on a field, or an arbitrary (callable) key
- should work even on "new records" (aka should be suitable for
  onchanges / arbitrary compute functions)

While the method is RPC-compatible, it's not especially designed for
that, it is likely a much better idea for the client to `read` the
data they need then group that client side on whatever criteria they
are interested in, or `read_group` the aggregated information they
need directly if that's an option.

Part-of: odoo/odoo#101522
2022-10-21 13:06:09 +02:00
Dossogne Bertrand 774ca9da1a [FIX] hr_holidays: fix multiple-employee leave
Before this commit, creating a leave for multiple employees
from the manager's page allowed to create leaves regardless
of the concerned employee's allocations.
After this commit, an error message will be displayed to inform
which employee cannot take that leave.

Also removes unused imports.

task-2995120

closes odoo/odoo#103733

X-original-commit: 636a8276e6797c1d8fe43da61d2fd26b558bfa45
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-21 12:06:04 +02:00
Xavier BOL (xbo) dea3517a55 [REM] project: remove unused view
This commit removes a tree view of `project.task` because this view is
not used at all even in the Project app.

closes odoo/odoo#103702

Related: odoo/upgrade#3982
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-21 12:05:56 +02:00
Malay Khamar 5333fe2acc [FIX] hr_org_chart: fix the hr ORG chart parent employee redirection issue
closes odoo/odoo#103726

X-original-commit: 1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-21 11:09:22 +02:00
Thomas Lefebvre (thle) 3e3defed94 [IMP] hr_maintenance, maintenance, l10n_ch, l10n_generic_coa, l10n_il: equipments renamed equipment
Modules:
- hr_maintenance;
- maintenance;
- l10n_ch;
- l10n_generic_coa
- l10n_il.

The plural of "equipment" is "equipment" and not "equipments"

changes in the enterprise version: odoo/enterprise#31498

Remark:
Runbot test log:
Two fields (equipment_count, equipment_ids) of maintenance.equipment.category() have the same label: Equipment. [Modules: maintenance and maintenance]
Two fields (equipment_count, equipment_ids) of hr.employee() have the same label: Equipment. [Modules: hr_maintenance and hr_maintenance]
Using "Equipment Count" to differentiate them

opw-2981186

closes odoo/odoo#100558

Signed-off-by: Adrien Widart <awt@odoo.com>
2022-10-21 11:09:14 +02:00
Sergey Shebanin 0c0656eadd [FIX] web: statusbar field on mobile doesn't show current value
closes odoo/odoo#103715

X-original-commit: a045d4555f3546bf9b0327b24f5c6f3fecf247f1
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-10-21 10:11:14 +02:00
Kevin Baptiste cbe990e1ce [FIX] hr: put label and name together on public profile
The label was above the profile picture and the employee name below it.

closes odoo/odoo#103690

X-original-commit: d6e5aee5ba242a7524e17fd7f9d1a55c3d25df7a
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-21 09:17:08 +02:00
Jacky (trj) 503213e3cf [FIX] point_of_sale: duplicate message in the chatter session
Due to the 7e23eda02f change, cash control is now
independent of accounting and is only done in the Point of Sale. A mistake was made
in the refactor, a message was sent in the bank statement and in the session before.
Now we don't use the bank statement chatter so it should only be sent to the session

closes odoo/odoo#103684

X-original-commit: 6968c7761ef7b564950b9a672ee875975d249c83
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-21 09:17:01 +02:00
Kevin Baptiste c84fba790a [IMP] hr_work_entry_holidays: add Work Entry Type to Leave Type
Adds the work entry type in the list view of the leave types.

task-3031983

closes odoo/odoo#103517

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-10-21 09:16:58 +02:00
Jacky (trj) 314e463c2f [FIX] point_of_sale: call method on right object
Small error where the method is not called on the right object

closes odoo/odoo#103283

X-original-commit: 269b89ddfe9f8f6b03552ca4f5c57a889fbe9ac0
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-21 09:16:56 +02:00
Loan (lse) a03f5cd631 [FIX] web: improve error message when missing the format type of field
To reproduce:
1. Create a (incorrect) view manually. For example, inherit from
`res.config.settings.view.form` and do add the following view architecture:
```xml
<data>
  <xpath expr="//div[hasclass('settings')]" position="inside">
    <field name="field-dont-exist" widget="upgrade_boolean"/>
  </xpath>
</data>
```
( In practice, Odoo will refuse to let us save the view if it is incorrect
(we can bypass that by pushing directly in the database for testing) )

-> When trying to open the settings app, you will have a cryptic JS error:
`TypeError: field_utils.format[(formatType || this.formatType)] is not a function`
The goal of this PR is to improve the error to ease its correction.

Note: This issue can happen in practice after an upgrade or a failed
uninstallation of a module.

OPW-2952309

closes odoo/odoo#103686

X-original-commit: 73dccc3e51472f76cf5cf32a4fbd48d0b58b5c36
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-21 08:23:54 +02:00
Walid HANNICHE (waha) bfe5268ba2 [FIX] web_editor: UI freeze on RTL languages
Steps to reprodue:
- enable any rtl language (arabic)
- move to the product page for exemple
- the page is frozen (dependecy loop in css)

Bug:
when the CSS gets minified the missing semicolon error spreads and
produce an invalid file

Fix:
added the missing semicolon

opw-3019173 3032064 3032250 3035077 3034712 3035077 3023730 3022962

closes odoo/odoo#103699

X-original-commit: 8048bdac4cec56edd92c68f7041b802376f9372c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-10-21 00:08:41 +02:00
John Laterre (jol) d3264389c9 [FIX] account_asset: fix move display name
Steps to reproduce:
- Install Accounting App.
- Go to the Accounting App.
- Click on 'Accounting' -> 'Assets'.
- Create a new asset and confirm it.
- Click on 'Modify Depreciation'.
- Select the 'Sell' action.
- Click on the empty 'Customer Invoice' field.

Observed behavior:
The invoices are listed based on their name, which is not very explicit/helpful.

Desired behavior:
In addition to the name, the partner and the date are also displayed in the list.

The search is also improved, in order to use the partner name
(in addition to the invoice name) to filter invoices.

closes odoo/odoo#103696

X-original-commit: 4075c4512cfb44cc3add8270b373f3a4e1e80419
Related: odoo/enterprise#33026
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-10-20 20:21:43 +02:00
Arthur Detroux (ard) da9b81f28d [FIX] website: fix snippet social media values cache
This `s_social_media` snippet option uses a variable defined in the
module's scope to store social media values. This
reduces the amount of RPCs needed to fetch the data as they will only be
done once per edition.

Prior to commit [1], this cache would only exist as long as the page
lived. Which means that switching website, switching page or going in
the backend would reset its value. Commit [1] moved the edition in the
backend which means that the cache would persist between pages but more
importantly, between websites, only resetting if the backend was
refreshed or left.

Steps to reproduce:
- Go on website 1
- Modify the URL for facebook in the footer
- Go on website 2
- The value is the same when it should still be facebook.com/Odoo

This commit fixes that by resetting the cache when the editor is
destroyed.

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

closes odoo/odoo#103689

X-original-commit: 3efb726575679f62f9ee2894193323bfe45d7938
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-20 19:09:57 +02:00
Aaron Bohy f912acbd9e [FIX] hr_recruitment: fix t-groups typo in arch
Typo introduced by [1] (t-groups has no effect).

[1] 8b91cab67f

closes odoo/odoo#103674

X-original-commit: a0dff6da8c0e3eca8d1b6210f6cc84f57150c408
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-20 18:12:50 +02:00
Valentin Vallaeys (vava) 034218a5dc [IMP] payment: prevent creating payment tokens
Payment tokens should not be created manually, as it is useless,
confusing and potentially harmful. They should only be created alongside
payment details of a customer payment method.

task-2848379

closes odoo/odoo#99915

Related: odoo/enterprise#31199
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-20 18:12:44 +02:00
Nemael 76d45c2d29 [FIX] mail: emoji search bar focused on mobile
The emoji search bar should not be automatically focused when using odoo
on mobile.

This commit re-introduce the auto-focus of the search bar, and also
cancel auto-focus if using odoo on mobile

Task-3015386

closes odoo/odoo#103672

X-original-commit: 282a09c5d62d32a35636c9357033b8f18631b85f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-20 17:17:20 +02:00
Bruno Boi d54bff857a [FIX] web,calendar: calendar and popovers design
Fix the hatching and striking effects for events
by moving some scss rules to the right place:
- o_event_hatched
- o_event_striked

Various fixes for the calendar popovers to display properly, such as:
- year scale popovers
  - proper popover body padding and font-size
  - style that depends on attendee status
- other scales popovers
  - inverse the condition when the popover footer must shrink

closes odoo/odoo#103661

X-original-commit: 917d8e4123517c73d8bd6a4bd83becf1b0ee1090
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-10-20 17:17:09 +02:00
Bruno Boi c9bec348db [REM] web: calendar unused design classes
This commit removes some style that is dead code, related to classes:
- o_cw_custom_hover
- o_cw_nobg
- o_calendar_hatched
- o_calendar_hatched_*
- o_calendar_striked
- o_calendar_striked_*

X-original-commit: 4a19e031ae70a44369970147dd1735da66a9ea64
Part-of: odoo/odoo#103661
2022-10-20 17:17:09 +02:00
Alexandre Kühn 00b4da36bb [IMP] mail: introduce Chatter/shouldReloadParentFromFileChanged
This commit introduce a field to determine condition for
reloading chatter parent view when a file has changed.

This allow patching the field so that more conditions
could trigger a view reload.

Task-2886634

closes odoo/odoo#103660

X-original-commit: 3e097db1c92a316fb7c5de0ce6124ce5ea7e07be
Related: odoo/enterprise#33005
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-20 17:17:03 +02:00
Younn Olivier 86e5ae7954 [FIX] website: fix wrong selector creation in clickOnSnippet tour util
Since [1], there would be a traceback due to a wrong DOM selector in the
`configurator_tour`.
Indeed, completing the configurator will activate the configurator_tour
asset which is calling a broken clickOnSnippet tour util to generate an
appropriate homepage tour.
It would end up with the following selector:
`o_website_preview[data-view-xmlid='website.homepage'] iframe #wrapwrap .#wrap > section:nth-child(2)`
See the `.#wrap` which is incorrect and make jQuery crash.

This is because [1] adapted the tour utils to the new WebsitePreview
client action, but the clickOnSnippet function was wrongly changed and
could now be generating wrong triggers selector.
It was creating invalid selectors as it was concatenating a `.` with the
provided string parameter which was basically a class without the `.`,
like `s_popup`, but not in all cases. A whole valid selector could also
be provided, meaning that concatenating it with a leading `.` would
result in incorrect selector.

Basically, this commit revert the change made on [1] in `clickOnSnippet`
to restore the code of [2] that was preventing the wrong selector
creation.

[1]: https://github.com/odoo/odoo/commit/99b50d18e220aedf14de806f4bf1b2d35c32de35
[2]: https://github.com/odoo/odoo/commit/e8a5af2e28a4724f86783746706cb59175f086bf

opw-3026167

closes odoo/odoo#103651

X-original-commit: 26c4e4a13b642e2856495a8c1f5a36afe3996c02
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-20 17:17:00 +02:00
Arthur (goa) a9702cee39 [FIX] snailmail: dont resend without credits
We are spammed by some accounts that don't have credits anymore.

With this commit, when we try to send letters from the cron, whenever we
meet the CREDIT_ERROR error_code, we stop trying to send the letter.

task-2930455

closes odoo/odoo#103530

X-original-commit: f1fed40e2f853ecd9e5c24e0882c67f9505155c2
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2022-10-20 17:16:58 +02:00
tsm-odoo c79016fbc6 [FIX] website_livechat: access error when closing empty chat window
Before this commit, closing an empty chat window with a non admin user
would have led to an access error popup.

Indeed, the `website_livechat` modules overrides the `_execute_channel_pin`
method of the `mail.channel` model in order to unlink the channel if no
messages were sent. The issue is that only the administrator is allowed
to delete channels.

This commit fixes this issue.

task-3028153

closes odoo/odoo#103656

X-original-commit: ece201874a75256c2286f85d1657c518b3a55ddb
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2022-10-20 16:15:59 +02:00
Victor Feyens e731876890 [IMP] product: do not compute pricelist price when not needed
For the sale scope, we added a new 'pricelist_item_id' field, caching
the pricelist rule used for the price_unit and discount computation.

This feature uses the new `_get_pricelist_rule` method, which only returns
the pricelist rule matching the SOline values.

But the `_get_pricelist_rule` method still does all the price computation
for 'nothing'.

This commit skips the price computation (and the search of sub-rules if
the rule found is based on another pricelist).

closes odoo/odoo#103629

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-10-20 16:15:57 +02:00
Antoine Vandevenne (anv) 107de3fceb [FIX] payment: various fixes related to payment tokens
- The name of the field `provider_id` on `payment.token` should not be
  "provider Account" but "Provider".
- The computation of the display name of tokens crashed when the field
  `payment_details` was empty.
- The form view of tokens missed a <group/> element to better display
  the fields.

closes odoo/odoo#103621

X-original-commit: ae4079807d29996f4edfd295dcfa194973ada8db
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-10-20 16:15:54 +02:00
Aaron Bohy b7dfc7f71c [FIX] web: SearchPanel: fix race condition with sections
This commit fixes a race condition spotted by the click all test,
in the Lunch application. To reproduce, go to Lunch > Configuration
> Products, in the list view, toggle filter "Archived" s.t. there's
no record matching the domain (and nothing displayed in the search
panel anymore), then switch to kanban view, and remove the filter.
On a multi-build, this scenario fails ~4 times out of 10.

The issue occurs because a re-rendering of the search panel is
triggered by its parent (because of the filter change), but the
search panel didn't compute its active sections yet (this is done
when the "update" event is triggered on the search model). The
exact situation is hard to reproduce, but if there are non empty
sections in the model, and the active sections haven't been computed
yet in the search panel, it crashes. For instance, it happens all
the time by delaying the promise returned by "_fetchSections".

This commit doesn't introduce a qunit test because we didn't manage
to reproduce the exact same situation in a test. This makes the
Lunch click all test pass all the time though.

closes odoo/odoo#103638

X-original-commit: b84df7e08b4d413de2e8a0b1df6cb8d6ad4b08cf
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-20 14:14:56 +02:00
maximilien(malb) 5c57230536 [FIX] base: Missing colspan
Since the recent css change the text of the description field was no taking all the place he could, so it was impossible to read, thanks to the colspan it's now the way it was intended

closes odoo/odoo#103634

X-original-commit: 93d29540ff6a6756a84d904047d4e9554d6d9ad7
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-20 14:14:54 +02:00
maximilien(malb) 2ed62effd2 [FIX] project: improvement on the config view
Before this commit a content-group was useless it is now removed, moreover the setting for the default plan needed to be changed to look like the other setting of the page.

closes odoo/odoo#103633

Task-id: 2992668
X-original-commit: 8245ad33217531ab046d463d8fb91c8aa91066b7
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-20 14:14:51 +02:00
Yannick Tivisse f312fb02ef [FIX] hr_holidays: Allow creating time off in the past
Purpose
=======

In the case a time off is created:
- In the past
- Using support documents

An invalid user error is raised in the interface, because the webclient
is sending values for the field 'supported_attachment_ids' (Example: [(6, 0, [])])
which is writing by inverse relationship on the field 'attachment_ids'.

On the other hand, it should be possible for an employee to add attachment
on the time off after it has begun.

closes odoo/odoo#103626

Taskid: 3032232
X-original-commit: c32c22ec267626322aebb7af4ee36b573c71760d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-10-20 14:14:48 +02:00