Commit Graph
16013 Commits
Author SHA1 Message Date
FrancoisGe 39ecfcff49 [FIX] web: sort an open group
This commit solves two bugs:

1. In a grouped empty list view, if you click on a sortable column,
then a crash is displayed.

How to reproduce:
- Go to a grouped empty list view with at least one sortable column
- Click on the sortable column

Before this commit :
    A crash is displayed

After this commit:
    Nothing happens.

2. In a grouped view with at least one open group, columns that do not
have an aggregates value cannot be sorted.

How to reproduce:
- Go to a grouped list view with at least one open group.
- Click on a sortable column that does not have an aggregates value

Before this commit:
    Nothing happens

After this commit:
    The records are sorted by the clicked column.

closes odoo/odoo#102143

X-original-commit: 537bbc79fe0ce34fe8b4746bf4cc86f9ebfc8a12
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-10-05 09:34:59 +02:00
PoMa 16da82cbdd [FIX] account_accountant: disable bank_rec_widget keyboard nav
Keyboard navigation was misleading, and it was adding a box around
focused which was irremovable because it was injected by the browser

closes odoo/odoo#102033

X-original-commit: 519bbe4b55c907bcd71d03e34dbc706d13a2268b
Related: odoo/enterprise#32235
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-05 09:34:56 +02:00
FrancoisGe 63b8a92e9c [FIX] web: html field in list view
Before this commit, in a list view, html fields in readonly mode were
not rendered correctly. It displayed unprocessed HTML.

For the value :
    <div>Hello</div>

Before this commit, it was displaying:
    <div>Hello</div>

After this commit, we display:
    Hello

closes odoo/odoo#101253

X-original-commit: a6292c17b886996c82c797e562b725d63d4a5b7e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-05 09:34:52 +02:00
Mathieu Duckerts-Antoine 6b2dab4868 [FIX] web: list: allow accurate text selection
Before that commit, it was not possible to select some part only
of a input/textarea input in an editable list view.

closes odoo/odoo#102169

X-original-commit: e572c11ecfb994a474ce800e46895e9233fae64b
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 23:00:42 +02:00
Aaron Bohy d9d174efc6 [FIX] web: FormViewDialog: add "Remove" button
In the conversion of the FormViewDialog from legacy to wowl, we
forgot the feature allowing to display a "Remove" button in the
footer, and to execute a custom callback when this button is
clicked. This is used for instance by the Gantt view.

This commit restores the feature.

closes odoo/odoo#102149

X-original-commit: 3eb126d0297a7e3db0cb98cd1ad9555eefaa0cfa
Related: odoo/enterprise#32281
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 22:00:43 +02:00
Aaron Bohy 78c6c70ee4 [FIX] web: FormViewDialog: handle close attr on buttons
Before this commit, clicking on view buttons with attribute
`close="1"` in FormViewDialog didn't close the dialog once the
button action was performed. This commit fixes that issue, and
ensures we do not reload the record if we're about to close the
dialog.

X-original-commit: 32d211a6fd5c121fa5f556f1d78b79421edc6f68
Part-of: odoo/odoo#102149
2022-10-04 22:00:43 +02:00
FrancoisGe afdaf8cb4f [FIX] web: create a record with the widget "many2many"
Before this commit, creating a new record with the "many2many" widget
did not allow to use a context containing a default value
for the parentID (id of the Record containing the many2many).
This value is ignored.

How to reproduce?
- Go to a form view with a field using the "many2many" widget
 with context = {"default_parentID" = ...}
- Click on "Add a new line"
- Click on "Create" (The form view should display the parentID field)

Before this commit:
    The parentID field is empty.

After this commit:
    The parentID field contains the record corresponding
    to "default_parentID".

closes odoo/odoo#102157

X-original-commit: a52eacc5397dc2f98eb052f4cd1e362a97621074
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:58:07 +02:00
Mathieu Duckerts-Antoine 2c60272507 [FIX] web: ModelFieldSelector: click on popover back button
Click on the back button in the model field selector popover used to
often remove too many names in the path created via the selector. For
example, starting with "partner_id.name" and clicking on the back button
in the opened popover would give the invalid path "" instead of
"partner_id". We fix that problem.

closes odoo/odoo#102156

X-original-commit: e4a7b63c68a87d7afef987e8d036d7ba9c5b6f96
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-10-04 20:58:04 +02:00
Mathieu Duckerts-Antoine 7db644da96 [FIX] web: DomainSelector: operator change
In a domain selector, have a selection field and the operator "is set"
selected, then change the operator to be "=". A crash occurs. This
happens because the category of operator change and thus the function
onDidTypeChange of DomainSelectorSelectionField is called with no
parameter. The same problem can happen with DomainSelectorDateTimeField.

We fix that by calling component.onDidTypeChange with the right
parameter in any case.

X-original-commit: a01c2473d93d0d123391ba0131ad505775b3c50b
Part-of: odoo/odoo#102156
2022-10-04 20:58:04 +02:00
Lucas Perais b072e1bd5b [FIX] web: form always edit: a virtual record can be discarded
Before this commit, a virtual record in form view always had the
o_form_dirty class, which is problematic when a tour ends with a virtual record.

After this commit, a virtual non-dirty record in form view doesn't have
the class o_form_dirty, and doesn't have the o_form_saved either as that doesn't make more sense.

closes odoo/odoo#102153

X-original-commit: 0041b9fd8eb75d5b680d94d491e2b9f684b2d0c1
Related: odoo/enterprise#32282
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:58:01 +02:00
Julien Mougenot 5805ca28a8 [IMP] core/utils: make separate useDraggable hook in web
A new useDraggable hook is introduced and used in the various components that
use the feature.

It relies on the draggable hook builder which is a generic way to prepare
specific drag and drop features.

X-original-commit: cb1cfe5f5efe1b683d7fdffde3718bd8bf1bcd86
Part-of: odoo/odoo#102153
2022-10-04 20:58:00 +02:00
Julien Mougenot dc7ac937b0 [IMP] core/utils: improve sortable hook with generic draggable hook
X-original-commit: 13745d597d03b552fe5f73ca81143a49efb8aa9f
Part-of: odoo/odoo#102153
2022-10-04 20:57:59 +02:00
Lucas Perais 288623993a [FIX] web: Notebook: class set on pages should appear in DOM
Have a form arch containing
```
<notebook>
  <page class="myClass" />
</notebook>
```

Before this commit, "myClass" did not appear in the final DOM.

After this commit, it does.

X-original-commit: e886adcb38695bcfa8a9f741d4e496229fb199ff
Part-of: odoo/odoo#102153
2022-10-04 20:57:59 +02:00
Mathieu Duckerts-Antoine 75789de7e1 [REF] web: views: put FormLabel's template in xml.
This commit improves extensibility of FormLabel component's template

X-original-commit: f463f28f6d4c2487d59b713ad9118bbaf19b8d3c
Part-of: odoo/odoo#102153
2022-10-04 20:57:59 +02:00
Mathieu Duckerts-Antoine d21634c394 [REF] web: 'web.Field' template
X-original-commit: 60c7b65f7f8efd5209b9fb0166a69035fb92e911
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais 36385e736d [FIX] web, x2ManyField: allowed to not have an arch set
In which case we just don't render any Renderer.
Useful when we want to render invisible fields.

X-original-commit: e77afa6266a66e9d126d9a0293bb3e0eb8fb0ff3
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais 9c375b48fa [FIX] web: legacyLoadViews: correctly retrieve string from arch
X-original-commit: f1f45d2673fe87abfb8cfdd5b978f16db373b53d
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais a02af5b259 [REF] web: basicRelationalModel: factorize legacyUtilities
The mapping operations between the new RelationalModel API and the
BasicModel is now done in its own file

X-original-commit: 1202610ce6946ee4b2878e19e6ee6038edc9a71e
Part-of: odoo/odoo#102153
2022-10-04 20:57:58 +02:00
Lucas Perais 5cee846bb2 [REF] web: formGroups: improve extensibility
X-original-commit: 9f64da010ef74848a3e4dd6b2c6d99365a0312c2
Part-of: odoo/odoo#102153
2022-10-04 20:57:57 +02:00
Lucas Perais 654b47e253 [REF] web: improve ViewCompiler and FormCompiler extensibility
X-original-commit: b0897a76dbbad039043b29b248ba13bfb518f45c
Part-of: odoo/odoo#102153
2022-10-04 20:57:57 +02:00
Joseph Caburnay ec2b66fb13 [REF] barcodes,web: barcode_handler and field_float_scannable to wowl
closes odoo/odoo#102150

X-original-commit: c57a0ada02bfc1f02b3516f92f87b510942c5a87
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:57:44 +02:00
FrancoisGe 75ca493a15 [FIX] web: click on m2o_avatar in editable/multiEdit list
The goal of this commit is to fix the behaviour of clicking on a field
with the "many2one_avatar" widget in a list view.

Expected behaviour when clicking on a field with the "many2one_avatar" widget:
- Editable list view: switch row to edit
- Multi_edit list view with selected record: switch row to edit
- Other case: open the many2one_avatar record in a form view

Before this commit, clicking on a field with the "many2one_avatar" widget always
opens the record in a form view.

After this commit, the expected behaviour when clicking on a field with
the "many2one_avatar" widget is respected.

closes odoo/odoo#102146

X-original-commit: ad597d414c59723d3c6af5dfdc1a3a41fd4f4032
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-04 20:57:42 +02:00
Romeo Fragomeli bf7997e5ee [FIX] web: quick create inputs don't take all space
Adds `width: 100%` on the `.o_field_widget` so the input it can take the
all width in the "Quick Create" form.

Also, this commit fixes the CSS selector for the `margin`
rule as in the "Quick Create" form view there is no `.o_group` anymore
on `.o_inner_group`.

Steps to reproduce:
* Go to project
* Select a project
* Click on the `Create` button => BUG

closes odoo/odoo#102151

X-original-commit: 774213758c7ddf7b74a9b370457f017e09d9bbcf
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-10-04 20:01:32 +02:00
Simon Genin (ges) a36fdc43cd [IMP] web: toggling an optional field in list view do not unselect row
Toggling an optional field was unselecting the row, but didn't correctly
copy the same bahavior than legacy when it comes to the saving and
discarding of the data being edited.

However, by simply removing the line of code unselecting the row, we get
a better ux for no cost. The user can continue the record edition after
adding or removing columns.

Note that the focus will always be reset to the first column though.

closes odoo/odoo#102142

X-original-commit: 63c87eac6173af13ec84f90a7f25f07a074197f3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-10-04 20:01:29 +02:00
Dardenne Florent (dafl) fc4df3c0b2 [REV] web: kanban: bottom quickCreate button
This commit is the revert of #98703.

closes odoo/odoo#102116

X-original-commit: 64c0ed09f058cff9b3cebfe5480a7efd0caa7be6
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
2022-10-04 19:04:25 +02:00
William Braeckman ee9a282c19 [FIX] web: fix file upload service event listeners
The event listeners were added to the upload object instead of the xhr
object making them being called before they were supposed to.

closes odoo/odoo#102061

X-original-commit: 804467d7b0a583ab36a47212d482b41d29ca2203
Related: odoo/enterprise#32247
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-10-04 17:01:29 +02:00
Pierre Paridans f52486dcc4 [FIX] web: Dialog Form buttons' spacing
This commit applies the proper spacing between FormView's buttons in a
Dialog's footer.

Steps to reproduce:
- Open Notes
- Enable debug mode
- In Debug menu, open "Edit View: List"
=> dialog's buttons have no spacing

closes odoo/odoo#101974

X-original-commit: f67a8fff6c86a67ce2f6a162f1de992fe25eefbd
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-04 12:30:14 +02:00
Dossogne Bertrand 7c4da16b59 [IMP] mail, various: improve mail template usability
Allow our users to modify mail template more easily

- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage

In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.

Update master data to add description on some templates.

task-2944770

closes odoo/odoo#101730

X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-04 09:55:46 +02:00
Habib (ayh)andJohn Laterre 805d2c0820 [FIX] web: monetary formatter in readonly ignores currency_field in field definition
Steps to reproduce:

Select a company whose currency is USD.
Create an invoice in EUR.
Go to the "Journal Items" tab.
The amounts in the "Debit" and "Credit" columns are correct, but the currency symbol is € (invoice currency) instead of $ (company currency).

This should not happen since both of these fields have `currency_field='company_currency_id'` in their definition:
https://github.com/odoo/odoo/blob/702adc878e897461c4c9976110cee84d397ff4af/addons/account/models/account_move_line.py#L90-L99

But since those fields fulfill the conditions in `canUseFormatter`:
https://github.com/odoo/odoo/blob/702adc878e897461c4c9976110cee84d397ff4af/addons/web/static/src/views/list/list_renderer.xml#L228-L229

`currencyField` remains undifined in the `formatOptions` when going through `getFormattedValue`:
https://github.com/odoo/odoo/blob/702adc878e897461c4c9976110cee84d397ff4af/addons/web/static/src/views/list/list_renderer.js#L722-L734

Which is why the current fix looks at `options.field.currency_field` before falling back to `currency_id` when setting `currencyField`.

A test is also added to make sure the issue does not creep back in again.

closes odoo/odoo#101995

X-original-commit: a860370b8ed73c192c652b4a97ac0aa1d1c23936
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Co-authored-by: Habib (ayh) <ayh@odoo.com>
Co-authored-by: John Laterre (jol) <jol@odoo.com>
2022-10-03 21:23:03 +02:00
Mathieu Duckerts-Antoine c57f839721 [FIX] web: list: do not always keep offset
Have a list view with more records that can be displayed with the current
limit. Go to next page and group by some field that produces fewer groups
that the current offset. Before this commit, no group is shown because
the offset is kept when the list reload. The same thing can happen when
the domain is changed.

We fix that bug by setting the offset to be zero when the list reload.

closes odoo/odoo#101975

X-original-commit: bda0bd21c8e6772cbfb0680a2b8b497dbbcfd628
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-10-03 18:20:03 +02:00
Michael (mcm) d1d9a5f2de [FIX] web: reload correct record after print
Before this commit, printing an invoice which is not
created yet reloaded the view with a new record.
Now, the view reloads with the current record.

closes odoo/odoo#101947

X-original-commit: 0bad6ae4185d9b25684d0c47c9cee7c098053707
Related: odoo/enterprise#32191
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-10-03 17:18:26 +02:00
Simon Genin (ges) 76e7dbb532 [FIX] web: kanban groups t-foreach key is always unique
Currently, the keys passed through the t-foreach for looping over the
groups has a flaw. It comes from a method that works as below:
It checks the group has a value => provide a key as group_key_{value}
if not => group_key_{i} where i is the iteration index
But the {value} is acutally just an id of some model. So in some cases,
with low ids (empty DB, tests, ...), you can run into situations where
the keys are duplicates, making owl crash.

This comit fixes the function to make sure it has no duplicates.

closes odoo/odoo#101925

X-original-commit: aadb38e259c25cea69d54c3c62b21d8e747f9b87
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2022-10-03 16:18:55 +02:00
Romeo Fragomeli 15494e434c [FIX] web: inputs should be below labels in xxs_form_view
A rule was missing from the copied legacy rules

Note:
`form-break-table` was not only applied for small screen but also for
other case like quick edit in Kanban.

Steps to reproduce:
* Open Project
* Select a project
* Click on the Create button => BUG

closes odoo/odoo#101930

X-original-commit: de78e8bcbbc02be9024a1dd08379306ae56b0a2a
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-10-03 15:19:32 +02:00
Denis Ledoux 99a9cce9ba [IMP] base, web: set can_create/can_write only on editable nodes
Setting the attributes `can_create` and `can_write` in views
which are not editable is useless as you cannot edit the record
in these views.

This allow to gain some KB when serving the view to the web client,
as well as making the view cleaner.

e.g. the graph view in the CRM > My Pipeline menu

Before:
```xml
<graph string="Opportunities" sample="1">
    <field name="stage_id" can_create="true" can_write="true"/>
    <field name="user_id" on_change="1" can_create="true" can_write="true"/>
    <field name="color" modifiers="{&quot;invisible&quot;: true}"/>
</graph>
```

After:
```xml
<graph string="Opportunities" sample="1">
    <field name="stage_id"/>
    <field name="user_id" on_change="1"/>
    <field name="color" modifiers="{&quot;invisible&quot;: true}"/>
</graph>
```

This revision takes the opportunity to port the `editable` concept
from the server to the web client MockServer,
in order to be able to test the removal of these attributes from the views
in the QUnit tests.

The `_editableNode` JS function added here is the translation of the
existing `def _editable_node` method in `addons/base/models/ir_ui_view.py`

https://github.com/odoo/odoo/blob/f5edde3624f4fe40f87cc7fed7dcfc4bbce1f19f/odoo/addons/base/models/ir_ui_view.py#L1282-L1301

closes odoo/odoo#101902

X-original-commit: f0beddf534a57e972ac3a7bef6afa1caae1dcff3
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-10-03 15:18:55 +02:00
Pierre Paridans 16ddf96e0f [IMP] web: cleanup notebook's styling in Form & Kanban examples
This commit removes unecessary overrides of the Notebook component
styling in the Form and Kanban columns examples.

Additionally, it also moves the most generic styles (like responsive)
into the Notebook component itself.

closes odoo/odoo#101868

X-original-commit: c1b9905b2e17ca0fda3aeb152c2927031d1662c4
Related: odoo/enterprise#32158
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-10-03 12:00:41 +02:00
Jeremy KerstenandBenoit Socias 878351d840 [IMP] base, web, website, *: differentiate essential & optional cookies
*: im_livechat, survey, utm, website_crm_iap_reveal, website_forum,
   website_livechat, website_sale, website_sale_comparison

Before this commit all cookies were considered essential.

This commit makes some of them optional. It also makes it possible for
the website visitor to only accept the essential cookies.

task-2800976

X-original-commit: 9a8a9463289a7446e9be0ef62ff895feb37a4de4
Part-of: odoo/odoo#101845
Co-authored-by: Benoit Socias <bso@odoo.com>
2022-10-03 10:56:58 +02:00
Florian Vranckx 6a9b612a1d [FIX] web: tagline rendering box repport pdf vs preview
Steps to reproduce:
	- Go into settings > Configure Document Layout
	- Choose layout boxed
	- set a company tagline
	- click "download PDF Preview"
Issue:
	The styling of the company tagline is not the same on the pdf and
	the preview
Cause:
	Module lxml from etree would not interpret the html the same way as
	the browser. In the browser, we would have a 'p' markup inside of the
	'h4' for the title. Effectively applying the style from the css
	sheet. In the pdf, the lxlm module place the 'p' markup after the
	'h4'. Therefore it would not receive the styling of the 'h4'.
	Reproduction:
```
	>>> from lxml import html
	>>> html.tostring(html.fromstring('<div><h4><p>hi</h4></div>'))
	b'<div><h4></h4><p>hi</p></div>'
```
Solution:
	Modify the structure so we have a `<div class="h4"/>` element that does
	not have this issue. In version before 16.0, a CSS hack was used
	to keelp the structure the same.

opw-2846247

closes odoo/odoo#101666

X-original-commit: 5aaf60809f596f4ec3ae9c3bc4795b3044da0281
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2022-10-03 10:56:55 +02:00
Géry Debongnie 9567b27e0e [IMP] web: update owl from 2.0.0-beta-21 to 2.0.0-beta-22
Release notes: https://github.com/odoo/owl/releases/tag/v2.0.0-beta-22

- fix: t-call: nested t-call with magic variable 0
- fix: prevent crash in case with t-foreach, t-out and components

closes odoo/odoo#101621

X-original-commit: 8a63aa3e81e32c7447351b1e657b24d8a5f33107
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-10-03 08:59:44 +02:00
Romeo Fragomeli fbf7736c7a [FIX] web: total/subtotal position in invoicing
On the invoicing, the subtotal/total element is misaligned due to the
nesting inception of groups. This commit forces to push the element to
the end (`right`) of the line.

Steps to reproduce:
* Go to Invoicing
* Select an invoice => BUG

closes odoo/odoo#101835

X-original-commit: 27119175d89fbb874967816886eced80cf4b22bb
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-10-02 20:57:44 +02:00
Romeo Fragomeli 688684b218 [FIX] web: total/subtotal position in form view
Since the merge of the CSS Grid system in form view, in form view where
there is a "subtotal", it was miss aligned.

In this commit, we fix two point:
* we use the following CSS rules to don't be impacted by the
 `float: right` elements (e.g. "Coupon Code") and to push all element
 to have the space between.
```css
.o_field_section_and_note_one2many ~ .row.o_group {
    clear: both;
    justify-content: space-between;
}
```

* we modified the form compiler (group) to not add layout/positiong
 CSS rules on the empty `clearfix` element from the ARCH. As before this
 commit this `DIV` was also used for the formula to spread the size on
 the children of a group.

Steps to reproduce:
* Go to sales
* Select a quotations => BUG

X-original-commit: cdc00b03b77cc08bde14ffbc9e6867650f316ea3
Part-of: odoo/odoo#101835
2022-10-02 20:57:44 +02:00
Romeo Fragomeli a6f7d92c66 [FIX] web: height of header in M2O List
We don't we to add padding on the listview embedded in a form view.
So we have added a `:not(.o_field_x2many_list) > ...` on the original
rule to avoid adding these padding on `o_field_x2many_list`.

Steps to reproduce:
* Go to Sales
* Select a Quotation => BUG

X-original-commit: c016560b6b199f00e0d248025a81be02caddff54
Part-of: odoo/odoo#101835
2022-10-02 20:57:44 +02:00
Romeo Fragomeli 077901cd3e [FIX] web: newline on M2O Avatar Field
Since the `Many2OneAvatarField` field was rewritten in OWL component,
there is a newline between the image and the input.

We apply a `d-flex` on the parent to fix the problem.

Steps to reproduce:
* Go to Helpdesk
* Select a ticket
* The field `Assigned to` is on two line => BUG

X-original-commit: 1c88a43a4332ea4fa21ae2b04fdb8869300250d8
Part-of: odoo/odoo#101835
2022-10-02 20:57:43 +02:00
Romeo Fragomeli 9331ac07d1 [FIX] web: form view set max-width of sheet to real XXL container
On large screen, the sheet in form view has too much space around.
This is due as the `max-width` was set to the `width` of the `XL`
container and not the `XXL`.

Note the size in `$container-max-widths` are:
* sm: 540px
* md: 720px
* lg: 960px
* xl: 1140px
* xxl: 1320px

Steps to reproduce:
* Open a form view with a sheet => BUG

X-original-commit: 27450c9c5d76fee9922a4625f5129b91976a6c55
Part-of: odoo/odoo#101835
2022-10-02 20:57:43 +02:00
Romeo Fragomeli 54e014b732 [FIX] web: keyboard navigation visual on row
This commit restores the highlight on the row when we navigate with the
keyboard.

Note we use `:focus-within` to maintain the highlight when we are in a
sub element of the row (e.g. `th`, `td`, some sub `div`, ...)

Steps to reproduce:
* Open a list view
* Use the keyboard to navigate => BUG

X-original-commit: 277fbfadd03133187b6d015f996e5197db5da5b1
Part-of: odoo/odoo#101835
2022-10-02 20:57:43 +02:00
Mathieu Duckerts-Antoine b6a0e89371 [FIX] web: list: care about allow_order option
Some overrides of search might allow to sort on non sortable fields like
my_activity_date_deadline on crm_lead. An option allow_order was used
to indicate that to the legacy list view. The new list view introduced
with https://github.com/odoo/odoo/commit/bc0a0cead62edd1e0b299fb9a90cd21792814618
no longer consider that option and consequently the Pipeline list view
of crm can now longer be sorted by my_activity_date_deadline. The same
happens in some other views.

In this commit, we reintroduce the use of that option in the list view
and fix that problem.

closes odoo/odoo#101837

X-original-commit: 52481d55ef857ffc1004d27216cbf6b81a527b14
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-02 13:11:47 +02:00
Joseph Caburnay af12d17b9d [REF] web: port timezone_mismatch to wowl
closes odoo/odoo#101811

X-original-commit: 1666d7625e19ed37184a72e625db8b89c8d10bf0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-02 13:11:44 +02:00
Simon Genin (ges) 4c255c7501 [IMP] web: improve copy clipboard design
closes odoo/odoo#101836

X-original-commit: e04afa1836563113402647cf05d957ff7d093d26
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-10-01 18:00:44 +02:00
Mathieu Duckerts-Antoine fecde580d5 [FIX] web: tree found in action views
Before this commit, open an act window action asking for a tree view
would cause a crash. We fix that.

closes odoo/odoo#101831

X-original-commit: fa6fd8b079ad3347f3571654f07bf9751834654d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-01 17:04:48 +02:00
Aaron Bohy dac7511153 [FIX] web: SelectCreateDialog: onCreate default behavior
Before this commit, with its default props, the SelectCreateDialog
displayed a "Create" button in its footer, but clicking on it does
nothing.

This commit simply opens a FormViewDialog to create a new record
of the given model, like in legacy. This default behavior can still
be overridden thanks to the props "onCreateEdit".

X-original-commit: 3afaad687e8ca8cb34a7bf7121e75a5a583762ed
Part-of: odoo/odoo#101819
2022-10-01 14:52:27 +02:00
FrancoisGe 40c79a8a5f [FIX] web: state selection field on the right
Before this commit, in a form view, the state selection button was
placed on the left. It should be on the right.

closes odoo/odoo#101818

X-original-commit: c5f22e1f0b8f1f0eae42666ec5732e590957e21e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-01 14:52:24 +02:00