Commit Graph
145749 Commits
Author SHA1 Message Date
Thibault Delavallée 9146b68b3f [IMP] test_mail: add test for reply_to computation on records
Purpose is to assert current behavior as this may change in master. Two
kind of tests are added: performance and multi company.

Task-2661036 (Performance tests data cleanup)
Prepares Task-36879 (MultiCompany Aliases)

closes odoo/odoo#77845

Related: odoo/enterprise#21456
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-05 16:53:46 +00:00
Thibault Delavallée 201d6bf771 [FIX][IMP] test_mail: be sure performance test include mail gateway
Purpose of query counter tests is to try to match real life use cases. In
mail those generally involve a correctly configured mail gateway. This is
why we set those parameters in performance tests, leading to a small increase
in some counters.

Task-2661036 (Performance tests data cleanup)
Prepares Task-36879 (MultiCompany Aliases)

Part-of: odoo/odoo#77845
2021-10-05 16:53:46 +00:00
Thibault Delavallée f3a24527d2 [IMP] test_mail(_*): improve performance data preparation
Cleanup a bit ``BaseMailPerformance`` class: have more data available done
in setUpClass, then remove unnecessary code in sub classes. Overall purpose
is to lessen boilerplate in sub modules.

Task-2657021 (Performance tests cleanup)
Prepares Task-36879 (MultiCompany Aliases)

Part-of: odoo/odoo#77845
2021-10-05 16:53:46 +00:00
Thibault Delavallée c0d16beb7e [FIX] various: update query counters to last runbot state
A lot of counters are not up to date. Seems some optimizations were done
allowing to lessen query counters.

Task-2661036 (Performance tests data cleanup)
Prepares Task-36879 (MultiCompany Aliases)

Part-of: odoo/odoo#77845
2021-10-05 16:53:45 +00:00
Thibault Delavallée 974f073b11 [FIX] test_mail: improve multicompany activation
Let us use existing data for multi-company tests created when calling a specific
method available in mail tools. We may then remove TestMailMultiCompanyCommon
that is used in a single test, with an hardcoded currency_id (hem).

Task-2661036 (Performance tests data cleanup)
Prepares Task-36879 (MultiCompany Aliases)

Part-of: odoo/odoo#77845
2021-10-05 16:53:45 +00:00
Thibault Delavallée abd48cfb03 [IMP] mail: reorganize code added for discorduss
Just putting code where it belongs, in sections about access rights / discord
API. After a lot of updated some cleaning is always welcomes. This prepares
future code renaming and improvements.

Task-2661036 (Performance tests data cleanup)
Prepares Task-36879 (MultiCompany Aliases)

Part-of: odoo/odoo#77845
2021-10-05 16:53:45 +00:00
Thanh Dodeur af015814f6 [FIX] mail: prevent traceback when the audio of a peer is loaded
Before this commit, we would reset the audio of a peer before setting a
new one which is not necessary as the track remains the same for the
whole lifetime of the transceiver (and therefore the peerConnection).

Moreover, calling `pause` on the audioElement could lead to a race
condition with the following `play` and lead to a traceback.

closes odoo/odoo#77883

X-original-commit: e0b957cd3cd657ad15168e35fdaaeebccb7be4be
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-05 15:42:04 +00:00
Romain Derie 7a00f107aa [FIX] website_sale(_stock): remove dead code
When the `or` was introduced [1], the company_id was not required [2].
The required was added later somewhere between 11.0 and 12.0 [3].

Reaching the `or` condition was therefore not possible anymore.
Extracted from https://github.com/odoo/odoo/pull/77308

[1]: https://github.com/odoo/odoo/blame/10.0/addons/website_sale/models/sale_order.py#L350
[2]: https://github.com/odoo/odoo/blame/10.0/addons/website/models/website.py#L165
[3]: https://github.com/odoo/odoo/commit/2a9a514551ca951db656e139cb4d177657eb95e7

closes odoo/odoo#77882

X-original-commit: c33ba174d0bd534794e3daa7dc99f84140ba6d22
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-05 15:41:59 +00:00
Benoit Socias f2a44d192d [FIX] web_editor: handle gradient styles only when gradients allowed
Before this commit the progress bar options were broken because the
stripe effect is achieved by a gradient in the CSS, but
`SnippetOptionWidget` recognized it as a manually selected gradient, and
thus applied the gradient specific handling (such as neutralizing the
background-image when a color is selected).

After this commit the special handling for gradients is only applied
where gradients are expected to be selected manually (i.e. when the
`withGradients` parameter is set).

task-2662401

closes odoo/odoo#77881

X-original-commit: f873c1d1eb05fa25717817c85899629103dcada3
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 15:41:55 +00:00
Thanh Dodeur e6fbdb91c8 [FIX] mail: remove the dataChannel entry when removing a peer.
Before this commit, the entry in `mailRtc._dataChannels` was not removed
when removing a peer, which meant that `mailRtc._dataChannels` could
contain old closed dataChannels. Moreover, the call to `close()` on the
dataChannel was not guarded, which could lead to tracebacks.

For example, if a peer was removed before creating its dataChannel (like
in crashes or successive connection recovery attempts), `close()` was
called on `undefined`.

this commit fixes this issue.

closes odoo/odoo#77880

X-original-commit: da3fce19157a07fc1abbb6d188746d4a00d3a344
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-05 15:41:51 +00:00
Romain Derie de0308e87f [FIX] web: remove the command palette from the frontend
There is multiple issue with the palette in the frontend:

First, the command palette is bound to CTRL+K, which need to be bound to link
creation as this is an universal keybind, as CTRL+P CTRL+F are, as any other
edition app in the world does.
(Note that link creation is not only for edit mode but also for end user, eg
forum post)
History of the keybind:
1. Command palette was introduced with CTRL+K
2. The keybind was changed to CTRL+M to restore CTRL+K for link edition, see
   8727ed2766
3. The keybind change was reverted and command back to CTRL+K, as CTRL+M can't
   be used on MAC

Second, the command palette do not correctly work in the frontend, the menu are
not opened when an entry is selected, and the submenu are not shown in the palette
when the menu was opened before opening the palette.

Lastly, the CTRL+K in frontend does not only open the command palette but it
also create a link in the background of the palette being opened.. which
result in very bad usability..
The one expecting a link has to deal with a palette.
The one expecting a palette has had a link created without really noticing it.

task-2659885

closes odoo/odoo#77879

X-original-commit: 6135b04738a58564592f438364f5a147ce9c471f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-05 15:41:46 +00:00
qsm-odoo ea93bf26f6 [FIX] base: lazy load external files if part of a lazy loaded bundle
In the payment_adyen module, files of adyen are added as part of the
assets_frontend bundle. That bundle is lazy loaded on the website... but
those external files were not, as not added within the bundle itself.
This commit fixes that, properly lazy loading "remaining" files
out of a lazy loaded assets bundle.

closes odoo/odoo#77877

X-original-commit: 8dd71bdc42c8d4ab3373a2a0601c93d1687aabca
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 15:41:42 +00:00
Thanh Dodeur 023eee86f4 [FIX] mail: prevents frozen video elements
Before this commit, when a video track ended unexpectedly, the peers
were not notified that the remote track ended, which made it so that
inactive video elements remained on screen.

This commit fixes this issue.

closes odoo/odoo#77875

X-original-commit: d868582b2b409ec01bc4983429dea723f27f5513
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-05 15:41:38 +00:00
Victor Feyens 92d4987acb [FIX] sale: enable demo SO's currency
Needed for demo flow of payment links.

closes odoo/odoo#77874

X-original-commit: 7b51d4e0ae5a9a10cfd548bc6307dac180be280f
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valentin Chevalier <chevalierv@users.noreply.github.com>
2021-10-05 15:41:34 +00:00
Valentin ChevalierandVictor Feyens 1ded4e3689 [FIX] payment: add req param to the landing route
When a payment is made, add required parameters to the landing route.

This issue was introduced with 7fccbac

task-2645216

X-original-commit: cfcf4c64caac951783a1b39b63c024028b07b434
Part-of: odoo/odoo#77874
Co-authored-by: Victor Feyens<vfe@odoo.com>
2021-10-05 15:41:33 +00:00
Younn Olivier 1b4f640a92 [FIX] website: remove translation for technical fields
task-2629245

closes odoo/odoo#77873

X-original-commit: 472256c8539602a7bb2e81b389faf050b4d0785d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 15:41:28 +00:00
Younn Olivier 8563d989f3 [FIX] web_editor: reduce M2M widget rpc
Every options UI is updated when one is updated.
The Many2manyUserValueWidget is built in a way that every UI update will
trigger 2 rpc to get the records to display to the user, even if it is
not the option containing the widget that has been updated.

These rpc are now cached at the widget level.

This commit also fixes a bad computation of the Many2manyUserValueWidget
search domain.

task-2629245

X-original-commit: 847aecb4f9f4647e55e454d8c6560aa267f17c64
Part-of: odoo/odoo#77873
2021-10-05 15:41:27 +00:00
Younn Olivier 67ee284918 [FIX] website: keep focus on snippet when changing visibility
Triggering the event 'snippet_option_visibility_update' with show
parameter set to false would deactivate the snippet.

task-2629245

X-original-commit: a8d1c162ebfc8d8f80794d3a1e57008c575b3963
Part-of: odoo/odoo#77873
2021-10-05 15:41:27 +00:00
Fabio Barbero 4f2375f524 [FIX] survey: display "Correct pill" only once in results
Bug
=======
Since fb7b30b the "Correct" pill is displayed twice in survey results.

PR: odoo/odoo/pull/77620
Task-2648054

closes odoo/odoo#77867

X-original-commit: bc8e2d67b5980bb963f0e663f3c3d761ca4af169
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-05 15:41:20 +00:00
Aaron Bohy 25690c2879 [FIX] web: fix documents tests failing randomly
Since commit [1], several tests from the "documents" addon failed
randomly, because there were leftovers in the DOM at the end of
the tests. Those leftovers were the many2one dropdowns. Since v12,
we whitelist jQuery autocomplete dropdowns in the leftover check.
However, since [1], the many2one autocomplete has an additionnal
className, and it thus didn't match the element in the whitelist
anymore. Note that we duplicated the entry in the whitelist
because we need both (there are several types of autocomplete
dropdowns in the "documents" view).

[1] 84715436d87bb05b421bc9ccaacda67d07571690

closes odoo/odoo#77861

Related: odoo/enterprise#21460
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-05 15:41:15 +00:00
oco-odoo eabb144fc6 [IMP] account: reconciliation models: make use of the fact currency_id is always set on move lines
In older versions, currency_id was left empty on move lines in domestic currency (as well as amount_currency and amount_residual_currency). It's not the case anymore, so we can simplify the code a little bit.

closes odoo/odoo#77260

closes odoo/odoo#77801

Related: odoo/enterprise#21354
Related: odoo/enterprise#21437
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-05 15:41:03 +00:00
oco-odoo 2df6107cd7 [IMP] account: reconciliation models: don't suggest too many matches in case of partial mathing
- Create a statement line for partner A, amounting to 90€
- Make 5 invoices for partner A, of 10, 50, 100, 500 and 100 €
- create a reconciliation model (make sure it's the only one active for testing), with
>>> "invoice matching" selected
>>> "payment tolerance" disabled
>>> "partner should be set" enabled
>>> "same currency" enabled
>>> "auto-validate" disabled

Try to reconcile your statement. The reconciliation model associates your statement line to the 5 invoices, showing a partial match of 30 for the line of 100€, as only 30€ remain after matching 10 and 50. The following lines (500 and 100) are useless in the reconciliation and confusing for the user. They shouldn't be there.

After this commit, no useless line will be proposed anymore. In our example, only lines 10, 50 and 100 will be proposed.

Task 2652915

Part-of: odoo/odoo#77801
2021-10-05 15:41:03 +00:00
oco-odoo fc1a860b3e [IMP] account: better default reconciliation models
Task 2652915

Part-of: odoo/odoo#77801
2021-10-05 15:41:03 +00:00
Sébastien Theys 3a87aaf914 [IMP] mail, *: clean up message component by introducing view model
* = hr, hr_holidays, sms, snailmail, website_livechat

Message model incorrectly contained data related to a specific component (only
one) even though there can be multiple message components per message model.

This cascaded to adapting related component/models to the same principle.

closes odoo/odoo#76718

closes odoo/odoo#77779

Related: odoo/enterprise#20964
Related: odoo/enterprise#21426
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-05 15:40:49 +00:00
Tiffany Chang (tic) 9b4ed37b41 [IMP] stock: make package type demo data company agnostic
By setting a company on the package type, this makes it so the package
type isn't selectable for packages without a company (i.e. Put in Pack
without validating a picking = package without a company). For the sake
of demos, let's make it so any company can use these package types.

Task: 2623434
ENT PR: odoo/enterprise#21179

closes odoo/odoo#77597

X-original-commit: 7ec72c3d838dd40aad921b65b998b68c59225e01
Related: odoo/enterprise#21349
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-10-05 15:40:45 +00:00
Tiffany Chang (tic) a452cef18f [IMP] barcodes_gs1_nomenclature: add more volume rules
Some already exist, but let's add m^3 and ft^3 as well for demo data
purposes since office furniture supply stores are more likely to work
with these volumes than the existing ones.

Task: 2623434
ENT PR: odoo/enterprise#21179

X-original-commit: baecc0d502b111a5652e0a2d6ce29bd0fb204843
Part-of: odoo/odoo#77597
2021-10-05 15:40:44 +00:00
Thibault Delavallée d6434fe846 [IMP] base: improve ir.mail_server form view readability
PURPOSE

Help people setuping their mail server with clear labels and form view.

SPECIFICATIONS

Rename Description to Name, as Description indicates a secondary text
field. Add a placeholder to indicate it is used as a functional name
and not a technical field.

Relabel the field for filtering to FROM Filtering. Current From Filter
could lead to think it filters incoming emails which is not the case.

Move button for testing in header as on all form views.

Use radio buttons for authentication and encryption to display available
settings directly to user. This is more user friendly than selection boxes.

Split connection information in two groups: authentication and security.
Each group comes with its options below main radio-based field.

Task-2628092

closes odoo/odoo#76301

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-05 15:40:36 +00:00
Moises Lopez - https://www.vauxoo.com/ ae7184eb21 [FIX] test_lint: Fix some false results
* [FIX] test_lint: Consider variables for sql-injection

Using the following code:

```python
var = 'SELECT name FROM account WHERE id IN {}'
values = (1, 2, 3)
self._cr.execute(var.format(values))
```

It has a risky sql injection ignored before of this change

And allow psycopg2.SQL way mapping the variables declaration

* [FIX] sql-injection: AttributeError: 'NoneType' object has no attribute 'parent'

Using the following code:

    queries = [
        "SELECT id FROM res_partner",
        "SELECT id FROM res_users",
    ]
    for query in queries:
        self.env.cr.execute(query)

The check sql-injection shows the following error:
 - AttributeError: 'NoneType' object has no attribute 'parent'

So, Now it is validating if it is not None

* [REF] sql-injection: Using better naming for node_ofc -> node_assign

* [FIX] sql-injection: Fix false positive using BinOp "+"

Considering the following valid case:

    cr.execute('SELECT ' + operator + ' FROM table' + 'WHERE')

The representation tree is:

    node.repr_tree()
    BinOp(
    op='+',
    left=BinOp(
        op='+',
        left=BinOp(
            op='+',
            left=Const(value='SELECT '),
            right=Name(name='operator')),
        right=Const(value=' FROM table')),
    right=Const(value='WHERE'))

Notice that left node is another BinOp node
So, it need to be considered recursively

closes odoo/odoo#77864

X-original-commit: ce1a0171f61d2808470c185a91e9f8299e4efd25
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-10-05 14:18:05 +00:00
xO-Txandqsm-odoo dd55d6376c [FIX] website, *: fix content/design of header templates
*: web_editor, website_sale_wishlist

The goal of this commit is to fix the issues with the header templates
and their related options. Such as:

- Alignment of inline language selector
- Alignment of CTA / Template content
- Add missing CTA in some templates
- Bugs with off-canvas hamburger menu

Unfortunately, it will require more work to make everything perfect.

task-2636546

closes odoo/odoo#77862

X-original-commit: 2a000e33c5a44ddf0a777b43d8266cc413d8e4e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-10-05 14:18:01 +00:00
xO-Tx f5f59eab9c [FIX] website: fix magazine header template
The goal of this commit is to fix some UI issues on magazine
template:

1- Responsive collapsing (navbar should not expand on
   magazine template).
2- Center top header structure on mobile.
3- Missing CTA on magazine template.

task-2636546

X-original-commit: 094146856640c2765d238919a1f85288262f2ad0
Part-of: odoo/odoo#77862
2021-10-05 14:18:00 +00:00
qsm-odoo 0efc4276fe [FIX] website: properly show selected header links style
Since [1], method names of user value widgets are sorted alphabetically
to ensure consistency. This broke widgets using both the
customizeWebsiteVariable and customizeWebsiteViews methods as the
non-alphabetical order is unfortunately the right one there.

Until a better system is implemented, this fix simply switch those two
methods order specifically.

[1]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b

X-original-commit: 4ee47afb3709862c6ecd8e19e7aa7db5016e528e
Part-of: odoo/odoo#77862
2021-10-05 14:18:00 +00:00
stefanorigano (SRI) 27604376a9 [IMP] web_editor, website: improve "palettes-chooser" dropdown design
This commit reviews the component design in order to match the
"Configurator" one.

As a result, 'color-4' and 'color-5' are hidden in the palette-chooser
while remaining visible/editable once the palette is active.

This commit will also reorder color fields in the sidebar and in the
colopicker in order to match both the palette-preview & CC-list colors
order.

Beside design consistency, another reason behind these changes goes back
to the initial stages of the color system introduced with v14.

At the very beginning the system was designed to handle 3 custom colors
+ "locked" black and white.
Being able to edit black and white sounded interesting at that time;
as a result 'color-4' and 'color-5' have been introduced in the
system.

Despite being a powerful tool for designers and pro-users, the edition
of these color has been proven to be tricky an potentially unsafe.

Together with new default palettes that standardize 'color-4' and
'color-5' to safe values, hiding these color from the list simplify
the palette selection process and aims, implicitly, to communicate to
"normal" users that these colors are "not part of the palette", while
somehow related.

task-2656337

closes odoo/odoo#77857

X-original-commit: 02aba326710523bf210644e9038198059db1672c
Related: odoo/design-themes#514
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 14:17:48 +00:00
stefanorigano (SRI) 0d5244e4d1 [IMP] website: improve default palettes
Prior to this commit default palettes were picked from the general
library in an attempt to provide as much variety as possible.

Unfortunately they didn't cover the entire primary colors spectrum and
some were "challenging" to customize (eg. mild-tone colors barely
readable in certain circumstances).

This commit defines new safest palettes that cover a wider range of
primary colors (ref. ~2 palettes for each column in this page
https://getbootstrap.com/docs/5.0/customize/color/#all-colors).

task-2656337

X-original-commit: 405e5470d2f950877d22420462c2e14922f77c35
Part-of: odoo/odoo#77857
2021-10-05 14:17:48 +00:00
stefanorigano (SRI) 0ce66837ae [REF] web_editor: add a function to create odoo palettes
This commit adds a sass function that, given one or two colors, returns
an odoo palette in sass-map format.

The palette will be generated using the safest values possible, setting
'o-color-4' always  to '#FFF' and shifting predefined colors' HUE to
match the primary color passed to the function.

Overrides (eg. 'menu': 4) are supported trough the '$-overrides-map'
method.

The commit will also allows to customize the "has-enough-contrast"
function threshold. Indeed, prior to this commit, the threshold value
was locked to '500' in order to spot contrast issues against the tiniest
elements (eg. small text).

Using a more forgiving '300' value, for example, allows to verify
readability of a solid button against a bg.

task-2656337

X-original-commit: 61f014a955ed9b9d33e7289c2a8a273a4179b088
Part-of: odoo/odoo#77857
2021-10-05 14:17:48 +00:00
stefanorigano (SRI) 48b87b4c7f [FIX] website: limit palettes number proposed by the ui
Prior to this commit the entire palettes library (139 entries) was
rendered into the "Theme" tab palettes dropdown.

The final result was overwhelming, especially considering that palettes
were not ordered by color. Moreover, since palettes have been designed
to provide variety within themes, a lot of them appeared very similar
(if not exact clones) when compared in the context of a general library.

This commit keeps palettes' definitions to avoid breaking
pre-existing DBs design, but will propose the user the "configurator"
ones (+ the 2 system ones) only.

Themes can eventually inject a preferred palette in the list in order to
match screenshoot and "pre-configurator" demo content.

This commit also removes the previous prefix-based ordering system, now
obsolete. Indeed several themes use palettes defined by other themes,
invalidating the prefix mechanism.

task-2656337

X-original-commit: 9ff9417d1d5ccb85e0d0751acc8de5faced30236
Part-of: odoo/odoo#77857
2021-10-05 14:17:47 +00:00
stefanorigano (SRI)andqsm-odoo 67bd29fb0f [FIX] website: fix o_footer_scrolltop default color definition
This commit fix a minor issue caused by the assumption that 'copyright'
block colors would have been always defined by default.

Indeed with a48a30f we introduced the possibility to have "transparent"
copyright blocks, invalidating `$-copyright-color`computation when
palettes don't specify a color.

This commit also handles the case of transparent footer, mixing with the
body color.

task-2656337

X-original-commit: 1b9fac8de08f042561a14b9b6ee5ae51b277705d
Part-of: odoo/odoo#77857
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-10-05 14:17:47 +00:00
Xavier Morel 6f4b78764a [FIX] web: more reliably avoid downloads on new file
519555054a mitigated an issue of being
able to try and download files which don't exist yet, make the fix
more reliable by clearing out the field completely and hiding the
content if the (readonly) field has no value *or the record is not
saved yet*.

Also clean up the code:

* an old-style forward port created a duplicate fixprovement
  (a8d01cbf4e) which seems less correct
  as it applies conditionally
* and the code is branchier than necessary, we can make it simpler by
  judiciously leveraging jquery's API

closes odoo/odoo#77856

X-original-commit: 05db9be15d75dc0794095aad75c80d0c2e540808
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-10-05 14:17:37 +00:00
Fabio Barbero 34119de451 [FIX] event: fix spelling mistake
Purpose
=======
Change "Intructions" to "Instructions"

PR: odoo/odoo/pull/77484
Task-2657588

closes odoo/odoo#77853

X-original-commit: 4901e3381d1f316e5160356da5a862ed6a5fa240
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-05 14:17:33 +00:00
Bruno Boi 8326dcd621 [FIX] web: center ONLY o_cp_action_menus div
The commit 590d0ca8 tried to center the o_cp_actions_menu but instead it
was spreading every direct child of the o_cp_bottom_left zone.

This commit puts the bottom left zone back to a left aligned flex layout
and puts an automatic left margin on the actions menu zone.

closes odoo/odoo#77852

X-original-commit: 4d5e64f04c421af554abbbde29d98278a6c27a1f
Related: odoo/enterprise#21457
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-10-05 14:17:25 +00:00
Lucas Perais (lpe) 885d105075 [FIX] web: py_js: py_date: relativedelta revive features
Before this commit, absolute notation was not supported.
weekday, yearday and nlyearday were not supported either.
Some other computations did not work, or weren't tested for.

This commit re-introduce the support for all those features.

closes odoo/odoo#77851

X-original-commit: c423326a97060fb9132abcaf997ffba41a63b5fe
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-05 14:17:21 +00:00
qsm-odoo a177593572 [FIX] web_editor: restore column count snippet option
When decreasing the number of columns through the column count snippet
option, the editor entered a deadlock situation.

This reverts [1] which is the cause, trying to await the UI update
during a snippet removal. This commit first prevents the deadlock while
waiting for a better solution to be implemented.

[1]: https://github.com/odoo/odoo/commit/ab7508393376075f95d6dd5925e7f4462936d24e

task-2652904

closes odoo/odoo#77848

X-original-commit: ae219ec06baf0280c76ae09b1453cc1481eece30
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 14:17:18 +00:00
Odoo's Mergebot 77b22700c0 [MERGE] website, *: remove menu loading effect
*: web, website_sale

See sub-commits for details.

In short: the menu was loading with an effect partly for technical
reasons: potentially folding menu items in a "+" dropdown instead of
making it go over multiple lines. Since the JS lazy loading, the menu
made even more time to appear. All of that is now removed: the menu is
there as soon as the page appears to the user, without effect or delay.

task-2618929

closes odoo/odoo#77843

X-original-commit: 0681678c4d028f9f2bda419996bf5b14e771c132
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-05 16:17:14 +02:00
xO-Tx dde609a838 [IMP] web, website: remove website menu loading effect
The goal of this commit is to remove the menu fade-in effect
on page load since we can now call the initAutoMoreMenu in
non-lazy JS code.

When 'initAutoMoreMenu' called, images won't be loaded yet,
that's why we add a class: '.o_menu_image_placeholder'
to set a default size on images and once all images are loaded,
we reupdate the menu.

task-2618929

X-original-commit: 6be166df24dedbe4729e1e7bfe6a302713932b74
Part-of: odoo/odoo#77843
2021-10-05 14:17:13 +00:00
xO-Tx 92d9c84c83 [IMP] website: use initAutoMoreMenu for website menu
The goal of the 'autohideMenu' feature: instead of having the menu
items wrapped on multiple lines, they are hidden and only when we
compute how many items we can show on one line, we show the menu.

This implementation was fine in old versions when we did not have
the lazy loading of the JS yet.

The goal of this commit is to replace 'initAutoMoreMenu' by code
that can be called from a non-lazy loaded JS file so it will be
possible to remove fade-in effect from it.

task-2618929

X-original-commit: 7affc29c9b3fc85c27c10d0b8ba600ebdaf311ac
Part-of: odoo/odoo#77843
2021-10-05 14:17:13 +00:00
xO-Tx 898d181c7f [MOV] *: move initAutoMoreMenu to a non-lazy loaded file
*: web, website

task-2618929

X-original-commit: 0a031fca52e92ce052522446b0c1751aac5dc572
Part-of: odoo/odoo#77843
2021-10-05 14:17:12 +00:00
xO-Tx 0de634965a [REF] web, website: rewrite initAutoMoreMenu method
The goal of this commit is to make initAutoMoreMenu fully
non-jquery and totally independant of other odoo utils.

task-2618929

X-original-commit: 7be1bb9083c786064fa140c811952e7735ce5539
Part-of: odoo/odoo#77843
2021-10-05 14:17:12 +00:00
xO-Tx 82846a5556 [FIX] website_sale: fix cart popover position
On vertical menu with "flex-direction: column", cart item will take
full parent width, which makes the popover appear far from cart link
(in the middle of screen).

The goal of this commit is to fix this behaviour by adjusting cart
item width on large vertical menu.

task-2618929

X-original-commit: c72d29fff6d97f42c512d597a98fd392b547e931
Part-of: odoo/odoo#77843
2021-10-05 14:17:11 +00:00
Touati Djamel (otd) 222d38ad01 [FIX] purchase_stock, purchase_mrp: adjust the qty of purchased kit correctly
Steps to reproduce the bug:
- Create a BOM kit for “product K”  with:
    - 2 * “product A”
    - 1 * “product B”
- Create a PO for 1 unit of “product K” > confirm
- A receipt delivery with 2 units of “product A” and 1 unit of B will be created
- Modify the ordered Qty to 2 units of “Product K”

Problem:
The receipt delivery will not be updated correctly (4 units of product A and 3 of product B)
because the `"_prepare_stock_moves"` function computed the previous quantity wrong based on the moves quantities
since the moves are for products A and B, not product F.(do not take into account the products in kit)

Solution:
For kit products, do not calculate from the `"stock.move"`, calculate the difference between the quantity before and after the change

opw-2645719

closes odoo/odoo#77838

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-10-05 14:16:58 +00:00
Géry Debongnie 6d67d02ece [IMP] web: update owl from 1.4.4 to 1.4.6
Release notes:

https://github.com/odoo/owl/releases/tag/v1.4.6

- fix: crash in component render (in rare cases)
- fix: build system now target ES2017 instead of ESNext
- fix: remove useless log in prod mode

https://github.com/odoo/owl/releases/tag/v1.4.5

- qweb: expose translatable attributes
- ci/tests: update jest/rollup
- doc: clarify tutorial
- doc: update readme, add nice badges

closes odoo/odoo#77835

X-original-commit: aa2cfb63932d28821a4a333d5162827392bf3366
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-05 14:16:54 +00:00
william-andre c03924bfbb [FIX] account: manage multiple ids in _is_end_of_seq_chain
`_deduce_sequence_number_reset` should be used on maximum one record.
That function is called from `_get_sequence_format_param` in
`_is_end_of_seq_chain` but that function was possibly calling it on
multiple ids.

https://runbot.odoo.com/runbot/build/10315612

closes odoo/odoo#77811

X-original-commit: 10b880ae999643a4e3e9328d96196a19b0cf7ac6
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-05 14:16:50 +00:00