Commit Graph
12153 Commits
Author SHA1 Message Date
Lucas Perais (lpe) 33476a4888 [FIX] web, mail: remove unnecessary console.log
Following commit 118ddcace0.
a few console.log escaped the attention of the reviewer.

This commit removes them.

closes odoo/odoo#75832

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-09-01 11:05:50 +00:00
Romeo Fragomeli 36495ef59d [IMP] web: Add zoom on employee avatar
This commit enables the zoom on mobile.

To avoid any issue in website, we first only activate it in the backend.
Note that it's not, strictly speaking, a zoom. It only shows the
original size of the picture.

Steps to reproduce:
* Open Employee
* Select an employee
* Touch on the photos

closes odoo/odoo#75785

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-09-01 07:17:55 +00:00
William Braeckman e0a6e75ea6 [FIX] web: fix some minor css problems
This commit fixes some minor css problems related to the
many2many_avatar_user widget.

Task-2398734

closes odoo/odoo#74087

Related: odoo/enterprise#19780
Related: odoo/upgrade#2723
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-09-01 07:17:40 +00:00
Bruno Boi 65f7de37df [FIX] web: keep context on form dialog save&new by default
ISSUE ADDRESSED
- Open Project > Tasks > Gantt view
- Click the ADD button to open the form dialog
- Fill the form and click on SAVE&NEW button
- Fill again the form and click on SAVE&CLOSE button
- Both tasks are created, but only the first has been planned, because the second one has lost a part of the context (plan dates...)

BEFORE
Opening a form view dialog without passing a _createContext method (see commit c14b17c485 where it was introduced) was still passing an empty object additionalContext argument when save&new was hit.
This was leading to not take into account the full context (see BasicModel._getContext).

AFTER
If no _createContext method is passed to a form view dialog, then no empty object additionalContext is passed to evaluate the context, resulting in the full context being used.

closes odoo/odoo#75807

X-original-commit: 3fe5961988220b2864db005ae9d79474de608fc5
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-08-31 23:35:46 +00:00
ramandDavid Beguin 3d72a6a4d2 [FIX][IMP] web: fix ribbon CSS to allow its use on kanban
Adapt css to allow a nice display of ribbon widget on kanban.

Task-2634805
PR odoo/odoo#72298

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Mariska Archielli <ram@odoo.com>
2021-08-31 23:34:54 +00:00
ramandDavid Beguin 740f981088 [IMP] web: allow kanban to pass xml attributes
The kanban view allows to instantiate widgets but not to give attributes as
options. Fine tuning some widgets require to be able to control them directly
from XML declaration using options and attributes.

Task-2634805
PR odoo/odoo#72298

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Mariska Archielli <ram@odoo.com>
2021-08-31 23:34:54 +00:00
jdoutreloux a8e6b57fef [IMP] resource,web : modifies the timezone_mismatch widget
This modifies the widget to allow a title option.

Task-2352428
Closes #67021

Related: odoo/upgrade#2223
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-08-31 19:54:19 +00:00
Arnaud Joset 1f5c0fdc25 [FIX] google_calendar,microsoft_calendar: hide sync buttons on non calendae views
Before this commit, the sync buttons refactored in https://github.com/odoo/odoo/pull/68700 would appears in all calendar views (sale,time-off,...).
This commit only displays them in the calendar event view.

closes odoo/odoo#75702

Taskid: 2633415
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-31 10:01:10 +00:00
stefanorigano (SRI) 9337562cca [REF] web_editor, *: review editor toolbar design
*: web, website

This commit redesigns the editor toolbar improving its visual appearance
and introducing substantial changes wherever it is rendered.

== "Into-sidebar" design
The grid layout has been refined, improving its components allocation.
For the sake of visual simplification, "list-type" buttons have been
unwrapped from their original dropdown. For the same reason the button
to create a new table has been removed (users will have to use the
command-bar to create a new table).
Table's options have been moved to a section "ad-hoc", visible only when
a table is selected.

== Floating design (backend only)
The toolbar is now white to match the command-bar design.
In order to simplify frontend inheritance, the floating toolbar now uses
grid layout.

== Colorpicker
The generic code necessary for each design has been moved from
'wysiwyg_snippets.scss' to 'wysiwyg.scss'.
The style is now controlled by css variables allowing to customize
critical design properties without the need of SCSS overrides.
By default the design is white(-ish) to match the floating toolbar,
while in 'wysiwyg_snippets.scss' the variables are customized to get the
typical sidebar's dark feel.

Note: despite the task main objective was just to improve/fix the
design, this aimed to simplify design inheritance and reduce the css
too. While inheritance has been improved reducing the amount of
overrides, the attempt to reduce the css partially failed (in the final
lines count must be considered that a new sidebar section has been
created).
The reason is that we currently suffer from a deep and complicated
inheritance structure for this component. The xml template uses default
bootstrap classes that are styled differently depending if loaded in a
community or enterprise environment. This approach leads to overrides
that must cover all the scenarios while further customization must be
taken in account too 'cause the toolbar can be rendered into the sidebar
with a totally different design.

A possible solution would be to detach from bootstrap directly in the
lib using custom classes names, and then @​extend these classes
differently according to the current environment but probably not a good
idea as we want the toolbar to use bootstrap for in-website editors (so
they can match the theme correctly) but this has to be reviewed as well
anyway. To be checked.

Part of https://github.com/odoo/odoo/pull/73565
task-2496339

closes odoo/odoo#73565

Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
2021-08-31 10:00:46 +00:00
David Beguin a3e1310222 [IMP] web: display toaster instead of dialog when change_password goes wrong
This commit is part of the 2 factor authentication revamp.
The purpose is to avoid to display error modals when it's possible to only
display a notification toaser.

Task-2487630

Part-of: odoo/odoo#71142
2021-08-30 21:05:12 +00:00
David Beguin 29db699e9b [IMP] auth_top, *: revamp Two-factor authentication flow
Purpose
=======

Review the UX of the 2-factor authentication flow in order to make it more clear
and easy to use.

Specifications
==============

This commit applies multiple rewording of instructions, button, etc. Tests have
been adapted accordingly.

It also adds an 'invite to use two-factor authentication' flow that will
send an email to the selected used to redirect them their account security
settings.
- If portal is not installed yet, the user is redirected to his account security
settings in backend.
- If portal is installed, the user is redirected to /my/profile if them are
portal user. Otherwise, the redirection is still done at backend side.

As the backend view of auth_totp wizard is used at frontend side, copyclipboard
widget has to be rebuilt at frontend side (click event, style etc..).

As API key section is now displayed only on debug mode, test urls have been
adapted accordingly.

Task-2487630

Part-of: odoo/odoo#71142
2021-08-30 21:05:12 +00:00
Francois (fge) aa797792ca [IMP] web: menu providers command in command palette
Adds the possibility to search an app/menu from the command palette .
It allows for fuzzy-searching apps and their submenus as shortcuts to directly
enter the right app and submenu and execute the corresponding action.

The comamnd is initiated by typing "/" in the command palette.

closes odoo/odoo#75396

Task-id: 2622952
Related: odoo/enterprise#20447
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-30 13:27:58 +00:00
Francois (fge) 118ddcace0 [IMP] web, mail: field widgets' smart action in command palette
This commit adds the smarts actions:
- Assign to... (many2one_avatar and many2many_avatar)
- Assign/unassign to me  (many2one_avatar and many2many_avatar)
- Set priority... (priority)
- Set kanban state... (state_selection)

These smarts actions are commands with hotkeys accessible from
the form views containing the widget to which they are linked.

closes odoo/odoo#75312

Task-id: 2588238
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-30 08:37:01 +00:00
Francois (fge) 22d905bbb5 [FIX] web: owl_dialog_tests tests without module
Two tests in owl_dialog_tests were not correctly added in the parent
module of owl_dialog_tests.

These orphaned tests will therefore be associated with the previous
Qunit.module("name") and it will use its beforeEach.

If the module used does a makeTestEnv in its beforeEach, then the
"remove tabindex on inactive dialog" test will cause
"Error: Cannot add 'xxx' in this registry: it already exists" errors
because the test call createWebClient that does a second makeTestEnv.

closes odoo/odoo#75696

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-27 19:49:08 +00:00
Bruno Boi cbc9f3c649 [IMP] web: support many2many grouping
PURPOSE

Allow to group records by many2many fields.

Use case: turn the user_id m2o field on project.task into a user_ids m2m field
in order to assign multiple collaborators on a task

SPECIFICATION

Add many2many fields to the 'list of groupable fields'.
When grouping a set of records by a many2many, records linked to multiple
records of the comodel will essentially be in multiple 'groups' (even though
those are not really 'groups' anymore).
There will also be a "null" group, for records that have an empty value of the
many2many, like "unassigned" records.

Example: grouping a project.task linked to 10 res.users by the user_ids
many2many field, the project.task will be 'rendered/considered/displayed' 10
times, once per res.users.
Kind of like if we grouped the m2m relation table instead.

When grouping by a m2m field:
- listview
    editing an instance of a record also updates each other instance(if any)
        - the same goes when scheduling an activity, etc.
    disable deletion
        - the risk here is that the user might expected that this will 'unlike'
        the record from a specific record of the many2many field
    disable archive/unarchive
- kanban
    disable drag&drop between groups
    disable deletion
    disable archive/unarchive
- searchview
    display many2many fields custom groupby dropdown

With this commit, we also support groupby many2many field in mockServer so that
test cases are written based on that.

task-2508608

closes odoo/odoo#74985

Related: odoo/enterprise#20192
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-26 16:24:59 +00:00
Odoo's Mergebot 6c4910aac7 [MERGE] {sale_}project,{hr,sale}_timesheet,mail: add Project Sharing feature
Purpose:
=======

This commit adds the project sharing feature. This feature consists to
share the backend views about project.task to portal users.

About the access rights:
- The project manager can share a project with project sharing feature.
  To do this, he need to give access to portal users that we want their access in project sharing views.
  He can choose between 2 differents accesses:
    1. **Readonly**: The use has access to the classic portal views (on which he can post messages, and have a readonly access rights to the related fields)
    2. **Edit**: the portal with this access right will can edit some fields of `project.task` model.

The difference between the classic backend views and the project sharing
views is in the project sharing views, we list the fields that the user
can read/write, so the portal users can see only the fields in
our list.
Moreover, the actions and the contextual menu (actions dropdown) are not
available in the project sharing views and the stat buttons are visible
but the click on these buttons are disabled.

Implementation details:
======================

- add `allow_project_sharing` option in project form view.
- create the webclient and routes.
- create own qweb bundle.
- add project sharing views.
- use the session to define the action and active_id
- create public fields for project sharing: in this step, we lists all field
names of the `project.task` model that we want to display for the
portal user. Two lists are created, one for only readable field names
and the other one for the writable field names.
Moreover, two properties are defined in the `project.task` model to use the
both lists.
- use `access_token` and check model in project sharing route: in this
step we check if the model is `project.project` and the `access_token`
is the one set in the project since we have the id of the project in the
params url.
- protect ORM methods: to avoid the portal user has accessed to too much
fields that he can, we have to check if all asked fields are in
the readable fields, if all fields are available for these users than we do the
method, otherwise we raise an `AccessError` exception.
- allow only `GET` method to enter project_sharing routes: the
`/my/project/<int:project_id>/project_sharing` route must only be
called with a `GET` method because this route is only used to have the template
to render the project sharing webclient.
- redirect the link in one of the sharing wizards to project sharing views if the portal user has an access
to the shared project and if the shared project has the Project Sharing feature enabled.
- only load `project.task` views for project sharing.
- remove longpolling in the project sharing.
- disable click on avatar to open the chat with the user or open the hr.employee form because these features are not authorize in the project sharing.
- remove the contextual action menu in the project sharing views
- add the chatter in the `project.task` form for the portal user with at least 'comment' access.
  This user could send message and see the public message like portal chatter.
- replace the basic portal views when the portal user selects project in `/my/projects` by the project sharing views if the `allow_project_sharing` is enabled for this project and if the portal user can access to the project sharing views of this project.

Why did we implement this feature in this way ?
====================================

We thought to create a `project.task.portal` model. This model had contained all fields that the portal user can read and edit (`readonly=True` if the portal user can just read the field).
We had 2 possibilities for this solution:

1. link this model with `project.task` either with inherits attribute in `project.task` or by creating a many2one field in the project.task.
    The problem with this solution is with `inherits`, we just copy all fields in `project.task` and not method, so we need to duplicate methods used in both models. Moreover, with `inherits` possbility, we have to create all records even if the Project Sharing feature is not used. If we took the other possibility (that is, create the Many2one field in `project.task` model) asks to create records when the `allow_project_sharing=True` in a project and also unlink/archive records when the Project Sharing feature is disabled in a project. The process is harder each time, the user enables/disables the feature. That's why we didn't do this solution.
2. the new model contains a sql view and we use the related field to create/edit tasks in project sharing views.
    We don't do this solution because it was a big change and increase the complexity. Moreover, if the sql view gives all tasks of shared projects, we could have a security issue because the portal user could have access to the tasks of shared project in which he didn't have any access.

Another solution that we thought before doing this feature was to create the kanban view in portal. We didn't do that because:
1. the render of this view will not be the same than the one in `/web`,
2. we didn't want to duplicate the kanban view,
3. we need to allow the portal to create/edit task.

task-2379518

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#73341

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-26 18:24:47 +02:00
Francois (fge) dca9ca6464 [IMP] web: refactor debug commands
Rename `Debug Menu` => `Debug tools...`
Remove `Debug tools...` hotkey

The commands in the debug category need to have a search value
to be displayed.

Task-id: 2622240
Part-of: odoo/odoo#74933
2021-08-26 13:56:14 +00:00
Francois (fge) 8b856c6699 [IMP] web: refactor command palette
This commit is a refactoring of the command palette. It aims to improve
its design and make it very easily configurable. For this, we added the
config props allowing the command palette to know what to display.

The config of a palette command is composed of:
- categoriesByNamespace?: list containing all categories according
  to their namespace;
- emptyMessageByNamespace?: dictionary having for key a namespace and
  for value the message to display if there is no choice available;
- footerTemplate?: template to display in the footer;
- namespace?: namespace to add in the search bar;
- placeholder?: placeholder of the searcher;
- providers: list containing all the providers generating the commands
  to display;
The providers are the only information needed in the config. The rest of
the config is optional.

This commit also adds the possibility to open a custom command palette
using the command service. For this, you just have to call openPalette
and give it the required config.

If the command action returns a config, the command palette  will
not be close and will use this new config.

Task-id: 2622240
Part-of: odoo/odoo#74933
2021-08-26 13:56:14 +00:00
Xavier BOL (xbo) ed0a5ea431 [IMP] web: allow no open in x2m list view in form view
Before this commit, when we set `no_open` in list view for x2m record in
form view, the no_open is not take into account. Either the list is
editable and then the form dialog is no displayed and the user can edit
in the list or the list view is readonly and when the user clicks on a
row in this list view, the form view dialog appears.

This commit changes the condition in the `no_open` to force to set to true
when the no_open is set to true. So, when the no_open=True even if the
list view of x2m record is in readonly, the form view dialog is not
called and thus it will no longer appear in this case.

task-2379518

closes #73341
2021-08-26 14:59:33 +02:00
Arnaud Joset 40fd44f618 [IMP] calendar,google_calendar,microsoft_calendar: Improve UI
Before this commit, the calendar UX was not good enough. The look and feel was not modern.
This commit improves a lot of small details, remove unneeded or not mature features (like the videocall location url).

Counted recurrence now brings a better experience. When weekly or montly recurrences are created, occurences in the past are dismissed but before this commit their number was not adapted.
User would end up with less occurences than the provided number without explanations.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:02 +00:00
Arnaud Joset 57dbfff2db [IMP] web: improve calendar view
Before this commit, the calendar filter was a little bit limited: you could add filters to only display events related to these filtered records or display all events.
If you wanted to select all active filters, we had to check all these individual filter.
This commit introduce the possibility to select all existing filter at once or to unselect them. It is quite convenient when a lot of filter are displayed but unchecked.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:00 +00:00
Arnaud Joset bb9f21d945 [IMP] calendar,google_calendar,google_calendar: allow modifying all event in recurrence
Before this commit, it was not possible to reapply all events in recurrence, delete all events of a recurrence or archive them.
This commit remove that limitation by reapplying the recurrence and remove all the existing events. When the events are synched, the action_mass_archive is used and it must ensure that only a request for the recurrency should be sent.
Individual request for each event are not sent.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:00 +00:00
Benoit Sociasandqsm-odoo f240a42ab5 [FIX] web: avoid freezing the browser when scrolling to undefined
Before this commit the browser did freeze if scrollTo(undefined) was
called. This happened because our "closestScrollable"'s jQuery addition
entered an infinite recursive exploration of .parent() elements starting
from $(undefined).

After this commit such wrong calls to scrollTo() will not freeze the
browser anymore but crash instead. The closestScrollable function was
also made more robust and return an empty element instead of looping.

task-2630257

X-original-commit: d1cda0f3ebb942ad58273db36692f28fa8a3b197
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-08-25 12:02:03 +00:00
Pierre Paridans 055b1eed65 [FIX] web: backport mobile OS detection support
This commit backports the mobile OS detection support, and specifically
Android & iOS one to allow more specific targeting of edge cases (i.e.
disabling native date picker in the mobile iOS app only).

opw-2613810

closes odoo/odoo#75577

X-original-commit: 7015dcd56566e93418f51e8e3562f384d10b4ffa
Related: odoo/enterprise#20446
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-08-25 11:37:41 +00:00
Leonardo Pavan Rocha 7e5b14c40f [IMP] sign: signature wizard behavior improvements
Improves overall signature wizard usage. Signature will adjust its size to best
fit the canvas, but maintaining its ratio.

task-2596079

closes odoo/odoo#73493

Related: odoo/enterprise#19577
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-08-16 12:49:53 +00:00
Jorge Pinna Puissant a81ba713ff [FIX] web: parse and format dates of mock server
On 00e3cb74c4 the migration of the code to
parse and formate dates on the mock server from moment to luxon was
done. Two issues were introduced on that commit: Parsing a date
displayed on quarter wasn't possible; And the ISO week year wasn't used
to format the date, but it was used to parse the date, for symmetry's
sake, now the ISO week year is used on both.

closes odoo/odoo#75354

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2021-08-23 08:08:38 +00:00
qsm-odooandBenoit Socias a48a30f954 [IMP] website, web_editor, *: allow to use pre-configured gradients
*: web

After this commit pre-configured gradients can be used as snippet
backgrounds, snippet filters or as text effects / highlight effects.

The background colors (and now gradients) are now possible to add
*alongside* a color combination class (editing one does not remove the
other). Background colors and gradients are mutually exclusive.

Part of https://github.com/odoo/odoo/pull/73611
task-2599770

closes odoo/odoo#73611

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
2021-08-17 17:43:50 +00:00
Nicolas Lempereur 6943714f53 [FIX] web: pdf.js courier font ok with chrome 92
In new version of chrome (92) or firefox when some fonts (eg. courier)
were used:

- either the page would never finish loading (odoo 13 and below)
- or the text would in this font would not be shown (odoo 14 and over)

This was solved in pdf.js whith this commit:

https://github.com/mozilla/pdf.js/commit/8805614a03

And this PR is backporting that commit in 12.0 version up to master.

opw-2621405 opw-2613412 opw-2620186 opw-2618225 opw-2616690 opw-2615502
opw-2616249 opw-2615144 opw-2613969 opw-2613793 opw-2618129 opw-2617736
opw-2622506 opw-2614508 opw-2620883 opw-2622105 opw-2620863 opw-2615326
opw-2622842 opw-2620220 opw-2622842 opw-2620220 opw-2615346 opw-2615026
opw-2618389 opw-2619382 opw-2613286 opw-2621730 opw-2613412 opw-2622029
opw-2620625 opw-2622311

closes #75020

closes odoo/odoo#75057

X-original-commit: d3feb26c8923cfde60894058f06dc2c2a8be05f5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-08-13 01:29:08 +00:00
Mathieu Duckerts-Antoine a1f286916d [IMP] web: new ControlPanel class
We introduce here an incomplete implementation of the new ControlPanel.
The idea is to allow the rewritting of the client actions that do not
use the search view but only the breadcrumbs or the button zone...
The full implementation of the new ControlPanel will be merged when the
new search infrastructure is ready to be merged.

closes odoo/odoo#75083

Related: odoo/enterprise#20231
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-16 16:03:30 +00:00
Jorge Pinna PuissantandSamuel Degueldre 00e3cb74c4 [REF] web: migrate from moment to luxon
Migrate the code of parse and format dates of mock server from moment to
luxon.

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-08-16 14:56:34 +00:00
Aaron Bohy 6a59d0014e [REF] web: reorganize formatters and parsers
- fields/format.js has been renamed into fields/formatters.js
 - fields/parsers.js has been introduced
 - parsers and formatters from l10n/numbers have been moved to
   fields/parsers.js and fields/formatters.js
 - same for parseCurrency and formatCurrency, and they have been
   renamed into parse/formatMonetary
 - humanReadable option is now a boolean, no longer a function
 - formatPercentage implementation has been simplified thanks to
   that reorganization
 - tests have been reorganized accordingly
2021-08-16 14:56:16 +00:00
Aaron Bohy dc4bff826c [IMP] web: add some field formatters
Reintroduces a registry "formatters" that contains util functions for
formatting field values. Those formatters take the same parameters:
value, field, options.
2021-08-16 14:56:15 +00:00
Jorge Pinna PuissantandSamuel Degueldre b27ec4067a [IMP] web: mock routes/methods defined outside web
Add a registry on the mockServer to allow mocking routes/methods
defined outside web

Co-authored-by: Samuel Degueldre <sad@odoo.com>
2021-08-16 14:56:15 +00:00
Aaron Bohy 24c643bc4f [IMP] web: migrate math helpers
We move some util functions from the legacy file math_utils.js to the
file arrays.js. Those funcions will be used in the new implementation of
the pivot view.
2021-08-16 12:53:51 +00:00
Mathieu Duckerts-Antoine b134c1e45e [REF] web: new view service API
We simplify and document the view service API.
2021-08-16 12:53:50 +00:00
Géry Debongnie 2ebddcc585 [REF] web: remove useless view_utils file
The helper json_node_to_xml won't be used outside of the legacy code.
2021-08-16 12:53:50 +00:00
Mathieu Duckerts-Antoine dd8bf39d2a [REF] web: legacy template name
We prepare the rewritting of the search components for the new weclient:
we rename some legacy templates to allow the new components to use the
natural template names.
2021-08-16 12:53:50 +00:00
Mathieu Duckerts-Antoine b626631241 [FIX] web: ConfirmationDialog size
Before this commit, the confirmation dialogs displayed by the new dialog
service had the size "modal-lg" (default set on the Dialog class).
We set their size to "modal-md".
2021-08-16 12:53:50 +00:00
Mathieu Duckerts-Antoine 2000b122d5 [IMP] web: default title for confirmation dialogs
The confirmation have now "Confirmation" as default title.
2021-08-16 12:52:15 +00:00
Habib (ayh) 44029495bc [IMP] base, account, *: simplify multi currency setup
Automatically activate `group_multi_currency` if there is more than one active currency,
deactivate it if there is only one active currency

retain sale/pos feature of activating group_product_pricelist
adapt tests accordingly

Task 2610735

closes odoo/odoo#74396

Related: odoo/enterprise#20106
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-08-13 14:50:44 +00:00
Francois (fge) ad87436a0f [IMP] web: fuzzysearch test
closes odoo/odoo#74769

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-13 08:58:23 +00:00
Munaf Khan ac34cb5938 [IMP] web,base: improve UI of no content helper in settings
Currently, empty screen of the settings is not very beautiful
without proper action helper and decoration. It displays only
'no record found' string when no setting is found for the
search string.

With this commit, we make the no content helper for the settings
consistent with other apps. It now displays empty folder and
proper helper message.

TaskID-2588387

closes odoo/odoo#74570

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-08-03 04:55:32 +00:00
Antoine Guenet 7ed3f3151a [IMP] mass_mailing, web, web_editor: remove scrollbar on iframe contents
Mass mailing form view currently has a scrollbar for the contents of the
editor, one for the form view itself, and one for the sidebar. In
consequence we can sometimes end up with three scrollbars side by side,
which is ugly and confusing.
This ensures the height of the iframe is always that of its contents so
there is no need for a scrollbar.

When inserting a new snippet we want to autoscroll to that snippet. That
is a complicated situation because the element we want to scroll is not
in the same document as the element we want to scroll _to_.
To address that situation, a new option is added to `scrollTo` so we can
pass it the element to scroll. It can then check if we are in the
aforementioned situation, in which case it can correct the scrolling and
apply it to the right element.
We use that option in mass_mailing to prevent the bug.

Task-2545445

closes #71511
2021-08-12 10:19:14 +00:00
Hardik PrajapatiandMohammed Shekha 15f7b50cf3 [FIX] web: make name field blank on 'Save & New'
Before this commit: when typing something on many2many_tags widget and clicking
on 'Create and Edit' from many2many_tags widget shows form dialog, now clicking
on the 'Save & new' button shows the old value in the name field instead of the
blank value it is because of default context passed, clicking 'Save & New' will
pass old context due to which name field will have old value, this will create
issue when there is unique name constraint, pressing 'Save & New' and then
again clicking 'Save & New' will raise constraint.

After this commit: clicking on the 'Save & new' button will shows the blank
value in the name field, to fix this issue, we removed 'default_name' key from
context.

TaskID-2323194

closes odoo/odoo#75052

X-original-commit: 6e33a4a073acd6d4dc64743d010a8d754ad8a2ff
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-08-12 16:11:36 +00:00
Michael Mattiello (mcm) 962e6947e2 [FIX] web: list error handlers on error handle
Before this commit, error handlers were listed at the start
of  the service and some handlers couldn't be found if they
are not in the registry when the service is started.
Now, they are listed when errors are handled.

closes odoo/odoo#75011

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-12 11:34:50 +00:00
Pierre Rousseau 21cafb0cee [FIX] web: mock active_test for search and search_read
The support for "active_test" context key was ignored in "search" and
"search_read" methods. See https://github.com/odoo/odoo/commit/bf0e3403098a9a36cb7c818388ccca1ea87682bd

closes odoo/odoo#75058

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-13 06:30:40 +00:00
Bruno Boi 670cc8cdc6 [FIX] web: avoid displaying empty dialog
BEFORE
If a dialog is destroyed while the dialog is being opened, an empty
modal is still displayed. This could arrive if its parent is destroyed
in this precise phase.

AFTER
The dialog checks if it has been destroyed right before being attached
to the DOM, so displaying an empty modal should not happen anymore.

Taskid-2461277

closes odoo/odoo#74175

X-original-commit: dbfff9079cccdf209cf4164c3722bc7baa1a16d3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-08-12 14:12:41 +00:00
Aaron Bohy 5996e2003d [FIX] web: correctly position popover
Before this commit, the popover was a bit far from its target. We
use a margin to compensate the arrow size (8px), but we used it the
wrong way, meaning that instead of applying, e.g. a margin of -8px,
we applied a margin of 8px. As a consequence, popovers were always
positionned at 16px from their target.

closes odoo/odoo#74955

Signed-off-by: Bruno Boi <brboi@users.noreply.github.com>
2021-08-11 08:31:41 +00:00
Francois (fge) aa12e9853e [IMP] web: improved api of commands generated by a provider 2021-08-11 08:38:10 +00:00
Bruno Boi b28884161c [FIX] web: legacy dropdown position
Before this commit: the legacy dropdown menus are not placed properly

Issue introduced with commit odoo/odoo@0bb93b2

closes odoo/odoo#74947

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-08-11 07:01:36 +00:00