Commit Graph
152817 Commits
Author SHA1 Message Date
Yannick Tivisse 3f5e3b0513 [FIX] hr_work_entry_holidays: Allow overlapping leaves if same schedule
Purpose
=======

We currently prevent leaves overlapping several contracts to avoid messing
with the generated resource.calendar.leave.

In case the contracts are on the same resource calendar, this shouldn't be
an issue actually.

Taskid: 2836901
X-original-commit: 4e87c30bb136083153091e67e6dd9d9f64fa94c2
Part-of: odoo/odoo#94885
2022-07-01 16:35:34 +02:00
Nemael 68bb383852 [IMP] mail: improve EmojiPicker (step 1)
Emoji picker now has a bar to filter
emojis per category.

Task-2898475

closes odoo/odoo#94646

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-01 16:35:28 +02:00
Alexandre Kühn 8cce4e3694 [MOV] mail: rename EmojiList to EmojiPickerView
Part-of: odoo/odoo#94646
2022-07-01 16:35:28 +02:00
Alexandre Kühn 1e67f46544 [IMP] mail: rename EmojiList to EmojiPickerView
Part-of: odoo/odoo#94646
2022-07-01 16:35:27 +02:00
Gorash f5d5e2b242 [FIX] models: Display stack when log a unsupported operand in models
closes odoo/odoo#95079

X-original-commit: 81c21e6531aa57f8e6d4e18a60261a2d69b0bdc4
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2022-07-01 15:19:54 +02:00
Romain Derieandhoangtiendung 1186cd1c40 [FIX] website_forum: fix tag click event not found records
A forum tag is always linked to a forum.
But some flows are not considering that part and are returning/using
tags from other forum too.

Step to reproduce, having 2 forum `Cats` and `Dogs`:
- Create a `Food` tag on the `Dogs` forum
- On the `Cats` forum, type `Food` in the tag input
- First error: the `Food` from `Dogs` incorrectly shows up
  It means that the user can't create a new one from the `Cats` forum
  but will actually have to select (without know it) the one from the
  `Dogs` forum.
- Select that tag anyway
- Second error: The tags displayed on the post is redirecting to the
  wrong other forum, ultimately not showing the post from all forums
  (and the one you just came from).
- Third error: The /tags page won't list the `Food` tag on the `Cats`
  forum.

Note that there is probably some access traceback involved in a multi
website and/or multi company setup.

After this commit:
- only the tags from the current forum will show up and be selectable
  when creating a post.
- it will be possible to create a new tag for a forum is another forum
  already has a tag of that name
- the tag on the post (next to its title) will not redirect to the
  incorrect (and possibly not accessible) forum

Note that the method was already reading multiple properties of `self`,
it was already not an `api.model` method anymore.

closes odoo/odoo#94917

X-original-commit: 4ff52d0b9a71d3072f5973d8e900d802e6b129c0
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: hoangtiendung <hoangtiendung070797@gmail.com>
2022-06-30 20:56:14 +02:00
Sébastien Theys 250f72d960 [IMP] mail: fix race condition in tests
Probably introduced in PR changing rendering of chatter in form renderer that
changed timers in unfortunate situations.

Open form view utils was missing an await on (chatter container) render, but the
issue was not perceptible before.

closes odoo/odoo#95003

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-30 19:56:45 +02:00
Victor Feyens 49fb5e111a [FIX] payment: unexpected test behavior
Some payment tests were unexpectedly relying on the 'transfer' payment acquirer
to work because of a multi-company issue in the core payment tests setup.

This commit fixes the problem and adds an additional check in the tests to
make sure they rely correctly on the 'dummy' acquirer created in the payment
tests common.

closes odoo/odoo#94972

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-30 18:52:44 +02:00
David Monjoie 2dc9406932 [FIX] web_editor: less sanitize _parse recursive calls
The _parse function of sanitize used to be recursive both along the
length and depth of the DOM tree, making it exceed maximum stack size
limit for long documents. This updated version is now only recursive in
the depth of the tree, not its length. It would be possible to write a
fully non-recursive version of this function but it is out of scope of
this task and is unlikely to happen anyway as DOM trees are way more
unlikely to exceed stack limits in depth rather than length.

task-2895671

closes odoo/odoo#94967

X-original-commit: c711a2c4106da0c2d5c35ee7a367ba86a9dcbdb7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-06-30 18:52:41 +02:00
Lucas Lefèvre 579486a034 [FIX] web: consistent capital letters in domain selector
"All" is capitalized but not "records".
It should be consistent: either all capitalized, none, or only the first word

closes odoo/odoo#94963

Related: odoo/enterprise#28990
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-06-30 18:52:37 +02:00
Romain DerieandXavier-Do 09f3ff6baf [IMP] tests: allow standalone tests to use ~ in addons-path
Using `./odoo-bin` to start Odoo, the addons path can contain a `~`, eg
`~/Documents/whatever`.
Those `~` are accepted and work both with the `--addons-path` passed as
the command argument, or in the `.odoorc` config file.

The `@standalone` tests (launched with `./test_module_operations.py`)
however did not work with that `~` as the path was not "normalized".
Neither a `~` in the config file or in the `--addons-path` argument were
working.

While it is not very critical, it is a nice to have to have the same
behavior as the `./odoo-bin` as this made me lose quite some time
figuring why I couldn't use my usual `design-themes` repo addons path.

closes odoo/odoo#94953

X-original-commit: e633092a5932f24eda840e1decca92ed238a3a29
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Co-authored-by: Xavier-Do <xdo@odoo.com>
2022-06-30 18:52:31 +02:00
Jaypal Maru f6efbc3b8d [CLA] signature for JaypalMaru
closes odoo/odoo#94951

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-30 18:52:28 +02:00
Loan (lse) d14bf7afd8 [REV] pos_restaurant: stop closing paymentscreen while paying
Revert of
https://github.com/odoo/odoo/pull/92794

If you install pos_restaurant and open a PoS sale session, issue will start to appear after a certain time (about 1 minute):

For V15:
Javascript console logs will log errors:
`TypeError: Cannot read properties of undefined (reading 'id') Chrome.js:97`

For V15.2:
The products button will become unresponsive (so the PoS is unusable).
With error in the JS console as well:
`TypeError: Cannot read properties of undefined (reading '0') Chrome.js`

OPW-2889985

closes odoo/odoo#94938

X-original-commit: 965b797772becba0dbd7b978b5c422ba1474663a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-06-30 18:52:22 +02:00
Arthur Detroux (ard) 1dd75ea014 [FIX] website: fix a race condition on snippet_version tour
Commit [1] moved the edition of the website in the backend and
introduced an iframe as the editable. In doing so, some tour
actions became unstable.

The issue is that previously, when an action reloaded the page, the tour
service would reload as well. This is no longer the case and the tour
service stays active when the page is reloaded (e.g. when saving a
page). This can lead to a tour clicking on an item before it is ready to
be clicked.

Specifically in this case, the tour saved and clicked on edit as the
next step.
Clicking on edit before the page is properly reloaded leads to the click
being ignored.

This commit uses the util function `clickOnSave` which ensures we're out
of edit mode and the page is reloaded before doing anything else.

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

runbot-4074

closes odoo/odoo#94932

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-06-30 18:52:16 +02:00
Julien Mougenot 315718ea66 [FIX] web: Remove CSS comment parsed as rule
A CSS comment in webclient_templates was written as a JS comment and
appeared as an invalid CSS rule in the devtools. This commit converts
that comment to use the proper syntax.

closes odoo/odoo#94925

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-06-30 18:52:13 +02:00
Vincent Larcin 9863745d9f [FIX] portal: filter empty messages in the chatter
In some cases, empty messages can be displayed in the portal chatter.

For instance, if a customer sends a message with no body and just
an attachment, and the attachment then gets deleted, it will still
be displayed as an empty message in the portal chatter.

To solve this, this commit filters out empty messages from the portal chatter.

Task-2833919

closes odoo/odoo#94828

X-original-commit: 10d2a3e01a0fb62860e502cc67e5311b9420a684
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-06-30 18:52:07 +02:00
Romain Derie 030d3cb10e [IMP] website: use custom URL for website in backend
The website architecture has been refactored for the internal users and
admins with [1].
Now, they can access the website in the backend inside the website app.
Long story short, the website will be displayed in an iframe in a client
action. The URL of the browser will be tweaked to reflect the iframe one
instead of the real one (which is something like /web#action=..).

It had a few drawbacks:
- On page refresh (F5 or browser button), the user would land on the
  frontend version of the website instead of remaining in the backend.
- When the user edited the URL (Like removing `/shop` and typing `/jobs`
  instead, he would land on the frontend version too.
- Impossible to directly go to the backend version of the website.

Those are improved with this commit by using a slightly different URL
when we are in the backend. A `/@/` will prefix the iframe URL.

If logged in, the user will land on the backend. If not, it will simply
redirect to the frontend version of the website.

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

task-2687506

closes odoo/odoo#94580

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-06-30 18:52:01 +02:00
javl 2613e663f0 [CLA] signature for javl
closes odoo/odoo#94168

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-30 18:51:57 +02:00
Demesmaeker 08aff3b686 [FIX] (test_)sale(_product_configurators): fix nightly race condition
Fix some uncommon nightly error on the runbot where a race condition
happened when the tour finished too soon. The test is successful but
during the browser cleanup, things are still happening.

task-2832564

closes odoo/odoo#91920

Related: odoo/enterprise#27600
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-06-30 18:51:54 +02:00
mafo-odoo 55130e50f2 [FIX] mail: try to parse scheduled date input
``scheduled_date`` field of ``mail.mail`` is a char field since its addition
in 2015 (see odoo/odoo@364b4ba06d). As its first usage was in combination with
mail templates, a char field was used to simplify its implementation.

However this technically allows to store whatever value in that field. Using
it in a filter with a datetime argument is quite strange. A workaround is
to try to parse as much as possible the inputs, remove timezone information,
try to localize it, and have it in regular server format to enable filtering
on it.

We consider value should be set in UTC. If we have a specific timezone set
on the input we localize it to UTC. Otherwise we consider the input was done
in UTC, as all datetime fields. It is the role of the business code generating
mail.mail to either give the timezone, either already convert into UTC.

This might solve the following bug
  Step to reproduce:
	activate the developer mode
	go to settings - technical - emails
	create a new email and set the Scheduled Send Date in the future
	run the scheduled action Mail: Email Queue Manager
  Current behavior:
    the email is sent and the action does not consider the filter
  Expected behavior:
    the email is not sent and will only be sent when the scheduler detects
    that scheduled_date exceeds the current time.

Task-2833300
opw-2823106

closes odoo/odoo#94937

X-original-commit: 5c113cb9d54e051132a9a50deb2fcf61f9c9dc2c
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-30 17:41:13 +02:00
Rahul Prajapati dfb122b960 [IMP] mail: add message backlink on replyingto in composer
Before this commit:

There is no backlink to message on 'Replying To' in header of Composer

After this commit:

There is a backlink to message

Task-2664839

closes odoo/odoo#94873

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-06-30 14:14:45 +02:00
Pierrot (prro) 783a06fee8 [IMP] account: improve account list view UX
In the Chart of Accounts list view, the column "Non Trade"
is hidden by default

closes odoo/odoo#94150

Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-06-30 14:14:42 +02:00
Alexandre Kühn 21471fc5e7 [IMP] im_livechat, *: Refactor JS Public Livechat (step 7)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2898692

closes odoo/odoo#94914

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-30 12:11:00 +02:00
Odoo's Mergebot 56455a69aa [MERGE][IMP] portal: allow portal users to deactivate their accounts
Purpose
=======
Allow portal users to deactivate their accounts from the portal view.

After the deactivation, they are redirected to the login page, so
they can verify that they can not longer login with their credentials.

We first archived the record and remove sensitive information (password,
login, so he can not log in again with the same credentials).

After the deactivation, we blacklist the email and the phone of the
user, so we are sure that we never send him again email / SMS.

Then, we create a <res.users.deletion> to delete the user and the
partner in a CRON because this operation can be heavy (write_uid,
create_uid field on all models).

Task-2629544

closes odoo/odoo#78298

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-30 12:10:57 +02:00
std-odoo 66f5bc4dbf [IMP] portal: allow portal users to deactivate their accounts
Purpose
=======
Allow portal users to deactivate their accounts from the portal view.

After the deactivation, they are redirected to the login page, so
they can verify that they can not longer login with their credentials.

We first archived the record and remove sensitive information (password,
login, so he can not log in again with the same credentials).

After the deactivation, we blacklist the email and the phone of the
user, so we are sure that we never send him again email / SMS.

Then, we create a <res.users.deletion> to delete the user and the
partner in a CRON because this operation can be heavy (write_uid,
create_uid field on all models).

Task-2629544

Part-of: odoo/odoo#78298
2022-06-30 12:10:56 +02:00
std-odoo e46a04ce30 [IMP] auth_password_policy: show the password meter only when needed
Bug
===
The password meter is not super pretty, so we display it only when
needed.

Task-2629544

Part-of: odoo/odoo#78298
2022-06-30 12:10:56 +02:00
std-odoo 0e6c698698 [IMP] portal: improve the security page
Bug
===
Add a link to the documentation about 2FA
and make the buttons color consistent.

Task-2629544

Part-of: odoo/odoo#78298
2022-06-30 12:10:56 +02:00
std-odoo c180568890 [IMP] portal: improve the "reset password" flow
Bug
===
Improve the UI and the message displayed in the "reset password flow".

Task-2629544

Part-of: odoo/odoo#78298
2022-06-30 12:10:55 +02:00
Raphael Collet c0fea2cec8 [FIX] core: update inverse of many2many in order
Consider two models A and B, a many2many field F from A to B and its
inverse relation G from B to A.  When F is modified, G is updated
accordingly in cache.  The statement

    records.write({F: [Command.link(b.id)]})

is expected to add b.id to records.F, and add records.ids to b.G.  In
order to avoid nondeterminism, the additions should be done at the end
of the recordset, and in order.  In other words, if none of "records"
are in b.G, then after the statement above, b.G should be updated as

    b.G = b.G + records

This patch ensures that "records" are added in order.

closes odoo/odoo#94909

X-original-commit: b8fbc460673827497f6817e1751b5d365d8ae29a
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-06-30 09:29:58 +02:00
Nicolas Bayet 31d03da243 [FIX] web_editor: prevent selection on sanitize
Before this commit, it was possible to set the selection of the document
whenever sanitizing an element that was not present in the dom.

task-2877501

closes odoo/odoo#94900

X-original-commit: 7b60241e01914ffc0176c24d4e780f773f9a277f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-06-30 09:29:54 +02:00
+3 3d6c13ff3f [MERGE] web, *: kanban, list and form views in owl
This PR introduces the new kanban, list and form views written in owl.
Even though it contains the implementation of those 3 views, only the
kanban view is activated for now (the list and form views aren't 100%
ready yet, so they aren't added to the view registry).

Alongside the views, the fields (`<field name="..."/>` in archs) and
widgets (`<widget name="..."` in archs) of web/ have been implemented
in owl as well. Legacy ones remaining in other addons are supported
in our new views, thanks to a compatibility layer. The goal is to convert
them asap though. A few fields and widgets from other addons have
already been converted in this PR.

Legacy views, fields and widgets are kept for now, which explains the
number of added lines in this PR (around half of them concern tests).
They are still extended by custom code in other addons, that still need
to be converted (a lot of them are already on the way). Moreover,
they are still used in Studio as well. The plan is to lazy load them in
the Studio bundle when all custom code extending them will be
converted. Studio will be converted for v17.

closes odoo/odoo#92475

Related: odoo/enterprise#27879
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
2022-06-30 09:29:51 +02:00
Mathieu Duckerts-Antoine fb5815edfd [FIX] web,board: remember list orderBy
When adding a (new) list view to the Dashboard app, the list orderBy (if
any) was lost. We fix that.

Part-of: odoo/odoo#92475
2022-06-30 09:29:51 +02:00
Mathieu Duckerts-Antoine dc6834b216 [FIX] web: list: save list orderBy in favorite
When creating a favorite in a (new) list view, the list orderBy (if any)
was not saved with the favorite. We fix that.

Part-of: odoo/odoo#92475
2022-06-30 09:29:50 +02:00
Mathieu Duckerts-Antoine 8279607488 [FIX] web: list: keep list orderBy when (un)grouping
When (un)grouping a (new) list view, the list orderBy (if any) was not
kept. We fix that.

Part-of: odoo/odoo#92475
2022-06-30 09:29:50 +02:00
Géry Debongnie fde1ca963c [IMP] web, project: introduce and use renderToMarkup
Part-of: odoo/odoo#92475
2022-06-30 09:29:50 +02:00
Géry Debongnie f5f65f26be [FIX] web: scope legacy indicator to debug mode
With this commit, we only display the "legacy" indicator (red/pink
background color to indicate old widgets in new views) in debug mode.

Part-of: odoo/odoo#92475
2022-06-30 09:29:50 +02:00
Julien Mougenot 2b7f497442 [FIX] web: Support multiple dropdowns in kanban
This commit allows multiple declarations of a dropdown menu in a kanban
card to generate a dropdown component for each definition.

Part-of: odoo/odoo#92475
2022-06-30 09:29:49 +02:00
Aaron Bohy 6cdd91b614 [FIX] web: kanban: add JSON to the rendering context
In legacy kanban views, one could use JSON in the arch to, e.g.
parse text field values encoding data. This was no longer the case
in the new implementation. This commit fixes the issue by adding
it to the kanban record rendering context. However, we'll consider
adding it in owl directly.

Part-of: odoo/odoo#92475
2022-06-30 09:29:49 +02:00
Mathieu Duckerts-Antoine a5bfa26692 [FIX] web: kanban: attributes of card dropdowns
Some attributes of the elements determining the "ellipsis" dropdown menu
of a kanban card were invalidly reported on the main Dropdown node
created during the compilation. This could cause crashes (during the
props validation) or broke the CSS.

In this commit:
    - we fix the above mentioned problem
    - we put the class o_drowdown_kanban on all "ellipsis" dropdowns
      generated by the kanban compiler in order to get the appropriate CSS
    - we make sure that those dropdowns are visible in kanban dashboards
      by default

Part-of: odoo/odoo#92475
2022-06-30 09:29:49 +02:00
Julien Mougenot 5d0a28d0f5 [FIX] web: Fix KanbanCoverImageDialog
This commit removes the SimpleDialog class and adapts the
KanbanCoverImageDialog to use the Dialog component instead.

It also makes sure that the KanbanCoverImageDialog uses the FileInput
component to use a more centralized way of calling the HTTP
'upload_attachment' route.

Part-of: odoo/odoo#92475
2022-06-30 09:29:49 +02:00
Julien Mougenot 38710465a9 [IMP] web: Update to FileInput API
This commit changes the prop names of the FileInput component to bring
them in line with the current naming conventions. Also the default
route has been changed from '/web/binary/upload' to
'/web/binary/upload_attachment' since the latter is used more often.

Part-of: odoo/odoo#92475
2022-06-30 09:29:48 +02:00
Aaron Bohy 0196c052f1 [FIX] mail: check existence of record in FollowerListMenu
This commit fixes a race condition that makes several tours crash.
The reason is that the underlying record is removed from the model
which produces a re-rendering. At the end of that re-rendering,
a component is unmounted. At that point, we remove an handler
relying on the existence of the record. As a consequence, there
was a short time window during which the handler would crash if it
was called.

Part-of: odoo/odoo#92475
2022-06-30 09:29:48 +02:00
Jorge Pinna PuissantandXavier BOL 7e86933d94 [FIX] web: evaluate string domain in modifiers
Before this commit, in `getModifier` method when a modifier contains a
domain in a string, the domain is not evaluated and just converted into
a boolean value that is if the string is not empty then the method will
return `true` and `false` otherwise.
Also, the `applyInvisible` method does not take into account an invisible
domain in a string. That is if the `invisible` variable contains a domain
in an `Array` then  the domain is evaluated otherwise the domain is
considered as a boolean value.

This commit checks if the modifier contains a boolean value as value to
evaluate it as a boolean and return it otherwise the modifier value is
returned in the `getModifier` method.
In the `applyInvisible`, this commit allows to evaluate the domain if
the domain is containing in a string.

Part-of: odoo/odoo#92475
Co-authored-by: Xavier BOL (xbo) <xbo@odoo.com>
2022-06-30 09:29:48 +02:00
Samuel Degueldre 0e6481f359 [FIX] web: add support for kanban-tooltip in kanban arch
This commit re-adds support for the kanban-tooltip template in kanban
view arch, to do this, it also refactors the tooltip service to give it
a programmatic API, so that we are not constrained to only giving
tooltip info in serialized form, but can instead give the same context
to the tooltip template as to the kanban record's template.

One current limitation is that components that are available in the
kanban record cannot be used in the tooltip, as these are mostly used
for interactive content and one cannot interact with the contents of the
tooltip, we have decided to not work around this issue until needed.

Part-of: odoo/odoo#92475
2022-06-30 09:29:48 +02:00
Samuel Degueldre a7be88cd91 [REF] hr_contract, web: give tooltip info as t-call-context
Previously, we would use t-set to add the tooltip info under the key
"info" in the rendering context, while this works fine, it was mostly
just a workaround for the lack of support in owl for passing a rendering
context to be used by the t-call directly. Since this is now supported
in owl, the commit uses this feature for the tooltips and adapts the
call sites.

Part-of: odoo/odoo#92475
2022-06-30 09:29:47 +02:00
Mathieu Duckerts-Antoine be8472c851 [FIX] kanban: click outside of a quick create record
When on click outside of a quick create record, one wants
    - to remove the quick create record if it is not dirty
    - not to remove it if it is dirty with some exceptions:
        if the click is on a "Create", "Load more" or "+" (quick add) button

This fix makes the external listener of KanbanRecordQuickCreate work as
expected.

Part-of: odoo/odoo#92475
2022-06-30 09:29:47 +02:00
Mathieu Duckerts-Antoine dcbf2119fc [FIX] web: kanban: problem with date/datetime granularity
The call to web_read_group done in _loadGroups was incorrect when the first groupby
was of the form date_field:granularity (e.g. "create_date:day"). The groupby was
sent as a mesure and interpreded as such, leading to an error of the form
"Invalid aggregation function ...".
This was not detected before by lack of manual testing: the mock server used in tests
checks the read group parameters in a different way from what is done server side.
So the error was not visible in the testing environment.

In this commit, we remove the error in web_read_group and improve the mock server
(a bit) so as to make such errors be detected.

Part-of: odoo/odoo#92475
2022-06-30 09:29:47 +02:00
Mathieu Duckerts-Antoine f9b692e452 [FIX] web: kanban: problem with several groupbys
The kanban view is not supposed to be grouped by more than one groupby.
In this commit, we make sure that the param groupBy is correctly process at
the first level to only keep the first groupby (if any)

Part-of: odoo/odoo#92475
2022-06-30 09:29:47 +02:00
luvi 8e32e1dace [FIX] web: ViewButton supports styling set on anchors tags
Part-of: odoo/odoo#92475
2022-06-30 09:29:46 +02:00
Michael (mcm) b1f072cba4 [IMP] web: adapt dialog for mobile
This commit modifies the dialog to make it more user
friendly on small screen. On small screen, the dialog
opens in fullscreen and saves the scroll position when
opening to restore it on close.

Part-of: odoo/odoo#92475
2022-06-30 09:29:46 +02:00