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.
closesodoo/odoo#103203
X-original-commit: 297dfd5499ec50967bf28bb6bf6d1a5d9269b2b5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
Prior to this commit, the mail preview for gift card wasn't readable in
dark mode.
This commit fixes this issue.
task-2710677
closesodoo/odoo#103163
X-original-commit: 360e8da33fa8b1a607a96eb58fc0dcc5e1b07539
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
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
Prior to this commit, the badge hover was not readable in dark mode
task-3012970
X-original-commit: eebd6c42a8669a0c4181a59ae5b33d6bc40d6f06
Part-of: odoo/odoo#103160
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
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
closesodoo/odoo#103118
X-original-commit: 1978a5bfa08a534487d7a70921105f8b5c3a5d30
Related: odoo/enterprise#32740
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
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
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.
closesodoo/odoo#103137
X-original-commit: 70bdf940cc1491fd0cdbae0240d930e8a1d5b25e
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Before this commit the attribute default_order was not taken into
consideration by the kanban view.
closesodoo/odoo#103127
X-original-commit: 0116b590a47c8c12354877498e576ad28e42c1f2
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
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.
closesodoo/odoo#103108
X-original-commit: 36fb5a0d170d9f5692485d0b2fc374951794cd69
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
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
closesodoo/odoo#103128
X-original-commit: 39442c8f8481d6764699236bc6e1595337dc5d1e
Related: odoo/enterprise#32744
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/odoo#103102
X-original-commit: 0653ec8672e5878e40c804ea569dfccbd6105edc
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
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
closesodoo/odoo#103033
Forward-port-of: odoo/odoo#101967
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
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
closesodoo/odoo#103038
X-original-commit: 69fdca133b06eb66443635bc52d380233580ef51
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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).
closesodoo/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>
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.
closesodoo/odoo#102953
X-original-commit: af67305b43d51e1669df19d376d9bda7418ba863
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
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
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
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
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
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
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
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
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
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
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
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
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
closesodoo/odoo#102990
X-original-commit: 3fcc36786453f3006974f5fd0fa395ad5d07d9a2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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 ]
closesodoo/odoo#102754
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
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
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
closesodoo/odoo#102978
X-original-commit: 0510f5ed80bbffbee249e709d1df90192ee08f02
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
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.
closesodoo/odoo#102954
X-original-commit: 1b2686aeadfac97f060a07de86e5a0eb2051eee2
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
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
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
closesodoo/odoo#102932
Forward-port-of: odoo/odoo#102130
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
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
closesodoo/odoo#102911
X-original-commit: 3e71df358caf878409947af1619378fbfeb2be4b
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit refactors the style for borderless inputs and
adds a special class to better manage where they should be used.
closesodoo/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>
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
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
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