Commit Graph
16155 Commits
Author SHA1 Message Date
luvi 8bf30a66c3 [FIX] web: fix progressbar alignment in form views
This commit fixes the alignment of the progressbar in form views. A fix
that has been introduced in commit fae1d7a3e22bb6d295ca7d0550d425a9b1af934e made
the progressbar aligned to the right in its readonly state, before turning
into edition, which displayed the field on the left. Since the right
alignment is only needed in list views, the style has been adapted to only
show the 'end' alignment on that specific case.

closes odoo/odoo#103203

X-original-commit: 297dfd5499ec50967bf28bb6bf6d1a5d9269b2b5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-10-14 11:40:01 +02:00
Brieuc-brd ccd45298e4 [FIX] web, loyalty: adapt mail preview for dark mode
Prior to this commit, the mail preview for gift card wasn't readable in
dark mode.

This commit fixes this issue.

task-2710677

closes odoo/odoo#103163

X-original-commit: 360e8da33fa8b1a607a96eb58fc0dcc5e1b07539
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-12 16:14:53 +02:00
Morgane (morm) cb16a9b3b1 [FIX] web: badge border
Prior this commit, there was a height difference between the badges with
an outline and those without it.

task-3012970

X-original-commit: 5a009fa654f40f3348217fff2014f475ce099a49
Part-of: odoo/odoo#103160
2022-10-12 16:14:46 +02:00
Morgane (morm) a5b6ba9f99 [FIX] web : field badge color
Prior to this commit, the badge hover was not readable in dark mode

task-3012970

X-original-commit: eebd6c42a8669a0c4181a59ae5b33d6bc40d6f06
Part-of: odoo/odoo#103160
2022-10-12 16:14:46 +02:00
Xavier Luyckx (xlu) e0711cbe4b [FIX] web: search, adapt mobile search for dark mode
Prior to this commit, the mobile search colors used in dark mode were
incorrect. This commit adapts the mobile search colors for dark mode.

task-3012970

X-original-commit: 5408fadba20a59ce2e186821350b56b2347f7685
Part-of: odoo/odoo#103132
2022-10-12 11:30:04 +02:00
stefanorigano (SRI) feb4b8c2ad [FIX] web: ListRenderer hover & focus states
Since Bootstrap 5.1 cell background color is controlled by CSS variables
in order to effectively handle mixed scenarios (eg. "selected + :hover +
table-info" combined).

Commit https://github.com/odoo/odoo/commit/1d4145dfda1f8a95c3f386ae01fb0e29ddd4be48 forced bg-colors for :hover and :focus states, achieving the
desired result in a simple scenario but inadvertently breaking the
behavior for complex combination and/or different color schemes
(eg. dark-mode).

This commit restore the default BS mechanics for `:hover`, and uses BS
variables to handle `:focus`.

task-3012970

closes odoo/odoo#103118

X-original-commit: 1978a5bfa08a534487d7a70921105f8b5c3a5d30
Related: odoo/enterprise#32740
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-12 11:29:55 +02:00
stefanorigano (SRI) 2088edaccb [FIX] web: provide border-color in primary_variables bundles
Prior to this commit it was not possible to detect/use the default
border-color in within the 'primary_variables` bundle.

This commit define a new `$o-border-color` variable to be used in BS
overrides and by components/functionalities that need it (eg. dark-mode)

task-3012970

X-original-commit: 29cd4ad3601cd6d3d86c8eaa747ddff600061c00
Part-of: odoo/odoo#103118
2022-10-12 11:29:54 +02:00
Julien Mougenot 5a7fd7fe96 [FIX] web: Enhance draggable edge scrolling
This commit does 2 things for the draggable hook builder:

- the scrollable feature will apply on the nearest scrollable parent if
the current element cannot be scrolled (removes the need to pass a
parent ref which is not the target container);

- the dragged element is now strictly bound to the current viewport or
the container ref, whichever is the smallest.

closes odoo/odoo#103137

X-original-commit: 70bdf940cc1491fd0cdbae0240d930e8a1d5b25e
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-10-12 10:34:55 +02:00
Mathieu Duckerts-Antoine df6c716bc2 [FIX] web: kanban: attribute default_order
Before this commit the attribute default_order was not taken into
consideration by the kanban view.

closes odoo/odoo#103127

X-original-commit: 0116b590a47c8c12354877498e576ad28e42c1f2
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-10-12 10:34:50 +02:00
Mathieu Duckerts-Antoine 3c434afd26 [FIX] web: list: no highlight of a column without label
Before this commit, a list header with no label and associated with a
first orderBy field would be highlighted (i.e. would have the class
table-active). Since this is visually weird, we remove that class from
such a header.

closes odoo/odoo#103108

X-original-commit: 36fb5a0d170d9f5692485d0b2fc374951794cd69
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-10-12 10:34:42 +02:00
stefanorigano (SRI) 47d8bf4be6 [FIX] web: daterangepicker, website conflict
The 'transparent' background value has been added by https://github.com/odoo/odoo/pull/99755 to
correctly handle color variations for the backed.
The rule was inadvertently overriding custom designs defined by
website_sale_renting (frontend).

This commit allows to inject dark-mode customization using CSS variables
, while keeping a fallback value used by the frontend.

task-3015397

closes odoo/odoo#103128

X-original-commit: 39442c8f8481d6764699236bc6e1595337dc5d1e
Related: odoo/enterprise#32744
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-10-12 01:25:14 +02:00
Pierre Paridans d98f4d2cf3 [FIX] web: add support for switch type in Burger's UserMenu
This commit adds an implementation of the UserMenu item's type 'switch'
for the BurgerMenu (used in smaller screen).

Note: this commit also adds unit tests for the BurgerUserMenu ; the
asserts are largely inspired by the regular UserMenu tests.

closes odoo/odoo#103102

X-original-commit: 0653ec8672e5878e40c804ea569dfccbd6105edc
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-11 18:56:14 +02:00
Pierre Paridans d2d7a280a7 [MOV] web: matching folder structure in web/tests/mobile as web/tests
X-original-commit: 6d12386ce2a82a4851d021194fa9326ff0f4b334
Part-of: odoo/odoo#103102
2022-10-11 18:56:13 +02:00
Pierre Paridans d616ade15c [MOV] web: BurgerUserMenu file should match class name
X-original-commit: 2cb344aad9f74b54cf8a125ab7ce0e41c56e44fa
Part-of: odoo/odoo#103102
2022-10-11 18:56:13 +02:00
Odoo's Mergebot eebb329fc8 [FW][MERGE] hr_timesheet,web: add owl tests and fix bugs
This PR purpose is to ensure that tests are created on OWL Components that have been created in the context of the OWL migration PR odoo/odoo#100729.

This PR also addresses some bugs that have been discovered during tests writings.

task-3001470

closes odoo/odoo#103033

Forward-port-of: odoo/odoo#101967
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-11 18:55:40 +02:00
Renaud Thiry 96c8dd3ca8 [FIX] web_editor: onAttachmentChange only composer
Due to a previous fix, attachments uploaded through media dialog would appear in the attachments of mail marketting.
That fix prevents attachments from 'dangling' and being garbage collected later.

That fix is now limited to the mail composer in this commit as attachments are only garbage collected for that model, for now.

related commit: c112361bf9e2f5e7b087c5e5b9a31879856b1da4

task 3003939

closes odoo/odoo#103038

X-original-commit: 69fdca133b06eb66443635bc52d380233580ef51
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-11 14:10:25 +02:00
Odoo's Mergebot c4febbbe3a [FW][MERGE] UI css fixes
Followup of #102259

Instead of adding a class to remove field borders, we want the opposite: hide the borders by default, except when specified specifically with a `.o_field_highlight` class (on a parent or the field itself). This makes it much easier to add field borders on specific parts of the ui (just add the class in the template), rather than having to _remove_ the class through a js override, which is far less discoverable.

I converted all the new rules to work opposite as before, same for the JS logic which added the class based on mobile device detection (size + touch support).

closes odoo/odoo#102977

Forward-port-of: odoo/odoo#102823
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:16:11 +02:00
luvi e4ff2afaec [FIX] web: correct form style in x2ManyDialog
Since o_form_view class was not placed on the right element, as the
form is displayed in a dialog, some styles were not applied in x2Many
dialogs using a form view. Now, the selector matches all cases and
dialogs will be stylized as expected, since the class is placed on the
dialog container instead of the first div.

Now, we are consistent both for dialogs and standard form views.

Tests have been adapted to work as expected.

closes odoo/odoo#102953

X-original-commit: af67305b43d51e1669df19d376d9bda7418ba863
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-10-11 13:16:02 +02:00
Pierre Paridans dd9877e080 [REF] web,*: each module handle its own dark mode variables
Instead of having a dedicated module for all-things dark mode related,
this commit moves the (S)CSS files into their respecting modules and
uses `web` and `web_enterprise` to provide the base infrastructure for
the dark mode (cf. dedicated assets bundle).

Note:
Don't forget that you have to handle 2 cases:
1: SCSS variables must be placed BEFORE bright ones
2: CSS variables must be placed AFTER

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:56 +02:00
Pierre Paridans efc30998a4 [MOV] base,web: move onboarding variables in a dedicated file
Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:56 +02:00
stefanorigano (SRI) c8f6bbea46 [FIX] web, mail, lunch: remove the 'default-badge' border
Prior to this commit, the border of any badge was set to "1px
$o-brand-primary" in order to achieve the default badge design that
comes with transparent background.

Unfortunately this rule was affecting colored badges too, leaving no
choice rather then either remove the border (causing misalignment with
siblings default badges) or hide/re-color/keep the undesired decoration
, but with mixed results.

These commit will review the behavior applying an outline (that doesn't
affect badge's placement) to "default badges" only.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:55 +02:00
Brieuc-brd 51b51c04a8 [IMP] web: select2 : redefine and adapt colors
Prior to this commit, there was no common custom file to easily handle
select2 color values (e.g., dark mode).

This commit fixes this issue by redefining the values in webclient.scss.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:55 +02:00
Brieuc-brd ce235f8b03 [IMP] web: Tooltip: adapt for dark mode
Commit preparatory to the introduction of dark-mode.

note: Tooltip variables should be reworked in order to correctly handle
different scenarios. For simplicity this commit will just match popover
colors.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:55 +02:00
Romain Estievenart 06948a763e [IMP] *: adapt bundle to support dark mode switch
This commit adapt all bundle to support dark mode

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
stefanorigano (SRI) 45cfe93166 [MOV] website, web: move odoo logo in web module
Move the file in a more convenient place to be shared and customized to
match different color schemes.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 3fb351e4de [IMP] mail: adapt for dark-mode
This commit adapts several components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 5234fad374 [IMP] web, base: adapt for dark-mode
This commit adapts several components in order to correctly handle
color-scheme variations.

It also allows user_menu to handle switch entries 

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:53 +02:00
stefanorigano (SRI) 1ced9f10aa [IMP] web: add 'odoo' fine-tuned text-color
The '$o-theme-text-colors' provides a list of fine-tuned text-color that
differ from the bg ones since used for text.
This commit adds `$o-brand-odoo` in the list.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) cb8677eb05 [IMP] web: introduce 'border-transparent' utility-class
Since the view's backgound-color has been historically white, white
borders have been used to adjust layout discrepancies between
components.

This commit introduces 'border-transparent' to handle the scenario
regardless by the view background color.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) 9622839cc9 [IMP] web: PivotRenderer, after BS5 cleanup
Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) 17ec20ca75 [IMP] web, mail: introduce bg-view class
Since the view's background-color has been historically white, the
`bg-white` class has been used to make match several UI components.

Despite working for the default color-scheme, this approach leads to
inconsistencies when the default view's background-color changes, eg.
dark-mode.

This commit introduce 'bg-view' to set any element to match the view's
background-color, whatever it is.

Commit preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:52 +02:00
stefanorigano (SRI) 74e6de03be [REF] web: use $input-bg for o_inputs
Partially remove visual discrepancies between odoo and Bootstrap fields,
allowing to use BS variables to control fields' design across versions
and color-schemes.

This commit is preparatory to the introduction of dark-mode.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:51 +02:00
Damien Bouvy c7f804a4f5 [IMP] web: print/action menu styling
closes odoo/odoo#102322

X-original-commit: a41094e772d6bcefbc7764213b1795a06a2fd959
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:15:15 +02:00
Damien Bouvy 0d683bf982 [IMP] web: clearer contrasts between readonly and editable form fields
X-original-commit: f86836af3d1bae533580bc901289a170f094bd9e
Part-of: odoo/odoo#102174
2022-10-11 13:15:12 +02:00
Damien Bouvy 3a09287357 [IMP] web: tooltips & copy
- remove redundant tooltips
- m2o links are internal, not external

closes odoo/odoo#101205

X-original-commit: 664c36af56e1cfc390d007f2ab2ef9eefef48bfb
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-10-11 13:15:06 +02:00
Laurent Stukkens (LTU) d0987e0b25 [REF] web: allow overriding Many2OneField activeActions
Prior to this commit it was not possible to override `computeActiveActions`,
which prevents acting when onWillUpdateProps is triggered as both are private to
the setup function.

task-3001470

X-original-commit: c785327fedd4fa94884af692c21985663a79c454
2022-10-11 13:06:05 +02:00
Michael (mcm) e19ba30650 [IMP] web: confirm on closing tab/browser
Before this commit, the user was not notified when he
closed the tab or the browser while modifying a record.
Now, the user will be asked to confirm the close if there
is at least one invalid field.

task id: 2994132

closes odoo/odoo#102990

X-original-commit: 3fcc36786453f3006974f5fd0fa395ad5d07d9a2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-11 12:13:45 +02:00
FrancoisGe d0e995ba61 [FIX] web: use the correct colspan in the group header
Before this commit, in a grouped list view with at least one
group_operator and optional fields, the aggregated values in the header
are shifted one column to the right.

Why is this?
Adding the +1 to the colspan in the group header for optional fields
is always added on the left side (group name).

Solution:
The +1 should be added on the left side (group name) if there is
no aggregated value otherwise on the right side (pager).

Before:
TH TH TH TH TH AGG AGG TH AGG AGG TH TH TH OP
0  1  2  3  4   5   6   7  8   9  10 11 12 13
[      TH 6      ][TH][TH][TH][TH][TH][ TH 3 ]
[   group name   ][ aggregate cells  ][ pager]

After
TH TH TH TH TH AGG AGG TH AGG AGG TH TH TH OP
0  1  2  3  4   5   6   7  8   9  10 11 12 13
[    TH 5    ][TH][TH][TH][TH][TH][  TH 4   ]
[ group name ][ aggregate cells  ][  pager  ]

closes odoo/odoo#102754

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-10-11 11:07:40 +02:00
Jorge Pinna Puissant f00e544930 [FIX] web, crm: override of form controller save function
Before this commit, some functions overrode the save function of the
form controller. The issue is that this function is only called when the
button save is clicked, and not when we save differently (for example,
when clicking on the breadcrumb).

To avoid this mistake the save function on the form controller was
renamed to: `saveButtonClicked`, and the code that overrode the function
now override the save function of the Record, that it's called at each
time a save is perform.

X-original-commit: b6e3d833e6131562084eb13b2955c22f50ad1e79
Part-of: odoo/odoo#102992
2022-10-11 08:07:49 +02:00
Adrien Dieudonné 7dcdf09a48 [FIX] web: add space above group separators
This commit reverts https://github.com/odoo/odoo/commit/0e0a2014b31e2fc6423e80971ac451a2dfe89de9

Before this commit, the string separator was too close to the
previous label/field.

We now have the same margins as in 15.3.

Steps to reproduce:
- Sales -> Orders -> customers
- Choose any
- Sales	& Purchase tab

closes odoo/odoo#102978

X-original-commit: 0510f5ed80bbffbee249e709d1df90192ee08f02
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-10-10 20:52:22 +02:00
Damien Bouvy efb752123e [IMP] web: unify o_field_higlight usage
X-original-commit: 5f8521342fbad560d9b492cedc9bd9360aa445d6
2022-10-10 19:55:28 +02:00
Damien Bouvy a9a7c9b30a [FIX] web: make notebook html fields visually consistent
No border on html fields in notebook tabs.

X-original-commit: afac4299f1d42b03b7ff080d60853d357dd75df1
2022-10-10 19:55:27 +02:00
Bruno Boi b82787b4ea [FIX] web: display fewer for m2x autocomplete menu
In legacy, an m2x autocomplete would not display extra lines
received from the server inside the dropdown menu.

This commit reintroduce that behavior as it was lost in the
wowl conversion.

closes odoo/odoo#102954

X-original-commit: 1b2686aeadfac97f060a07de86e5a0eb2051eee2
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-10-10 19:55:25 +02:00
Damien Bouvy 68facf03dc [FIX] dashboard, web: o_field_highlight class
Add a new .o_field_highlight class which can be used on fields and field
containers to force having a border on fields (e.g. in places where they
are heavily used inline, like Settings, or where it might not be clear
that you are using a form and that these are fields; e.g. sidepanel,
etc.

This class is automatically added when the device size goes below the
XSS breakpoint, or when the device has touch input (our best metric for
mobile device detection, where hovering is not possible).

X-original-commit: 0f0c8e3b9f7c42c5126dc49d3378d41ad76afbf3
2022-10-10 19:55:25 +02:00
Odoo's Mergebot 35f2de06c5 [FW][MERGE] project: refactor the list and form views in project sharing in OWL
Purpose
=======

Convert the remaining legacy views in OWL. Before this PR, the list and form views are still in legacy in Project Sharing feature. The goal of this PR is to convert those views to have all views in OWL in Project Sharing.

Details implementation
----------------------

- Convert the list view in OWL
- Convert the chatter portal in OWL to be able to convert the form view in OWL
- Convert the form view in OWL and integrate the chatter into it.
- Review the assets used in Project Sharing to reduce the size of the assets since all components and views existing in the backend are not used (only the list, kanban and form views are used)
- Review the rows attribute set on `textarea` HTML element in`TextField` to be able to altered it with a props.
- Change the `FileInput` component to be able to override it to be able to use it when the route is different than the one set by default.
- Fix the `useInputField` hook to be able to use the `TextField` component without any `record` set on its props (since this prop could be optional).

task-2947516

closes odoo/odoo#102932

Forward-port-of: odoo/odoo#102130
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-10 18:08:53 +02:00
Romain Estievenart ab1254e4a1 [FIX] web: restore form and chatter width size
In 15.3, the width was applied on `o_form_sheet_bg`.
As the form view has been refactored in 16, we have to apply
it on the new parent `o_form_view_container`.

We also restore the chatter width to the same value as in 15.3:
```scss
.o_FormRenderer_chatterContainer {
    &.o-aside {
        width: $o-chatter-min-width;
    }
}
```

Steps to reproduce:
- Open Helpdesk on screen at 1534x657
- Open a vip support
- Unfold 'Done'
- Click on 'Ugly Chair', the chatter take a lot of space => bug

Steps to reproduce
- Open Sales
- Open a quotation
- Switch between Order lines, Other info, Customer Signature
  notebook tabs a flicker occurs => bug

closes odoo/odoo#102911

X-original-commit: 3e71df358caf878409947af1619378fbfeb2be4b
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-10-10 18:08:39 +02:00
Michael (mcm) cc138a684e [FIX] web,web_editor: better manage borderless inputs
This commit refactors the style for borderless inputs and
adds a special class to better manage where they should be used.

closes odoo/odoo#102848

X-original-commit: 6b45cd5f3fbe0986e36401308d19214b689adc45
Related: odoo/enterprise#32609
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-10-10 17:11:28 +02:00
Xavier BOL (xbo) da435cfe77 [REF] web: review FileInput to use it with different route
Before this commit, the `FileInput` component can be used with another
route only if the route has the same params than the default one.
For instance, the portal chatter route does not have the same params
name and so, the component cannot be used.

This commit refactors the component to easily override the
component to be able to use it in each case.

task-2947516

X-original-commit: 8fdeea2e9918c8199724b177003f858716d7d5a4
2022-10-10 17:03:05 +02:00
Xavier BOL (xbo) 6a4e3dc030 [FIX] web: allow to change the row on textarea in TextField with a prop
Before this commit, the rows attribute given on the TextField component
was always 2, it is not possible to alter it without overriding the
component.

This commit adds a props to be able to update the rows with a prop
called `rowCount` and this prop can be set via `rows` attribute set on
the field.

task-2947516

X-original-commit: 110915c80c2a2578563283b1744e0e88d80ac4bb
2022-10-10 17:03:04 +02:00
Xavier BOL (xbo) 0c35d43adf [FIX] web: check if record in component props is defined since it is optional
Before this commit, when a component using the `useInputField` hook (for
instance `TextField`) and the `record` is not given in its props, the
hook will crash since it assume the `record` is always defined. However,
the props definition the `record` is optional.

This commit checks if `record` is defined in the component before using
it to be sure to avoid any crash because it is not defined.

task-2947516

X-original-commit: ebe3d00e52dd6097ce55986bc9e3bf9d79ca64cc
2022-10-10 17:03:03 +02:00