Since the attachement viewer was moved to core, this renames it to file
viewer to decouple it from the Attachment model/concept from the mail
module.
Part-of: odoo/odoo#119625
The `mail` module's `attachment_viewer` is useful for more than `mail`
alone. In order to be able to use it in the `web_editor` module (which
doesn't depend on `mail`), we move it to the `web` module.
task-3109331
Part-of: odoo/odoo#119625
This issue only occurs on Firefox because ´has´ is not supported
and the following rule is not applied:
https://github.com/odoo/odoo/commit/2cd0106e63785dd34553c2b4747d72b93b9a7afd
Anyway, there is an existing css rule that is applied if the field
class is correclty added.
Steps to reproduce:
- Open Sale
- Add some content in the sale order line
opw-3201461
opw-3285854
opw-3266130
opw-3244581
closesodoo/odoo#121979
X-original-commit: add1df806157c074fd1a3224d1d8bdf1922481fb
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Prior to this commit, the color of the tooltip arrow didn't match the
popover background when it was a tooltip (white arrow and black popover
content).
However, the css adaptation was already present in `tooltip.scss` using
the css variable `--popover-arrow-color`, but the selector wasn't
correct since the arrow was always BEFORE the content.
This commit fixes the issue by placing the arrow after the popover
content.
task-3329927
Part of task-3326263
closesodoo/odoo#121975
X-original-commit: 0f1fb80ac6e36b8230ffaf3c7c2608d527b451a2
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Have a record with a field displayed with the aceField.
That field should have a value of false (ie: unset).
Display that record on a form view.
With the pager, go on to the next record.
Before this commit, a write was triggered because the aceField considered itself as changed
even though we did not do anything.
This was because the value of false was compared to the ace value (empty string) when leaving the record.
Being different, this triggered the current record to be updated and saved.
After this commit, a false value is locally transformed to the empty string when checking if the field has
some changes. Hence, there is no write triggered.
opw-3326914
closesodoo/odoo#121969
X-original-commit: 74e8d60a6ae19199ae5d0f9d66ca0748f068782f
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce the issue:
1. Go to any of the contacts with partner ledger option.
2. Make the browser window small and observe the text in the partner ledger button box.
Current Behaviour:
The text in the button box does not get ellipsized, rather stays the same and may get out of the button box if the box becomes smaller
Desired Behaviour:
The text in the button should be ellipsized
OPW-3266235
closesodoo/odoo#121167
X-original-commit: ec642f9caba7c6a7a21d9e65ffa0e305ff06678d
Related: odoo/enterprise#40948
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
There is no notification telling which field are invalid when we try to
save a form in a dialog
Steps to reproduce:
1. Install Survey
2. Go to Survey and open any survey
3. Add a question in the survey and try to save it (without entering a
title)
4. There is no notification. Although the invalid field is highlighted
in red, it could be tricky to see it if the field is in a tab
Solution:
Create a method in Record that sends the notification and call it when
the record is not valid in X2ManyFieldDialog
opw-3196166
closesodoo/odoo#121705
X-original-commit: 58f89915c0ad447f0c5896739219f0812cfd4a6a
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Purpose
=======
Never select the white color for the properties tags, it should be
selected manually, because usually the white color is used to not show
a tag in the kanban view (and that color is never automatically
selected for normal many2many_tags widget).
Fix the alignment of the property label.
Task-3208449
closesodoo/odoo#114200
Related: odoo/enterprise#38944
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Like standard avatar widget, we want to open the chat window of a user
when clicking on a many2many / many2one avatar property.
Task-3208449
Part-of: odoo/odoo#114200
Steps to reproduce:
In the kanban view of projects, modify the `is_favorite` field
of a project and apply the "My Favorites" filter.
Cause:
No change is saved.
Solution:
Add autosave for the boolean favorite field.
opw-3291991
closesodoo/odoo#121499
X-original-commit: d1d6f016331c69441c9d3ec7927ed7224c06feec
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Steps:
Material Resources list view.
On a record, set roles A and B, default role A.
Now, delete role A from roles.
Issue:
Default role should be set to B, but remains A.
Cause:
The onchange return the right response.
The StaticList data is updated properly.
The issue is that this function is async, and we don't wait
for all that to be done before notifying the model.
Fix:
Wait for the result (await).
task-2959882
closesodoo/odoo#119214
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
There is no action that uses the search models/components available in
the legacy control panel. We remove those.
closesodoo/odoo#121433
Related: odoo/enterprise#41078
Signed-off-by: Géry Debongnie <ged@odoo.com>
1. Display avatar in top bar next to channel name and description.
2. Edit icon appears on hover.
3. Clicking on the Edit icon opens file browser to upload a new avatar.
4. Certain file types are allowed.
5. Avatar can only be changed for group chat by any member of the channel.
6. For channel it can be done with admin rights.
7. Disable uploading text from file uploader in this case.
Also show avatar of channel/chat conversation in chat window.
Author avatar in message list no longer shown im status.
Chat window header color matches new systray color.
task-2684679
[FIX] mail: make chat window header match systray color
Part-of: odoo/odoo#117357
In 14.0 the menu items in the navbar sections menu could have any level.
Since the webclient refactoring landed in 15.0 0573aca this feature has
been unintentionnally limited to two levels.
More sub menus would simply not be displayed.
**Before this commit**
- Have a menu item with the following path:
`App/Menu/Group/Sub-group/Item`
- The `Sub-group` is displayed as an item. It is clickable but nothing happens.
- The `Item` is not displayed.
**After this commit**
Works properly as it should. See screenshots on the PR description.
closesodoo/odoo#121422
X-original-commit: 708d17ba3a9d12e153069ecb7ae6c8e3d6187dd0
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
This test has been adapted by the milk PR, but it only passed with
all modules installed, because it relied on some items added to the
action menu. This commit makes it more robust by changing the
selector to target the "Delete" item.
closesodoo/odoo#121435
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
pos*: point_of_sale, pos_restaurant, pos_sale
Previously the pos would rerender the entire UI when the window was
resized. In practice, most components do not care about the size of the
UI for their rendering, and so we're doing a lot of needless work, and
also using an owl feature (deep renders) whose perennity is not certain
(we may want to remove the ability to do deep renders completely in the
future).
This commit changes the pos code to use the ui service `isSmall` field,
makes the ui service reactive so that components can subscribe to
changes inside of it with `useState`, and makes the ui service update
its internal state at most once per animation frame, instead of after
100ms without resizing, so that resizing the viewport results in a
smoother user experience.
closesodoo/odoo#121343
Signed-off-by: adgu-odoo <adgu@odoo.com>
This PR aims to change the target of the email widget to _blank. Indeed depending on
your mail provider, it can open the mail editor in your current tab and might not be
practical for the user if he needs information that was present on the previous tab
to compose the mail.
task-3324948
closesodoo/odoo#121277
Signed-off-by: Luca Vitali <luvi@odoo.com>
The fact that callback recorders are put in the env by the action
service has a serious disadvantage. A view using itself some View component
can have easily its own local state and global state polluted by that
subview (views use useSetupView). This would lead to very subtle
problems hard to detect and understand. Moreover, we view the callback
recorders as rather technical stuff and we would like the developers not
to have to think about them. For that reason we pass the callback
recorders as (optional) props to the View component that make them
available in the env. Note that the situation remains unchanged for
client actions (we do not have a View analog component for the actions).
closesodoo/odoo#121050
Related: odoo/enterprise#40901
Signed-off-by: Géry Debongnie <ged@odoo.com>
When importing data and checking the possible values of a field,
clicking on one of the records to open it throws an error
Steps to reproduce:
1. Install Projects
2. Go to Project > My Tasks and trigger the list view
3. Select any record and export it (check the import-compatible export
option)
4. Open the exported file and modify the `project_id` to a non-existing
project name
5. Click on Favorites > Import records
6. Upload the modified file and click on 'TEST'
7. In the `project_id` field, click on 'See possible values'
8. Click on any project, an error is thrown
Solution:
Prevent the form from being opened when the action is in target "new"
Problem:
Opening the record in a target new throws the error `switchView
called but the current controller isn't a view`
opw-3161777
closesodoo/odoo#121384
X-original-commit: 63d43713ea5b2efba2e63b1735954bb2069bc6f4
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
== ISSUE ==
The search component is using a `.bg-200` class which renders a grey
darker than the one of the `o_web_client`. Since we already define
a `background-color` for the web client, we do not need a custom one
on top of it.
== After this commit ==
We remove the `bg-*` class applied to the element so it matches the
`.o_web_client background.`
task-3326289
part of task-3326263
closesodoo/odoo#121347
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
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
closesodoo/odoo#119781
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
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
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@a1e05c8357closesodoo/odoo#121346
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
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
closesodoo/odoo#120437
Signed-off-by: Géry Debongnie <ged@odoo.com>
== 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
[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
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
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
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
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
== 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
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
- 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
*: 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
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
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
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