Commit Graph
13432 Commits
Author SHA1 Message Date
Renaud Thiry 0553e16dbd [FIX] mail, web_editor: dialog file update event
An event was not called on uploading files in a media dialog.
This meant the parent of html field didn't know of the new attachments
which resulted in attachments being linked to no record at all
and  not being garbage collected later.

This adds a reference inside the media dialog file input so that it can
trigger that event on behalf of the html field.

The attachments newly uploaded in media dialog are uneditable
to prevent users from unlinking attachments
that are still used in the body of the composer (causing the same issue)

Task-2860761

closes odoo/odoo#101405

X-original-commit: f4dd1eb3f25672e7309759c347e2b552c5652b2f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-28 14:19:11 +02:00
Victor FeyensandHoracio Tellez Perez f05c4ae9c8 [IMP] web: util method to apply multiple changes on a x2m field.
X-original-commit: 429357c706c43a67febec05e84b290decf542427
Part-of: odoo/odoo#101352
Co-authored-by: Horacio Tellez Perez <hote@odoo.com>
2022-09-28 11:14:34 +02:00
Victor FeyensandValentin Chevalier 673b784f86 [FIX] web: magic commands in search domain
Before this commit, when we used a domain on many to many relational
fields, the `dataContext()` returned the context of the field, which
contained a command tuple.

This causes an error server side, when a domain [('id', 'in', [[6,
False, [3,4]]])] is provided to search available records to fill the x2m
field.

Now, it returns the `currentIds`, which correctly gives the id(s) of the
records.

Approved by SAD

X-original-commit: 5653e23a333262683257575d071575a63981ca33
Part-of: odoo/odoo#101352
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
2022-09-28 11:14:34 +02:00
Victor FeyensandSamuel Degueldre 80b19b11d6 [IMP] web: make addNew return the newly created record
used in product configurator logic

X-original-commit: 40cfbf35985422a9415e6ab225d037f7393d3842
Part-of: odoo/odoo#101352
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2022-09-28 11:14:34 +02:00
Damien Bouvy d10d80608e [FIX] web: make invalid field borders visible all the time
Not only on hover - otherwise it makes it very difficult for users
to find what field is missing content.

closes odoo/odoo#101349

X-original-commit: b674e81b7ca7e553f593cef1bc1a9f94cd58e3d3
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-09-28 07:39:11 +02:00
Aaron Bohy a076fc14e2 [REM] web: remove two unused field widgets
closes odoo/odoo#101351

X-original-commit: 577e9898029b84a70c85f2eefa68d02e265dd4fd
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-27 22:03:00 +02:00
FrancoisGe 71c6eb1134 [FIX] web: required field compute by another
Before this commit, if an invalid field was completed when editing
another field using an onchange, the field was always considered invalid.
It was not possible to save the record.

Why:
Fields modified by an onchange were not removed from the list of
invalid fields.

Solution:
Remove all fields modified by an onchange from the list of invalid fields.

How to reproduce:
- Create a new record in a form view with a required field
- Click on save (the required field appears as invalid)
- Edit another field that causes a change to the invalid field (onchange)
- Click on save

Before this commit:
    The record is not saved and the required field is still invalid.

After this commit
    The record is saved.

closes odoo/odoo#101343

X-original-commit: 46074244798d2e447f4e5cf174244ea263563b1d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-27 21:08:54 +02:00
William Braeckman 6a0efdb7c4 [IMP] web: expose before and after execute action on controllers
Make it possible to override both before and after execute actions on
all view controllers using `useViewButtons`.
This avoids having to change a value in the env to override the function
being called when clicking on a button.

closes odoo/odoo#101310

X-original-commit: 9f6c2b8e969635f35786d58ee89ca767ff57144d
Related: odoo/enterprise#31860
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-27 18:14:49 +02:00
William Braeckman dc930e8e2a [IMP] web: add afterExecuteAction to view_button_hook
The function will be called after the action has been executed.

X-original-commit: 1e4c6e457a9c42da76c647ca0972b06e6d838349
Part-of: odoo/odoo#101310
2022-09-27 18:14:49 +02:00
FrancoisGe cb022c00a3 [FIX] web: discard invalid input field
Before this commit, in a form view, discarding a record with an invalid
field containing an input does not restore the original value.

How to reproduce
- go to a form view with an integer field
- edit the integer field with an invalid value ("blabla")
- click outside the field (the field is displayed as invalid)
- click on the discard button

Before this commit:
The integer field always displays the invalid value.

After this commit:
The integer field displays the value before the edit.

closes odoo/odoo#101316

X-original-commit: f81e4019ca00953d9624557c98033aef46efc47a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-27 17:11:53 +02:00
Simon Genin (ges) a105e8b3cb [FIX] web: pager offset in list interprets 0 as falsy when it shouldn't
If a view with groups and pager, going next then previous (back to the 0
offset) doesn't work.

The pager offset and limit were used in an conditional expression.
If the value was 0, it was considered falsy and set to a default value
while the 0 was actually a valid and expected value.

closes odoo/odoo#101314

X-original-commit: 5c9173241dbe55007c3a84fe078d21ea733e9046
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-09-27 17:11:48 +02:00
Simon Genin (ges) 6233bcbac3 [FIX] web: markup no content helper with session storage actions
When an action was retrieved from session storage, the no content helper
content was not markuped. It would therefore display hmtl text on the
user screen.

closes odoo/odoo#101306

X-original-commit: 592b8016b8a44dc1775918e4ffbf572e9b02c50f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-09-27 17:11:34 +02:00
Michael (mcm)andluvi 710271240f [IMP] web: remove readonly mode of form view
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
  it means that the fields in the view are always in edit mode except
  if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
  the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
  button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
  hovering the status text in control panel.

task id: 2822553

X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
2022-09-27 12:43:50 +02:00
Michael (mcm) 305fbc0e10 [IMP] web, mail: change layout of form view
This commit changes the layout of the form view to move the
control panel next to the chatter instead of being on top.
The chatter now takes all the place on the right side of the view.

task id: 2822553

X-original-commit: 7f36dd05b3238c3d27aab6e5af12233df27067e4
Part-of: odoo/odoo#101118
2022-09-27 12:43:50 +02:00
Michael (mcm) c02e4316bb [IMP] web: open m2o record in target current
This commit adds an option to many2one field to open the record either
in target new (dialog) or target current (replace view) which is now
the default.

task id: 2822553

X-original-commit: abe26f6eebb450512b35c25094329f85b98c15d9
Part-of: odoo/odoo#101118
2022-09-27 12:43:50 +02:00
stefanorigano (SRI) 017045426a [FIX] web: ListRenderer, invalid cell border-color
Correctly set the border-color in case of invalid cell

task-2984169

closes odoo/odoo#101151

X-original-commit: fd355cc609cddc20e7c01a7ca12f93d6cd05c7ac
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-27 11:41:44 +02:00
Géry Debongnie 0cd2a8e1fe [IMP] web: update owl from 2.0.0-beta-20 to 2.0.0-beta-21
Release notes:

https://github.com/odoo/owl/releases/tag/v2.0.0-beta-21

Details:

- fix: prevent side effects at template compilation
- fix: props validation: does not crash with t-call-context
- fix: make t-portal work in all cases
- fix: make props validation work through slots

closes odoo/odoo#101207

X-original-commit: a09733b8d60ba36327695657221304ef19eaed42
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-09-27 08:12:51 +02:00
Laurent Stukkens (LTU) 68998a428a [REF] hr_timesheet: convert kanban and list views to owl
Tests adaptations will come in a following PR, but the current focus is set on owl conversion.

task-2936932

closes odoo/odoo#101208

X-original-commit: 22c8e0ec8cd0ffc6a14302fc548bb5fffc5c4e11
Related: odoo/enterprise#31820
Signed-off-by: Xavier <xbo@odoo.com>
2022-09-26 23:46:12 +02:00
Laurent Stukkens (LTU) 902bb30f85 [IMP] web: allow formatFloatTime to return seconds
This commit adds an option which allows getting the seconds in the
returned formatted hour.

task-2936932

X-original-commit: c7a3a40cadfe5f2db951860173417044e8e365c1
Part-of: odoo/odoo#101208
2022-09-26 23:46:12 +02:00
Bruno BoiandJorge Pinna Puissant ed9a9d024a [REF] *: calendar view in owl
This commit introduces the new calendar view written in owl.

closes odoo/odoo#101185

X-original-commit: e88988f58582d5b49a32d7102a74a176f40c4c69
Related: odoo/enterprise#31808
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-09-26 22:48:44 +02:00
Jorge Pinna PuissantandBruno Boi 3f15989e15 [MOV] web: transfer settings touch customization to community
This commit adapts codebase following the move and integration of the
touch device detection and customization (through the o_touch_device
class) in community.

X-original-commit: f3adc2b0f70feb80292f6c755d53690e49647dbb
Part-of: odoo/odoo#101185
Co-authored-by: Bruno Boi <boi@odoo.com>
2022-09-26 22:48:44 +02:00
Bruno BoiandJorge Pinna Puissant 156d41dbda [MOV] web: transfer ActionSwiper to community
This commit adapts codebase following the move and integration of the
touch device detection and customization (through the o_touch_device
class) in community.

X-original-commit: 5ae86ad473dd69559820b1f599ce389484cdebbc
Part-of: odoo/odoo#101185
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-09-26 22:48:43 +02:00
stefanorigano (SRI) 0905396760 [FIX] web: listRender, remove outline effect on hover
task-2995570

closes odoo/odoo#101150

X-original-commit: e6a8f225b8e3bc9044e8721ee72d6654f90aa4d3
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-09-26 18:57:20 +02:00
Simon Genin (ges) 66289abd5e [FIX] web: fix reactivity in custom filter menu
Before: On a map view, a bunch of points get loaded one by one. Each of
them triggering a new render of the controller. Currently, the useModel
hook does a deep render no matter what. If you are trying to set a
custom filter un the filter menu in the control panel, the content would
systematically diseapear (rerendered) when a new map point loaded.

After: To prevent this, setting the input node as t-model is a solution.
It allows owl to keep track of the value of the input and correctly
set it back when a render occurs.

closes odoo/odoo#100421

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-26 15:47:44 +02:00
Gorash ad86588bfd [IMP] web: convert profiling qweb javascript widget to owl
closes odoo/odoo#101117

X-original-commit: 547157a79e185e21689ef2257c9b88bd38dca1f9
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-09-26 14:43:11 +02:00
Aaron Bohy f7db0861c3 [FIX] web: ListView: correctly position no content helper
Before this commit, the no content helper was displayed just
below the control panel in empty list views, whereas it must be
displayed approximately in the middle of the screen.

The `position: relative` has been introduced recently, and doesn't
seem useful, so we simply remove it.

closes odoo/odoo#101108

X-original-commit: ee18aa1f6b85eb420e198775592a9e0772cc8475
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-26 13:41:52 +02:00
Michael (mcm) a87ac2ac36 [FIX] web: fix field selector popover style
Before this commit, the popover was incorrectly
positionned because of the style of the legacy widget.
The legacy widget added some rules to add margin and an arrow
that the new component does not need.

closes odoo/odoo#101097

X-original-commit: bd4862774264c5169aa2dcf4cd80908c2f4c71bb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-26 12:39:54 +02:00
FrancoisGe 2c26a810c8 [FIX] web: wrong domain in a new column
Before this commit, in a Kanban view, the group representing
a new column did not contain a domain. Its domain should have combined
the view domain and the groupBy domain ([groupByField.name, "=", id]).

How to reproduce:
- Go to a grouped kanban view with a progress bar
- Create a new column
- Create a record in this new column
- Click on the progress bar to filter the records on a state

Before this commit:
All records corresponding to the selected state are displayed in the
column. (even the records that are not part of the column)

After this commit:
Only the new record is displayed in the column.

closes odoo/odoo#101096

X-original-commit: 1022262c6fcd51c8d4fc8024217542bb1f536d2c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-26 12:39:52 +02:00
qsm-odoo 30e9cff16d [FIX] web: fix font used on the frontend when website is not installed
Before this commit, when website was not installed, the frontend used
the default bootstrap font. That font was not receiving the unicode
support Odoo provide in the backend or the frontend when website is
installed. This is probably visible on some portal pages in hebrew or
something like that, so this could back-ported in stable if found
necessary (in that case, the fix to the `o-add-unicode-support-font` in
this PR should be back-ported too).

task-2993054

closes odoo/odoo#101068

X-original-commit: f7cfcae0f0169774e0b66b8b8083005a7cd34eaa
Related: odoo/design-themes#593
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-26 11:36:49 +02:00
qsm-odoo 48d4aa7ceb [IMP] website: add a system fonts option and use it in the default theme
To allow increasing page loading performance, websites can now choose to
use system fonts instead of using a google font. It is also the default
in the default theme of Odoo from now on. The option will automatically
be available for all themes whatever way they defined their available
fonts but will only be used as default if explicitly asked by the theme
(as done in the default theme).

task-2993054

X-original-commit: c0f2f670eb087991cc9a6a67f4beea5f12bd15f2
Part-of: odoo/odoo#101068
2022-09-26 11:36:49 +02:00
qsm-odoo 362e93ddaf [IMP] web: ease use of o-add-unicode-support-font
Before this commit, the function (which allows adding unicode support
to a font definition) relied on the fact "serif" or "sans-serif" was
defined last in the given font. If that was not the case, you had to
give the position in the given font stack where you want to include
unicode support).

Now, if no position is explicitly given, the function does not suppose
"serif" or "sans-serif" is defined last. It only supposes it is defined
somewhere in the stack, and put unicode support just before.

task-2993054

X-original-commit: 1f34ef2b64aad34ab533e77b1f31e434a5a17af1
Part-of: odoo/odoo#101068
2022-09-26 11:36:48 +02:00
Denis Ledoux ba7bc2e8cb [FIX] web: kanban do not allow to drag grouped by readonly fields
When the kanban is grouped on a readonly fields,
it shouldn't be possible to drag and drop a record from
one column to another.

It was the case when the field was part of the view architecture,
but not when the fields wasn't part of the architecture,
despite we have the information as we have the field description
through the search view / the control panel.

This is a bug which has been introduced during the OWL conversion.
For instance, in 15.0, when grouping CRM leads by sanitized phone,
it wasn't possible to drag and drop records from one column
to another.
In master this is possible.
Besides, in the legacy code, the readonly information
is read from both the field in the architecture and the general
field descriptions:
- https://github.com/odoo/odoo/blob/67191359f2e71be85e6e72d64720bb2748008b3f/addons/web/static/src/legacy/js/views/kanban/kanban_renderer.js#L506-L515

In addition, compared to before,
this revision allows a new possibility compared to before:
Make draggable when grouped by a field which is by default
readonly in the model,
but which is set as `readonly="0"` in the view.
This is to be uniform with what is done in the list and form views.

closes odoo/odoo#101041

X-original-commit: 2a0f8d9ddba754cfc297b2a0de6e2c56990b1e61
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-26 08:38:40 +02:00
luvi 1fa4f1dc10 [FIX] web,*: whitespaces in form/kanban templates
*: crm,link_tracker,project,sale,utm

Before this commit, in some form and kanban views, there were
missing whitespaces, typically between icons and texts. This was
due to the transition to owl views, because we simply ignored
`&amp;nbsp;` in archs. This commit also fixes a layout issue in
a project view, where the icon and the field should be displayed
in the same line.

closes odoo/odoo#101040

X-original-commit: f5813e348b6052436a4fabaa5837ecc37b15430e
Related: odoo/enterprise#31746
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-26 08:38:35 +02:00
Romeo Fragomeli 738542bba8 [FIX] web: input almost vanishes when toggle (to not checked)
Before this commit, the inputs (radio, check and select types) on
`focus` state wasn't visible due to the override rules in Bootstrap:
```scss
/* Example of rule for checkbox */
.form-check-input:focus {
  border-color: $form-check-input-focus-border;
}

/* Default config of Bootstrap 5 */
$component-active-bg: $primary !default;
$input-focus-border-color: tint-color($component-active-bg, 50%) !default;
$form-check-input-focus-border: $input-focus-border-color !default;

/* Our override in Odoo */
$component-active-bg: $gray-200 !default;
```

This commit, sets the `$o-brand-primary` color (`#71639e` in community,
`#017e84` in enterprise) on the border in focused state.

Note:
before Bootstrap 5, this bug was not present as custom-checkbox was a
custom pseudo-element (`::before`), and so it was not possible to be on
a `focus` state on this pseudo-element.

closes odoo/odoo#101044

X-original-commit: fba258e738d6b629bb79fb5d7d9c9585733d72b1
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-23 22:04:26 +02:00
Pierre Paridans 6c4fb8805e [FIX] web: tags field placeholder when tag selected
This commit properly removes the Many2ManyTagsField and
Many2ManyTagsAvatarField's placeholder when at least one tag has been
selected.

Steps to reproduce:
- In Contacts, open a partner's form view
- Edit and set at least one "tag"
- The placeholder is present next to the selected tags

Note: the placeholder was already present in previous versions.
Reported by FP.

closes odoo/odoo#101042

X-original-commit: 5976e19a31b9b0edaefc1079541514810d12b240
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-23 22:04:23 +02:00
Julien Mougenot 8933614b3c [FIX] web: Do not check non-dirty records validity
Before this commit, when exiting a record in any way, the validity of
each of the fields was checked, even if not dirty. This means that the
user would be locked on a required field if that field got an invalid
value from the server, even with no given input.

In this commit, switching the mode on a record ("readonly" | "edit")
will not go through validation if the record was not dirty.

closes odoo/odoo#101000

X-original-commit: 8a8241503e41486e79ca19f9ca16f413cfabb08b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-23 22:04:15 +02:00
Damien Bouvy d000f2bac4 [IMP] web,mail: remove extraneous titles/tooltips
They tend to come in the way of very obvious things in the UI, repeat
the same stuff that the label, etc.

Titles attributes are not good for a11y, so if needed I prefer replacing
them with an aria-label which:
- doesn't mess up the UI
- works properly with screen readers

I've kept them on nodes that have no text (e.g. icons), otherwise
they're not needed - text needs not be labelled.

closes odoo/odoo#100990

X-original-commit: 1c52c649f99d831de98d349d1ffbc6abc95a93ae
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-09-23 14:37:15 +02:00
FrancoisGe 2edec16782 [FIX] web: create with m2o use the field context
Before this commit, in a list view, the context set on a m2o field
is not used when you edit the field to create a new record.

How:
- Go to a list view with a m2o field containing a context
    <field name="m2o" context={"test":1}/>
- Edit the field the m2o field
- Click on "Create ..."

Before this commit:
The name_create method call does not contain the context defined
on the <field/>

After this commit:
The call to the name_create method contains the context defined
on the <field/>

closes odoo/odoo#100987

X-original-commit: dd1e7fab585ed5a691456632c20097ce443d9d69
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-23 14:37:04 +02:00
Julien Mougenot 30ad9ac2eb [REF] web: Make list and kanban sortable handlers overridable
This commit moves the inline handlers of the `useSortable` hook
calls in the list and kanban renderers to proper class methods.

This allows said handlers to be overridden in child classes.

closes odoo/odoo#100986

X-original-commit: ec5ab1d389a0bdfb37c8b2c6766b6be1330085a7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-23 14:37:01 +02:00
FrancoisGe 9d6c9338e6 [FIX] web: add method "name_get" in sample server
This commit implements the "name_get" method in the sample server.
This is required for m2o fields with the "always_reload" option.

How to reproduce?
go to an empty list view with sample="1" containing a m2o field with the
"always_reload" option

Before this commit
    We have a crash because the "name_get" method does not exist.

After this commit
    The view is rendered correctly with the sample data.

closes odoo/odoo#100985

X-original-commit: 4e53f92caf2527b15439eae041fcd238e2ed8145
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-23 14:36:59 +02:00
Pierre Paridans 9da6640c9a [FIX] web: FormView x2many in notebook shouldn't have padding
This commit adapts the x2many as first notebook tab's child selector to
the DOM of its OWL implementation, restoring the correct padding in this
case.

Steps to reproduce:
- Open Product form view
- Select the Variants notebook's tab
- Tab shouldn't have padding when the first child is a one2many

closes odoo/odoo#100912

X-original-commit: 74875dcc0b84236c0911b117666fc6deb41ed432
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-09-23 12:28:44 +02:00
Yolann Sabaux fc594c6b50 [FIX] web: numpad decimal with number type
Steps to reproduce:
- in Barcode > Inventory Adjustment
In the quantities add a decimal numpad

Issue:
Traceback

Cause:
The field is from type=number. This kind of field does not accept methods such `selectionStart()` or `selectionEnd` which causes an error: https://html.spec.whatwg.org/multipage/input.html#do-not-apply

Solution:
When of type=number, just return.
On Chrome, numpad won't be possible for regions such as Portugese - BR. They would have to use the keyboard key `period`, code '.' in order to be able to put a decimal via the keyboard.
In Firefox, HTML is parsing the input correctly if the browser settings are set to the right localization. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#localization

opw-2956481

closes odoo/odoo#100953

X-original-commit: d95fbd80f63efbb47c9635e299f6ac417c5cb4c2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2022-09-23 11:22:35 +02:00
Leonardo Pavan Rocha 9ed9a0585c [FIX] web: fix web.ReportAction from ignoring cp's height
Currently the web.ReportAction component instantiates an iframe with 100vh of
height, while it should be instantiating the iframe with h-100. It assumed the
only component that would be rendered was the iframe, but we also need to take
into account the control panel and etc.

Also, the ReportAction component wasn't taking into account the height of the
control panel to set the height of the `.o_content` div. This also caused the
iframe to be rendered with the wrong height. This commit fixes this by adding
a flexbox column wrapper before the layout component.

closes odoo/odoo#100938

X-original-commit: 26cb2e1f659597311a06e46a84d7a0a9c3df6f74
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2022-09-23 11:22:32 +02:00
Romeo Fragomeli 8d50b65aee [FIX] web: card-header doesn't have the wanted color
Since commit odoo/odoo@0afe6fbda5
the `$card-cap-bg` was set to `white` to avoid inconsistencies in the
design. But the original value is `rgba($black, .03)` (3% of opacity of
black, almost transparent), this allows to customize the card color
using the utilities classes (e.g. `bg-danger`) but since the header of
the card is not more transparent, this behaviour is not working anymore.

This fix restore the original behaviour to avoid to break Bootstrap.

Steps to reproduce:
* Make an Odoo database without demo data
* Install an app
* Go to Settings
* Click on "Load demo data"
* A modal is open with a Bootstrap Card
* The title of the card has a withe background, not a reddish one => BUG

closes odoo/odoo#100932

X-original-commit: a1c7e3ac1b42beeb5de94307fb1bb5f09c869167
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-09-23 11:22:27 +02:00
Pierre-Yves Dufays 9811f426ea [FIX] web: fix domain widget record counter update + wording
In mass mailing, a button allows you to see selected records. In some case the
displayed view of selected records allows to alter records (ex.: cancel
attendee in event) which then affects the number of selected records. This fix
forces the recompute of the number of selected record when closing the view so
that it takes into account the potential modification done in the selected
record view.

In mass mailing, in the selected records view, the button is called "cancel"
but any action performed in the modal will still be applied. This fix renames
that button to "close".

Task-2921762

closes odoo/odoo#100933

X-original-commit: be4e409ec1c23f64e11796b05643e424a93aba9e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-23 09:21:45 +02:00
Damien Bouvy 252687de19 [IMP] web: replace shortcuts usermenu entry with command palette
Replace the old "shortcuts" cheat sheet with opening the command
palette, which displays these shortcuts (and all of them, not just the
common ones) and also will display a tip regarding how to make the
shortcuts overlay appear.

closes odoo/odoo#100941

X-original-commit: e2625d7bc0c10d7b96912e06bcffe7074cfe6962
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-23 08:26:10 +02:00
Aurélien Warnon 52afb1fc7c [IMP] web: enable extension of 'X2ManyFieldDialog'
This commit simply exports the 'X2ManyFieldDialog' component from its
definition file.

That way it can be properly extended / patched when necessary.

Task-2981969

X-original-commit: 881d8ef998b8a98b89ccbab93dcf1ed76ca1193b
Part-of: odoo/odoo#100940
2022-09-23 08:26:07 +02:00
Aaron Bohy 668378b0f5 [FIX] web: useChildRef: handle conditional children
The useChildRef (used with the useForwardRefToParent hook) allows
to retrieve, from a parent component, a t-ref from a child.

Consider the following scenario:
 - have a parent calling useChildRef
 - have a conditional (with t-if) child calling useForwardRefToParent
 - in the initial rendering, the child is displayed
  -> ref.el points to the correct html element
 - re-render s.t. the child is no longer displayed
  -> ref.el is null, because the referenced element doesn't exist
 - re-render s.t. the child is displayed again

Before this commit, at this point, ref.el will always be null,
even though the corresponding element comes back into the DOM. This
commit fixes the issue by correctly updating the ref, each time the
useForwardRefToParent hook is called.

closes odoo/odoo#100937

X-original-commit: 78d39c79993d1d63c189164f8104e5a3c90f2efd
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-23 08:26:01 +02:00
FrancoisGe c82fdaa538 [REF] web: convert signature field/widget to owl
closes odoo/odoo#100865

X-original-commit: f13e4c486b9d0bf5828f83425b21d11388e45bdb
Related: odoo/enterprise#31653
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-23 08:25:58 +02:00
Pierre Paridans 772a274b04 [FIX] web: grouped kanban column width on smaller screens
This commit restores the almost-full (aka. 90%) width for the grouped
kanban's column (which use .o_kanban_small_column) on smaller screens.
As a reminder, to goal of this specific size is to give as much space as
possible for the column's cards *but* also showing a hint to the
previous/next columns.

Steps to reproduce:
- Open CRM grouped kanban on a mobile-like screen size
- Columns' width is not properly set (too small)

closes odoo/odoo#100911

X-original-commit: 6b60d332a0207342fec0a3a32af8ed30a8a73d91
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-23 07:21:35 +02:00