Commit Graph
17090 Commits
Author SHA1 Message Date
Jorge Pinna PuissantandAaron Bohy 58ca40b032 [REF] web, *: move progress bar to kanban view
The aim of this commit is to remove the specific complexity of the
kanban's progress bar from the relational model, and put it into the
kanban view itself.

This commit prepares and is part of the task that aim to refactor the
relational model and migrate it to owl.

part-of task-id 3179751

closes odoo/odoo#119781

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2023-05-15 11:41:20 +02:00
Jorge Pinna Puissant d145b1e627 [IMP] web: add rpc calls tests for kanban progress bar
In this commit, we add the list of rpc calls done in the progress bar
tests, this is done to avoid to add more rpc's doing the refactoring.

Part-of: odoo/odoo#119781
2023-05-15 11:41:20 +02:00
Aaron Bohy c091afdf26 [FIX] web: re-enable pivot test inadvertently disabled
Commit [1] commented the second half of a pivot test (I guess it
was done to debug it, and we forgot to uncomment it afterwards).
This small diff was then lost in the huge diff of the Milk PR.

This commit re-enables the full test, which luckily still pass.

[1] odoo/odoo@a1e05c8357

closes odoo/odoo#121346

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-15 09:37:59 +02:00
Xavier Bol (xbo) 1c2ce8c213 [IMP] web: display the current user first in the result of name_search
Before this commit, when the user wants to self assign to a task for
instance, he has to write his name to be able to select himself.

This commit displays the current user first in the result of
`name_search` (the method called by relational widgets in JS).
If the current user does not satisfy the search condition then
he will not be in the result of the `name_search`.

task-3291745

closes odoo/odoo#121146

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-15 09:37:56 +02:00
Pulinckx Pierre (PIPU) f4f0f78318 [REF] *: Replace underscore.js function by native JS
Before this commit : The library underscore.js and
underscore.string.js were used in the ODOO solution.
After this commit : Every usages of a function from
underscore.js lib has been replaced with native javascript.
The goal is to remove all usages of underscore.js and to
not use anymore this library in ODOO.
---
TaskId : 3246238

closes odoo/odoo#120437

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-05-15 09:37:48 +02:00
Antoine (anso) de2e44e7be [FIX] web: "x record(s)" button
`.btn-link` is more appropriate as there is no background to the button

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:24 +02:00
chrysanthe(chgo) 7809147f59 [IMP] web: improve input colors
== ISSUE ==

If you go to the Payroll Module, you can see that the checkboxes on the
main dashboard have a different color for the `background`
and the `border`.

This is due to inconsistencies in the color theme.

There was also an issue with the checkboxes in Accounting.
If you go to Accounting > Configuration > Currencies
and hover a checkbox, the checkboxes have a different background than
the one in Payroll which is not consistent.

== After this commit ==

The `background` and `border` color of the inputs are set
to the enterprise one. We also handle this in dark mode.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:23 +02:00
Elisabeth Dickinson 45b9e04db4 [IMP] *: status buttons fix
Part-of: odoo/odoo#116641
2023-05-12 22:59:23 +02:00
Aaron Bohy f9b8414823 [IMP] web: remove old search menus
Overseeded by the SearchBarMenu.

Part-of: odoo/odoo#116641
2023-05-12 22:59:23 +02:00
Romeo Fragomeli 475aa6ca49 [REF] web: introduces search bar toggler component
Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Pierre Paridans eef262abf4 [FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours

[FIX][TMP] account: CogMenu selector in tours

[FIX][TMP] web*: Breadcrumb targetting in tours

Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).

add classname on last breadcrumb item

[FIX][TMP] project: View buttons selector in tours (moved away from CP)

[FIX][TMP] project: Kanban selectors in tours (quick create)

[FIX][TMP] *: SearchBar selectors in tours (toggle menu)

[FIX][TMP] *: ButtonBox selector in tours

[WIP][IMP] web: add toggleSearchBarMenu in search helpers

adapt and unskip 3 list tests

adapt and unskip calendar tests

unskip web_tour test that actually pass

post rebase fix

allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later

post rebase fixes

fix

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Damien Bouvy 3aaa0bfff1 [FIX] web: don't override control panel display
The control panel 'display' prop provided to the list controller can
sometimes be falsy instead of being an object - in that case (mainly
studio), the cp should not be displayed at all. The display getter did
not return a structure that allowed this to behave properly.

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Elisabeth Dickinson 80098df3dd [FIX] *: fix ribbons position and size
This commit fixes the ribbons used in `kanban` and `form` views.

The SCSS uses the square root of the parent `div.ribbon` to calculate its
diagonal width and applies that width to the child `span`.

After changing the ribbon's transform-origin, we calculate the ribbon's
position based on CSS variables of the view's top padding,the height of
the ribbon and the shadow's size (to avoid it being cropped by
overflow-hidden).

By changing the values of a few of these variables in the kanban view,
we were able to remove all the specific SCSS related to ribbons in the
modules.

Other changes were applied inside some of the modules to make this
work:

- `event`: padding corrections on the kanban's cards;
- `hr_holidays: replaced `margin:0` in the SCSS with negative margin
utility classes on the element to achieve the same visual result;
- `discuss`: moved the ribbon to the parent element;
- this was also done to `discuss`, `survey` and `helpdesk`;
- `crm_team_view` in `sales_team`: the ribbon's height made it overflow
from the kanban's card. We fixed this by changing the value of one of
the CSS variables in the view's SCSS file;
- the same thing was done in `survey` and `appointment`;
- `website_event_exhibitor` had some SCSS that wasn't being used because
it uses `.o_ribbon` instead of `.ribbon`

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:21 +02:00
Brieuc-brd 8a2875bb38 [IMP] delivery, sale_loyalty, project: adapt for milk
This commit adapts the spacing between the buttons in the
sale_order_views to fit with Milk.

project: layout fixes:
- Fixed kog displaying on top of the project status button
- Fixed the flickering in project updates when selecting rows in list
view

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:21 +02:00
stefanorigano (SRI) 3e5a012ebf [IMP] web: BadgeSelectionField, predictable and consistent design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:21 +02:00
chrysanthe(chgo) 4f3e886c68 [IMP] web: fix calendar year view min-width
== ISSUE ==

When you access the calendar view inside a module and render the year
view, there is only one month per row, which is due to the base `rem`
unit value change.

In fact, we introduce a new value for the `rem` unit with Milk,
which is 16px.

On Master, 1rem is actually 12px, so 4px less.

Since the `min-width` of the `.fc-month-container` is defined using rem,
we have :

`min-width: 144px` on Master
`min-width: 192px` on Milk.

This huge difference cause the months to occupy more space than needed.

== After this commit ==

The `min-width` of the month container is removed so we have one single
month per row on small devices. This makes the calendar more accessible
and easier to navigate through for users.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:20 +02:00
Damien Bouvy 56ef4017cd [IMP] web: allow overriding the breadcrumb
Some apps may like to easily override the breadcrumb (e.g.
spreadsheet_edition, which makes the breadcrumb *editable*)

Part-of: odoo/odoo#116641
2023-05-12 22:59:20 +02:00
Damien Bouvy 05b10edc02 [IMP] web: controlpanel selection-actions slot
Selecting records in a list view will trigger the display of UI elements
that will allow users to manage the selection and run actions on the
selected records.

Prior to this commit, this UI section was displayed within the
'additional actions' slot of the CP, but for UI consistency when
switching to/from mobile view (where the searchbar is usually hidden),
a new slot for 'selection-actions' is added to the control panel, in the
same place as the searchbar (indeed the searchbar is hidden when a
selection occurs, so sharing the same space seems like a good idea as it
avoids clipping/overflow issues)

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +02:00
Damien Bouvy 4b21d735f9 [IMP] web: cp responsiveness
- Avoid isSmall in template and use bootstrap display classes for
  better responsiveness
- Re-order items to preserve order between size transitions as much as possible
- Change several breakpoints:
  - Viewswitcher collaspses faster (lg instead of sm)
  - Create 'always' buttons collapse in dropdown faste (lg instead of sm)

Make the searchabr appear/disappear based on sizing for better
responsiveness.

Hide the searhbar by default  once we go under the LG breakpoint,
so that it does not cause re-flows when a user selects a record's
checkbox in list view.

'always buttons' that are meant to always be included in the control
panel are collapsed into a dropdown attached to the 'new' button when
the size drops below a specific breakpoint.

This commit ensure these breakpoints are correctly mirrored between the
JS code and the XML template, and also make sure the 'btn-group' class
is removed when there is no button to display in the dropdown (otherwise
the 'new' button is styled as-if some buton is supposed to be next to
it).

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +02:00
Damien Bouvy 1e706d3069 [IMP] web, *: milk adaptations
*: hr_holidays, stock, sale, product, web, sale, purchase, stock,
   website, survey

Adapt some custom control panels (mainly for custom reports) to the
milk controlpanel.

hr_holidays:
Move the buttons to create a new time off or a new allocation to the
"create button" slot and transform it into a dropdown (creating
allocation requests is clearly a secondary action, not a primary one)

stock:
3 lines does not fit, must be on 2 lines

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +02:00
Damien Bouvy 1136803dc5 [IMP] web: Settings: search input & save/discard buttons
Properly styled search input.

Use the correct slot for "save/discard" buttons, as they should never collapse
even in mobile mode.

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +02:00
Damien Bouvy 8bcbdff415 [IMP] web: reverse the collapsed breadcrumb
The collapsed breadcrumb should list its older entry at the bottom, so
that the reading direction is somewhat linear (start from bottom of
dropdown, go up, then go right - instead if going down the breadcrumb
then go back up before moving right).

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +02:00
Damien Bouvy 012b01fb74 [IMP] web: keyboard shortcut for searchpanel
The unified search panel deserves its own shortcut
Use shift+q to be consistent with the searchpanel's input shortcut (q)

Part-of: odoo/odoo#116641
2023-05-12 22:59:18 +02:00
Pierre Paridans 2a09a948f8 [IMP] web: ControlPanel adaptations on mobile
Part-of: odoo/odoo#116641
2023-05-12 22:59:18 +02:00
Brieuc-brd 0f065ed8ea [IMP] web,mail: pivot & chatter design adaption
Part-of: odoo/odoo#116641
2023-05-12 22:59:18 +02:00
stefanorigano (SRI) 316c4dc801 [IMP] web: control_panel, inject breadcrumbs actions in the right spot
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:18 +02:00
Pierre Paridans ffc359dc5c [IMP] web,*: CP's CogMenu rework to add misc items from favorite
Part-of: odoo/odoo#116641
2023-05-12 22:59:17 +02:00
Romeo Fragomeli c8ca9da7bc [IMP] web: move views' buttons into the view itself
Were previously in the ControlPanel.

Part-of: odoo/odoo#116641
2023-05-12 22:59:17 +02:00
Pierre Paridans caef16ee4e [REF] web,*: ControlPanel layout
This commit brings the ControlPanel into a single line with 3 main
sections:
- buttons & breadcrumb
- layout related actions (ie. the SearchBar in multirecord view or
  ButtonBox in formView)
- navigation (pager, switch view...)

Add new search bar menu, this is a merge of the following components
into one big component display in column:
* comparison_menu
* favorite_menu
* filter_menu
* group_by_menu

Also adapt navigation hook.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Elisabeth Dickinson b2ef35a431 [IMP] *: replace .bg-color by .text-bg-color on ribbons
Also remove unnecessary CSS on ribbons.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Brieuc-brd d17743e34e [IMP] * : add missing borders
Depending on Milk, this commit adds some missing borders.

Also adapts default `border-radius` to apply milk design.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:15 +02:00
stefanorigano (SRI) 23504d3d85 [IMP] web: searchbar, mini-calendar & CommandPalette design
Ensure square-ish table cell in mini-calendar.

Better breadcrumbs actions alignment in ControlPanel.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:15 +02:00
stefanorigano (SRI) 87a6d95c38 [REF] web: calendarView & graphView design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:14 +02:00
824024f8aa [REF] web,mail: formView design
- ButtonBox is moved to the ControlPanel's actions section (center).
- StatusBarField, ButtonBox and PercentPieField design.
- Chatter is moved below the ControlPanel (aka "in the view")

task-2818586

Part-of: odoo/odoo#116641
Co-authored-by: Pierre Paridans <app@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
2023-05-12 22:59:14 +02:00
stefanorigano (SRI) c964329add [REF] web,account: listView & kanbanView design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:14 +02:00
stefanorigano (SRI) fb8c6f652d [REF] web: ControlPanel colors
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:13 +02:00
stefanorigano (SRI) f951b72716 [REF] web: inputs, dropdown, popover, tooltips design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:13 +02:00
stefanorigano (SRI) 79f57643ce [REF] web, mail, hr, website, auth_totp, test_apikeys: top-menu design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:13 +02:00
stefanorigano (SRI) ef31306130 [REF] web, mail: badges design
Part-of: odoo/odoo#116641
2023-05-12 22:59:13 +02:00
stefanorigano (SRI) 051ac37232 [IMP] web, * :introduce o_avatar
*: account, gamification, mail, mrp, note, project, website_blog,
   website_event_track.

Uniform design defining a common element shared across different
modules.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
stefanorigano (SRI) 24e89badac [REF] web,project,hr_holidays: buttons design
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
stefanorigano (SRI) 46b762a1f1 [REF] web, *: milk colors
*: google_calendar, hr_holidays, hr_skills_slides, mail,
microsoft_calendar, point_of_sale, web_editor, website_livechat,
website_sale

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
stefanorigano (SRI) 589f6954dc [REF] web, mail, project, website_slides: backend bootstrap review
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
stefanorigano (SRI) e81f4c1a56 [REF] web: uniform spacing
Uniform measures for spacing elements.

Round up the buttons' paddings: prior to this commit, `.btn` had
unrounded padding that created a blurred effect when we used UI Icons in
it.

task-3280695
task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:11 +02:00
stefanorigano (SRI) 2b32d1431a [IMP] web: increase base font-size to 14px
task-2818586
task-3280695

Part-of: odoo/odoo#116641
2023-05-12 22:59:11 +02:00
Mathieu Duckerts-Antoine 4e33d82e2f [FIX] web: graph: avoid some useless chart renderings
With a slow network, make a new search in the search bar of a graph view
would lead the graph renderer to be rendered twice. This was due to the
fact that in the graph controller template an arrow function is passed
as a prop to the graph renderer. The reactivity system treats that prop
as changing at each graph controller rendering and ask unnecessarily (in
this case) the graph renderer to render.

closes odoo/odoo#121292

X-original-commit: dab0187e382e5f93dd5ccc78ecbd7e2f47f5c75e
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-05-12 20:52:23 +02:00
FrancoisGe be520c4638 [IMP] web: useCommand supports hotkeyOptions
With this commit, all hotkeyOptions are accepted when defining a command
with hotkey.

In the hotkey service, to unify the API with the command service, we will
rename validate to isAvailable and remove the target param because
it is never used.

closes odoo/odoo#121257

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-05-12 20:52:13 +02:00
gawa-odoo dba7056c71 [FIX] analytic: allow filtering based on analytic distribution
Currently, the field `analytic_distribution` does not appear in
the filters, while it should (to be able to filter `account_move_line`
for example).
We added Json to the filterable fields. If not overriden, it will
search on it like a String.

We also have to add a non-stored field to be able to define a search
function for `analytic_distribution`, to be able to search based
on the keys of the json.

closes odoo/odoo#121223

X-original-commit: 3d3e6847230d5cc9cd61a9bf83bef403a5b4b3ec
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-12 20:52:06 +02:00
Julien Banken c93ca58d2a [IMP] web: add "fs" size option for dialog
This commit will add a new size named "fs" for the Dialog component. It
will force the dialog to have a width of 100%.

task-2796157

closes odoo/odoo#114401

Related: odoo/enterprise#34663
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-12 19:54:19 +02:00