[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
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
- 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>
*: 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
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
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.
closesodoo/odoo#121292
X-original-commit: dab0187e382e5f93dd5ccc78ecbd7e2f47f5c75e
Signed-off-by: Géry Debongnie <ged@odoo.com>
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.
closesodoo/odoo#121257
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
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.
closesodoo/odoo#121223
X-original-commit: 3d3e6847230d5cc9cd61a9bf83bef403a5b4b3ec
Signed-off-by: William André (wan) <wan@odoo.com>
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
closesodoo/odoo#114401
Related: odoo/enterprise#34663
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The assets bundle system allows to generate `<script>` elements whose
resource is meant to be lazy loaded. In that case, a "data-src" is used
instead of "src" directly as attribute. This is valid HTML code: "src"
is not required. However... this lazy loading system also automatically
added `defer="defer"` which makes the "src" attribute required, thus
failing W3C validation.
Now, we only add "data-src" and the `defer="defer"` part is added on the
client-side, once the "data-src" is switched to "src". Note that this
"defer" attribute may not be needed in this case at all, but it cannot
hurt.
Part-of: odoo/odoo#120311
Before this commit, the date/datetime/daterange fields only allowed for
an optional end date field. This meant that the primary date was always
the start date.
This commit allows the field to do the opposite: with the primary date
being the end date, and having a `start_date_field` option for an
optional start date.
closesodoo/odoo#120695
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Readonly email fields break the layout if the value is long enough
Steps to reproduce:
1. Install CRM and Studio
2. Go to CRM and open any lead
3. Change the lead email and make it too large for the field size
4. Toggle Studio, in the View tab, uncheck 'Can Edit'
5. Close Studio
6. The email overflows its expected position
Solution:
Put the email field inside a grid layout div
opw-3248361
closesodoo/odoo#121020
X-original-commit: 855e72af9907cbfdcf1a0debd8011be9934eeb8f
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
Before this commit, a test spawning a datetime field in an editable list
view would crash randomly based on the assertion that a datepicker
should not be in the DOM after clicking on that field.
This is wrong however since a click triggers a focus, which is the
condition for the picker to open, althouth this mostly happens after an
additional animation frame because of the way the list works (field
becomes editable on next render -> picker then opens on next render).
This commit adds a nextTick delay after clicking on the cell to restore
the intended behaviour, which is to wait for the picker to open.
closesodoo/odoo#120999
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Before this commit, if we try to change the action from a form view
a new record in an x2m and the new action fails to mount, then the new
record in the x2m will always have a virtual id even if it has already
been saved on the server side.
Why:
When you try to exit the form view, the form view will save the record
and not read the record because you leave the view (in the beforeLeave).
But in our case, we fail to mount the new action and so we will stay on
the form view without it doing a read to know the id of the record added
in the x2m. So the view thinks that the x2m still contains a virtual record.
Solution:
Going back to action should rebuild the whole compound. To cause this,
we'll restore the last controller.
How to reproduce:
- Going to a form view with an x2m field and a widget performing a doAction
- Add a line to the x2m
- Click on the widget to change the action
- New action fails to mount, it returns an error
- Close the error dialog
- Edit another field
- Save the form view
Before this commit:
The new line in the x2m is duplicated.
After this commit:
The new line in the x2m is unique
opw-3193765
closesodoo/odoo#120765
X-original-commit: 72f68e2
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, when having a x2many field invisible in a view, and displaying
it anyway in studio, there was a crash because some variable was undefined.
This originated from commit f22961a, which did not account
for the fact that viewMode is an optional props.
After this commit, the util function used by the x2m field and where the
crash occur has been refactored.
Moreover, the x2m field template has also been slightly refactored.
closesodoo/odoo#120918
Taskid: 3305808
Related: odoo/enterprise#40852
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
*: project, web
This commit adds the title and aria-label attributes to the activity
button. This makes the hover display the summary or an explaination
about the button, especially when there is no text displayed next to
the button (in Kanban view).
In the state selection field, a title has been added when hovering
the state in kanban, allowing to see the current value. The project
task state selection has also been adapted to have that title attribute
set on the toggler.
task-3207639
closesodoo/odoo#120871
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Since commit [1], properties can be displayed in list views. However,
when switching from a kanban view showing the properties to a list view
that should be showing the same properties, these are not shown.
This happens because the model in the kanban controller currently uses a
reference of the fields. When loading the list view, the properties are
thus already in the fields, and they are skipped when trying to apply
them.
This commit solves the issue by working with a copy of the fields in the
kanban controller, as the list controller does since commit [1].
[1]: https://github.com/odoo/odoo/commit/70619d0e6a23f955265c99aa6b25924357e46223
Task-3284508
closesodoo/odoo#120128
X-original-commit: 4ccb018ef1d301d2e52fea05b4949d77049be3ca
Signed-off-by: David Beguin (dbe) <dbe@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit adapts the behavior of all readonly fields
to take access rights into account when deciding whether the field
should be editable or not.
Steps to reproduce: give minimal access rights to Marc Demo user,
log in as Marc Demo, go to crm, make sure no one is assigned as
salesperson in a record and check if the add user icon is available.
Also applies to every kanban view fields (like priority,
many2many_avatar, ...)
opw-3265086
closesodoo/odoo#119818
Signed-off-by: Georis François (fge) <fge@odoo.com>