Commit Graph
100 Commits
Author SHA1 Message Date
Romain Estievenart 6f63e2349c [REF] web: use bootstrap class instead of css
Small code cleanup with using bootstrap class instead of custom css

task-3439226

Part-of: odoo/odoo#136375
2023-10-03 19:20:06 +00:00
Romain Estievenart 4e1ce46048 [REF] web: nested_sortable code cleanup (remove magic number)
Remove some magic number used by the code with using some browser
constant.

task-3439226

Part-of: odoo/odoo#136375
2023-10-03 19:20:06 +00:00
Romain Estievenart 507c368836 [IMP] *: remove jquery.ba-bbq 🍖
Task Id: 3439226

closes odoo/odoo#133763

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-09-01 15:09:51 +00:00
Romain Estievenart b5e5a922d4 [FIX] base, test_new_api: adapt generated default form view to Grid
When we changed the display of the form in v16, we forgot to adapt the
python framework default form view layout (used when the form view of
the model isn't defined). This provided a weird layout in these case on
Odoo 16.+.

To fix this bad behavior, we adapt the algorithm used to build the
default view form.

Steps to reproduce:
Create a model without a form view and edit it (like we do when you
follow the rd training).

closes odoo/odoo#133837

X-original-commit: 93e95274939abce5f3facde6c8cd29b922d15251
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-08-31 18:53:17 +00:00
Romain Estievenart 2057dd3bfe [FIX] web: traceback occurs on Quick assigns (M2M_tags_avatars)
This traceback only occurs if you quickly assign and close the popover
during the rerender of the popover. We call an element inside the
popover already destroyed.

Steps to reproduce:

- Open a kanban view inside the project app
- Click on the "Quick Assign icon"
- Select a user A
- Press directly "escape" to close the dropdown a traceback occurs
  => bug

closes odoo/odoo#132337

X-original-commit: f75074d225a05571bea87589b81fbefb11b054f4
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-08-19 06:59:44 +02:00
Romain Estievenart 4ae61cee22 [IMP] web *: remove unused jquery.scrollTo library
*: project, mrp_subcontracting

This commit is a code cleanup, we remove an unused lib from the codebase

The last usage of jquery.scrollTo was dropped in saas-16.4 after the
refactoring of livechat, see here [1].

Note that we have our own ´scrollTo´ utility.

References :
https://github.com/flesler/jquery.scrollTo

[1] https://github.com/odoo/odoo/commit/20c1772d351e14e5233a636313dc79c2fe5b9115#diff-8925fb7187d27cf7abc3fbb149a22cdcfa83eaa435a667b5beb042c4fd0fe3fdL220

closes odoo/odoo#132035

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-08-16 17:47:56 +02:00
Romain Estievenart 79ed7b15c6 [FIX] web: Remove M2M tags avatars doesn't work on kanban Quick assigns
Steps to reproduce:

- Open a kanban view inside the project app
- Click on the "Quick Assign icon"
- Select a user A
- Directly unselect this user
- Close the dropdown and open the edited record
- you can see the user A is still assigned => bug

This bug was occurred by a missing awaiting promise inside the deleteTag
method.

closes odoo/odoo#129996

X-original-commit: b345af5389cd0cc3eb5e373d50ea62afc4e46b22
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-07-28 16:29:21 +02:00
Romain Estievenart 90c4acfa44 [FIX] web: tooltip in kanban header doesn't dispose on items click
Before this commit, the kanban title's tooltip was set on the parent
element of the column's title. So the lifecycle (display/hide) of the
tooltip was not handled correctly when we clicked on the "quick create"
button or the "gear dropdown".
This commit moves the tooltip on the title's element to avoid that.

Steps to reproduce:

1. Open the "Event" app
2. Mouseenter the first kanban header
3. A wild tooltip appears (Gotta Catch 'Em All)
4. Click on the quick create button or the gear dropdown.
   => the tooltip isn't disposed => bug

Task ID: 3336233

closes odoo/odoo#125080

X-original-commit: 03a7bed1b0df29fb75d868fcc9c46e90e18aa58e
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-06-15 02:38:09 +02:00
Romain Estievenart 46992fa90f [FIX] board: display all data when force 1 column layout on small screen
Before this commit, on a dashboard having a multi-column layout, the
user couldn't see all those columns' actions when the layout fallback to
the "1 column" on a small screen.

This commit fixes it by, not only keeping the fallback to "1 column" to
optimize the screen's real-estate, but also properly bringing the hidden
columns' actions in the single column, so they become accessible by the
user.

Steps to reproduce:

- Create My dashboard on PC with two views set one next to the other
- Open My dashboard on mobile devices, and you see only the action
inside the column on the left and not the action inside the columns on
the right => bug

opw-3145706

closes odoo/odoo#124360

X-original-commit: fa1da53af1d327c4fafd944547dbf3c7312a93b4
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-06-08 23:01:23 +02:00
Romain Estievenart 34dc70ae5a [FIX] board: use single column layout on small screen
Steps to reproduce:

- Create My dashboard on PC with two views set one next to the other
- Open My dashboard on mobile devices, and you see the desktop view
  => bug

On small screens, we don't have enough available space on the screen to
allow other layout then "1".

opw-3145706

closes odoo/odoo#123561

X-original-commit: 9e1f79156e9440b953e9d476a608f9ce117c0d5b
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-02 23:39:19 +02:00
Romain Estievenart 91af1abbd5 [FIX] web: searchbar in listview takes focus after unselected all items
Steps to reproduce:

1. Open the "project" app
2. Switch to the list view
3. Select "All items"
4. Unselect "All items"
5. The focus searchbar is now focused => bug

The searchbar is autofocused (each time it enters into the dom). Unlike
before, in lists, it is removed when there are selected records, and
comes back when there's no selection anymore. As a consequence, it takes
back the focus. It should only take the focus on a first load, not every
time the searchbar re-appears

Task ID: 3336233

closes odoo/odoo#123025

X-original-commit: 15aacceb401a6868b694870693e7679677be80a0
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-31 13:08:24 +02:00
Romain Estievenart 0ff71ab65f [FIX] web: crash in grouped kanban's progressbar with folded column
Steps to reproduce:

- Open Odoo on small screen
- Go to "Project" app
- Select project > Traceback

The Kanban progress bar's refactoring [1] didn't completely took into
account the fact that, on smaller screen, the "folded" columns aren't
actually folded (like on dekstop-like screen sizes) but instead their
records aren't loaded by default. As a result, in one case the progress
bar is shown (small screen) and in the other hidden.

As the progressbar's information is memoized in `getGroupInfo`, this
getter should have been called wherever those information are read.

This commit fixes the issue by properly calling the `getGroupInfo`
getter instead of using the "private" `_groupsInfo` object (which may
not yet have been populated, due to the memoization).

task-3336233

[1] https://github.com/odoo/odoo/commit/58ca40b03215ef4c6c575267494dc8bccc30a033

closes odoo/odoo#122214

X-original-commit: c2efa7f059c92298ae5fb22b83e812453e2eb8ea
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-24 06:29:41 +02:00
Romain Estievenart fb8112a06b [IMP] mail,hr,web: change the UX of the Many2ManyAvatarFieldPopover
The commit change the design of the Many2ManyAvatarFieldPopover the goal
is to remove the m2m dropdown and fill the dropdown content directly
inside the popover.

It also reverses the order of the displayed tags inside the m2m avatar
field in the kanban view and inside the popover.

It removes the possibility to unassign users on mouse hover in kanban
view.

Note:
It's still possible to remove users inside an m2m_avatar_field popover.

Task ID: 3229888

closes odoo/odoo#117194

X-original-commit: f0d71e98743421318a798ef9d4f1e75d11a23334
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-03-31 10:53:08 +02:00
Romain Estievenart 6d87d17919 [FIX] web: Scroll position on kanban view when "load more" datas
Steps to reproduce:

- Open a kanban view with enough records for a 'load more' button to be
  displayed
- click on Load more
  => the column remains scrolled all the way down, making the user lose
     track of where they were before clicking on the button => bug

This problem occurs because the foreach using by the xml trigger a full
rerender of the node in owl. To avoid these weird behavior, we now keep
the scrollTop of the scroll item, the column should remain at the same
place the end user was when clicking on the 'load more' button

Task ID: 3196763

closes odoo/odoo#115975

X-original-commit: b6731193004dc2d1a174fc6fc4de9e99db8e247a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-03-21 10:44:56 +01:00
Romain Estievenart 3f6cc7c0a1 [FIX] web: listview edit with m2m_tags shouldn't always take two lines
On listview, a m2m_tags takes two lines when it's not needed to avoid
this effect we reduce the flex basic value by half wide should still be
plenty enough space to be an easy target to hit.

Task ID: 3074587

closes odoo/odoo#115714

X-original-commit: 0527d170606fcc32e3dcc096470da8288228610a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-17 22:27:16 +01:00
Romain Estievenart a041a5f2ee [IMP] project: display the widget m2o/m_avatar_user on user_id (kanban)
Remove the existing t-if on m2o_avatar_user/m2m_avatar_user widget
on user_id field in"project.project.kanban" view to allow quick-assign.

closes odoo/odoo#114400

Task-id: 3121207
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-10 17:54:57 +01:00
Romain Estievenart 74f9119300 [FIX] crm: domain on kanban_m2o_avatar_user to allow quick-assign
The Many2OneAvatarUser field now allows the edition, in particular to
add new record to the relation. This commit adds a domain on nodes using
this field to filter out share users, like already done in a lot of
form/list views[1].

Links:
1. https://github.com/odoo/odoo/commit/0edc854a8494eb475087d011efddc7e15b262127#diff-62eff7f830df5fbafad68abd5de0373654a620f6685cbcf3a4b8c20db64f0b7cR341

Part-of: odoo/odoo#114400
2023-03-10 17:54:57 +01:00
Romain Estievenart 74c3104b4c [IMP] web: add the avatar icon on m2o/m2m_avatar_field autocomplete
The goal of this commit is to add the avatar when a user use the
autocomplete m2o/m2m_autocomplete liked to a m2o/m2m_avatar_field.

Task-id: 3121207
Part-of: odoo/odoo#114400
2023-03-10 17:54:56 +01:00
Romain Estievenart 501b442340 [IMP] web,mail: many2one avatar quick assign
Purpose:

Allow quick assignation of records in the kanban views (and other places
by extension).

Currently, if you want to work in a board-like env (e.g. tasks in
kanban, crm in pipeline, that kind of thing), having the possibility to
quickly assign/unassign records without having to open them fullscreen
can be really useful => it should be possible to "quick edit" these
fields in kanban views easily, without switching to form views.

If you want to keep the field readonly don't forget to add the readonly
attribute.

Task-id: 3121207
Part-of: odoo/odoo#114400
2023-03-10 17:54:56 +01:00
Romain Estievenart 66321f76aa [IMP] web,mail: many2many avatar quick assign
Purpose:

Allow quick assignation of records in the kanban views (and other places
by extension).
Currently, if you want to work in a board-like env (e.g. tasks in
kanban, crm in pipeline, that kind of thing), having the possibility to
quickly assign/unassign records without having to open them fullscreen
can be really useful => it should be possible to "quick edit" these
fields in kanban views easily, without switching to form views.

If you want to keep the field readonly don't forget to add the readonly
attribute.

Task-id: 3121207
Part-of: odoo/odoo#114400
2023-03-10 17:54:56 +01:00
Romain Estievenart 1b1925ac65 [FIX] bus: shared-worker feature detection
This commit fixes the shared-worker feature detection with using the
browser object alias.

Steps to reproduce:

- Log to Odoo back-end with a device without a shared-worker support
  like Chrome on an Android device => traceback

link:

https://caniuse.com/mdn-api_sharedworker

opw-3198778

closes odoo/odoo#113293

X-original-commit: 4aaafd46dbe1188bf2d9c0140a916ef664d99c42
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-02-21 21:08:00 +01:00
Romain Estievenart a10967214b [FIX] mail, test_mail: h-scroll broken on small screen
This commit add the missing `o_action_delegate_scroll` on the activity
view controller on small screen device to scroll the activity view
content only instead of the whole controller (i.e. control panel
included).

Steps to reproduce:

1. Open Project on small screen device like a smartphone
2. Open a Project like 'Office Design'
3. Switch to the Activity view and try to scroll horizontally
 => The whole activity controller currently scroll => bug

closes odoo/odoo#110531

X-original-commit: e4d6a8ad14abee72d61fd01d8b601acc6bfa2c49
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-01-20 21:56:48 +01:00
f1deb8a457 [FIX] web: switch view position on small screen
Before this commit, the switch view was in the middle of the CP instead
of the right. This was due to the customizations of the form control
panel, this commit scopes these customizations to the form only.

Steps to reproduce:

* On mobile device, open "Project"
* The view switch is not correctly aligned to the right and not all the
  views are visible in the popover

closes odoo/odoo#110343

X-original-commit: baddfad44c34d36f26defda8fb8378003d4de4a3
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Co-authored-by: Adrien Dieudonne <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2023-01-19 10:15:34 +01:00
Romain Estievenart 36f2d1688f [ADD] web: Android mobile app feature detection
This commit adds a proper way to detect the Android OdooMobile app using
the User-Agent.

closes odoo/odoo#107392

Related: odoo/enterprise#34088
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-12-11 17:42:57 +01:00
Romain Estievenart 72440e016c [FIX] web: text header appears over the text kanban card
Scrolling inside a grouped kanban with a lot of cards on a column
makes the text header appear over the kanban card due to the missing
background.

Steps to reproduce :
- Open Helpdesk on small screen like a mobile
- Open VIP Support
- Made a Group by "Create date => day" (there should be enough cards on
  a column to scroll)
- Scrolling the column => bug, the text header appears over the kanban
  card

closes odoo/odoo#106368

X-original-commit: 041fddf0c884ae9a6e2b040decfb1f31e9d25a29
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-11-24 11:08:42 +01:00
Romain Estievenart a172be756f [REF] web,*: dark mode uses service instead of legacy api
This commit adapts the codebase to match its enterprise counterpart
where calls to legacy cookie api (cf. web.utils.cookies) are replaced by
cookie_service ones.

closes odoo/odoo#104080

X-original-commit: 724469e19ff83e91a41c6721e334df1ad8d1c02c
Related: odoo/enterprise#33189
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-25 19:39:51 +02:00
Romain Estievenart e574a13a6d [FIX] web: disable dark mode on test suites
As the current test suites are "light mode" based and to avoid
unexpected errors when running them locally (due to the cookie
possibibly being already set), the dark mode is disabled
for the following suites:
- `web.qunit_suite`
- `web.qunit_mobile_suite`
- `web.benchmark_suite`

X-original-commit: 3f1b44f0d2ce72f79308ef36cd72ea3f7b82b186
Part-of: odoo/odoo#104080
2022-10-25 19:39:51 +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
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
Romain Estievenart dd4f5eb44c [FIX] mail: restores the chatter's ability to grow in FormView
The commit odoo/odoo@babf7634e0 broke a
previous fix in odoo/odoo@6228500a3f
allowing the chatter to grow beyond its original size.

This commit restores the `flex-grow: 1` on the chatter's container but
also limit its maximum width (like in saas-15.3) to avoid it becoming
unreadable.

closes odoo/odoo#102767

X-original-commit: 3db27dc6c2e22b2b86650d1828f8e52929c43df6
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-10-08 12:31:57 +02:00
Romain Estievenart 97533b6d8d [FIX] web: text overflow ellipsis appear on trash
Add missing exclusion `o_list_record_remove` class used to allow text
overflow mixin.

Steps to reproduce:

- Open the Employee app
- Plan creation
- The trash as an overflow ellipsis => bug

closes odoo/odoo#102758

X-original-commit: a2ee880237724463b90fc43df69b689b82756fe4
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-10-08 12:31:55 +02:00
Romain Estievenart 151d53c40b [FIX] web: kanban state column text overlap when resize on list view
Allow `o_state_selection_cell` to have the overflow mixin to allow the
resize of the kanban state column on list view without text overlapping.

This commit follows https://github.com/odoo/odoo/commit/e22abffdc230c2ae494a85fdf7fd8d6b488be3ea

Steps to reproduce:
- Open the helpdesk app
- Click on VIP Support tickets
- Go to the list view
- Check the kanban state column and try to reduce it's size
  => The text is overlap

X-original-commit: a9f83d6d2e9f53a6a562044303c5bcb5ab5f1a9c
Part-of: odoo/odoo#102758
2022-10-08 12:31:55 +02:00
Romain Estievenart f0b4171873 [FIX] web: text overflow isn't ellipsis on list view
Add missing `o_list_activity_cell` class used to allow the text overflow
and a rule to applies the o-text-overflow mixin on their spans child

Steps to reproduce:

> Open the helpdesk app
> Click on VIP Support tickets
> Go to the list view
> Reduce the size of `Assigned to` or `Activities` column
  => The displayed text isn't ellipsis

closes odoo/odoo#102608

X-original-commit: fabc5350904c207bda6e7cdffbae0d7309769e89
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-07 14:37:28 +02:00
Romain Estievenart 7d50f09aea [FIX] mail: text overlap on list view
Remove no longer needed `!important` on `overflow: visible` because the
new list view doesn't have any stacking context issue. Thanks to the
`o_PopoverManager` inside the `o-main-components-container`.

Steps to reproduce:

> Open the helpdesk app
> Click on VIP Support tickets
> Go to the list view
> reduce the size of the activities column
  => it's produce text contain overlapping with the other column => bug

X-original-commit: e22abffdc230c2ae494a85fdf7fd8d6b488be3ea
Part-of: odoo/odoo#102608
2022-10-07 14:37:27 +02:00
Romain Estievenart d7077d4986 [FIX] web: StateSelectionField on list view
Even if the `StateSelectionField` is readonly we doesn't want visual
difference and we remove the `disabled` class.
This behavior is the same as in 15.

We also remove `btn-link` as it's not appear as a link and we had to set
`p-0` to avoid the growing of the cell.

Steps to reproduce:

> Open the helpdesk app
> Click on VIP Support tickets
> Go to the list view
> Add kanban_state column => visual bug

closes odoo/odoo#102504

X-original-commit: 26d6942ed1b0c328d94e7dfd5e50c18a68c8c2f3
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-10-06 21:24:55 +02:00
Romain Estievenart 30e598db87 [FIX] web: apply missing hover effect on form view note-editable
This commit applies the same behavior between hovering an `o_input` and
a `note-editable` inside the form view

closes odoo/odoo#102205

X-original-commit: 43b1baf10bc004a2ac5d63990b9a65aab74cba9c
Related: odoo/enterprise#32304
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2022-10-05 14:25:57 +02:00
Romain Estievenart 26b3ef90f7 [FIX] web: unify hover effect for edit fields on form view
This commit applies the same behavior between the community and the
enterprise for the `o_field_widget o_input:hover` effect.

Before this commit the hover on community applies a border on all
quadrant, now we only see the bottom border as in Odoo Enterprise

X-original-commit: 89d67a125fd8146d979c2b12ade1f4dbe5fc2441
Part-of: odoo/odoo#102205
2022-10-05 14:25:57 +02:00
Romain Estievenart a5a75a0b5f [FIX] web: restore min-height on form view note-editable
This commit restores the behavior we had before wowl :

- Having a min-height of 180px when the node-editable is a child
 field (without a parent form group).
 e.g: open the form view of a `crm.lead` inside the `crm` app.

- No min-height added when the note-editable is inside a form-group
 e.g: the condition & terms inside the form view of a `sale.order`
 inside the `sale` app.

X-original-commit: 294e8b8ad3efca2211cff61992b3cd07493eb1bb
Part-of: odoo/odoo#102205
2022-10-05 14:25:57 +02:00
Romain Estievenart 63e3afb783 [FIX] web: DnD a record increment the width of a folded kanban columns
When we introduced the `useSortable` hook [1] and [2], the kanban column
fit the size of the kanban record when the DnD record hovers the column.
This behavior is not desired when the record is hovering over a folded
column, so we apply now a `display:none` value on the record to avoid
the resize of the column.

Steps to reproduce:

1. Go to project
2. Open Office design
3. Try to drag and drop a record to a folded column
   The width of the folded column is incremented to the width of the
   record => bug

Links:
1. https://github.com/odoo/odoo/commit/ebb410accbe3aac051e73031384f640a40544efc
2. https://github.com/odoo/odoo/commit/cf4a8f198fd2daa2b4d9f9f69c5c769c21ff13c5

closes odoo/odoo#101690

X-original-commit: 94e4d6fb432fe64dedf1e65a6ab021855d4c955e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-30 09:32:34 +02:00
Romain Estievenart 439810ec06 [FIX] pos, survey: wrong usage of col & row bootstrap classes
This commit fixes some wrong usage of the bootstrap class `col` & `row`:

- POS:    Missing the child `col` on `row` parent;
- Survey: Using the class `col` to center the node on the parent div;

closes odoo/odoo#101046

X-original-commit: acacf52d40a41b53aa78967748602cb3b1e62261
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-23 22:04:29 +02:00
Romain Estievenart 98a97d0fea [IMP] *: removes .form-group
this commit removes the usage of .form-group class which is deprecated
since BS5.

Here is the css rules that was used:

a) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L1997
As we can see, it simply adds a `margin-bottom` of `1rem` which
corresponds to the `.mb-3` BS class.

b) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2326
As we already checked all `form-inline` in [1] and [2], we don't have to
do anything about these rules.

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

Notes:
- `position: relative` is already on `#new-password-group`.
- `.field-db`, `#editor-media-image`, `.unsplash_img_container` and
`#url-form-group` seems unused.
- Sometimes margins are unnecessary because of blocks overlapping.
  (e.g. `margin-bottom` is not needed if margin-top is set on the
  following node)
- CSS rules applied on `.s_website_form_rows > .form-group` are now in
the XML by adding `mb-0 py-2` BS classes.

Follow-up of:
[1] https://github.com/odoo/odoo/pull/97967
[2] https://github.com/odoo/enterprise/pull/30343

closes odoo/odoo#100052

Related: odoo/enterprise#31261
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-16 20:51:56 +02:00
eres-odooandWilliam Braeckman 6927dcda9f [IMP] loyalty*: misc loyalty improvements
This commit improves some messages and usability for loyalty and its
submodules:
 - Coupons should not be restricted to the partner assigned to them
   anymore
 - Merged "I have a promo code" and "Use a gift card" into a single
   toggle
 - Boolean fields have been added to each app to disable them where we
   don't want them.
 - Reduced the size of coupon codes
   This means that we increase the risk of collision which should be
   handled by the model as well now.
   Creating a coupon with an existing code will retry the creation (up
   to 10 times) until the coupon is indeed created.
 - Make it clearer in the coupon generation wizard that an email will be
   sent to the customer.
 - Reintroduce coupon/gift card details on sale order lines in eCommerce
   which was wrongfully removed.
 - Remove the "on product with taxes: " message on order lines when
   the amount is not split between taxes or if the tax message would be
   empty.
 - Make it possible for some error messages to be displayed as warning
   instead of errors
 - Split program types in two menuitems, one for promotions discount
   loyalty etc and one for gift cards and ewallet, the latter has
   simplified views.
 - Views overall have been reviewed to make it easier to understand how
   to programs work. New program types have also been added.

TaskId-2951413

Part-of: odoo/odoo#99023
Co-authored-by: William Braeckman <wbr@odoo.com>
2022-09-02 20:10:59 +02:00
Romain Estievenart 0de5d77765 [IMP] website_*: uniformize pager position on center
Before this commit, the pager was on the left or centered.
Now, it is always centered regardless of the website pages (portal or
not).

closes odoo/odoo#97967

Related: odoo/enterprise#30343
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-16 09:19:08 +02:00
Romain Estievenart 36628c9b1c [FIX] *: removes .form-inline
this commit removes the usage of .form-inline class which is deprecated
since BS5.

here is the css rules that was used:
https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2303

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

We also took the opportunity to remove some .input-group-append and
.form-group. We are currently working to remove all of them.

Part-of: odoo/odoo#97967
2022-08-16 09:19:08 +02:00
Romain Estievenart c87b9e105c [FIX] mail: hide sharing screen button on mobile devices
The current implementation of sharing screen uses the
`MediaDevices.getDisplayMedia()` API. Sadly this API is not currently
supported by all major existing mobile browsers[1].
Some users were confused about the browser request permission
notification. As this is a way more complicated than just adding a
permission. We prefer to hide this feature by removing the screen
sharing button on mobile devices.

Links:
[1] https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=487935

opw-2915773

closes odoo/odoo#97947

X-original-commit: 2bf5ce06ef18d10c79ebab57551267eb31de872f
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-11 16:36:04 +02:00
Romain Estievenart 5c00f30307 [FIX] web: forms inside dialog misaligned
Due to the refactor of the form view, `display:block` wasn't apply on
`o_form_nosheet` anymore; This is due to the fact that `d-flex flex-nowrap`
are now directly set in the DOM and thus has !important by default.

We now only use flex when this is not a `o_form_nosheet` element.

Steps to reproduce:
1. Open Sign
2. Click on "Send"
-> the style of the dialog form content is broken

task-2871070

Link:
https://github.com/odoo/odoo/commit/28200c5ad584e9b7f51ffcf7902c8d366b93e2de#diff-26a45bff860d45f36003c55996b92ced0762c62dcd94d5d79bf7b5e4094a1ee0R191

closes odoo/odoo#96964

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-28 16:40:35 +02:00
Romain EstievenartandAdrien Dieudonné 477a535e03 [FIX] pos_*: add missing translation flag
closes odoo/odoo#79448

X-original-commit: 1ace6a4a51a86922c9632614c4043e85f6ef1d6e
Related: odoo/enterprise#22146
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:50 +00:00
4bc7fbd720 [IMP] pos_restaurant: add zoom on floor screen
Add possibility to zoom on floor screen on mobile devices.
It should be more easy to navigate when there is a lot of
tables.

Task ID: 2453679

X-original-commit: 43fbe45d4f9fc43477690e3d2fb1bc1299f4824b
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 130cfac8b9 [FIX] pos: payment-screen: Highlight button when value is set
On mobile, it wasn't clear if a value was set or not.
Now, we apply the same logic as for invoices:
customer or tip buttons will be highlighted if set.

This also fix the alignement by removing some css rules...

Task ID: 2453679

X-original-commit: ed41b793836e9f9c6ec6c754331f40f4fbdee1b0
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné b614509698 [FIX] pos: "Discard" button at the wrong place.
"Discard" button shoud be on the left to respect the intuitive
mobile navigation.

We also take advantage of this commit to show icons and text on
desktop and only show the icons on mobile.

Task ID: 2453679

X-original-commit: f774f07a46197f7e1664aee32723b10bf6df37b4
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 8174f77eb0 [FIX] pos_*: Only show 3 control-buttons in product screen on mobile
Before this commit, when you clicked on "Review" the order lines weren't
visible due to the number of control-buttons.

To fix this, a "More..." button is displayed if there is more than 3 buttons.
When you click on this button, a new modal will display a menu with all controls.
Note that we had to find a way to close this popup after clicking on an action.

Task ID: 2453679

X-original-commit: 430d40f90c1e9a7e8e3663e8f2b129b0c24911e1
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:49 +00:00
Romain EstievenartandAdrien Dieudonné 79882dc4b2 [FIX] pos: Receipt-Screen: elements misaligned on mobile
- Users were automatically redirected to the middle of the
  receipt screen on mobile. It direcly showed the ticket but
  users missed the buttons at the top of the page.
  We changed the DOM to use the right "flex-direction" value.

- "(Both will be sent by email)" appears when you select a customer
  and ask an invoice.
  This text was positioned in absolute to be aligned to the bottom right
  on the input. This can't work when you have a scroll bar like on mobile.
  So we now simply use "text-align: right".

- Email input was too small on mobile.
  To fix this, we decided to only keep the icon and remove "Send" text.

Task ID: 2453679

X-original-commit: ce2c8414333ca3ae6a28da0c59502e44eb16980e
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné 0a6c027b94 [FIX] pos: payment-screen button UX on mobile device
- Icons (customer, invoice,...) are now displayed on mobile too.

- Pane buttons (Validate, Review,...) were too tall.
We now better see the content of the primary screen while being
able to click of these buttons.

Task ID: 2453679

X-original-commit: 61ede7cae6e074a9e4eb590ddd9bd126fb214d92
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné 8e1a4259a4 [IMP] pos: Show categories on mobile
Before this commit, users had to use a popup window to change
the product category. It wasn't clear for users who are used
to using a large screen.

This commit adapts the breadcrumb navigation to be the same
as on desktop. This avoids the use of this popup.

We also improve the display of products by taking the entire width
of the screen. This allows us to add some space between the products.

Task ID: 2355025

X-original-commit: 9b7d1d6f9ef1342db5bb0d6a31eafa9d2586d171
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:48 +00:00
Romain EstievenartandAdrien Dieudonné a2ddef022f [IMP] pos_*: Ticket/Order kanban screens on mobile
Using a list view isn't the best way to display data on small screen.
We had to change this behavior to display a kanban view of orders.

We also merge design of "Ticket" screen and "Order Management" screen.

Task ID: 2453679

X-original-commit: d0e53721a97c14419a2f81ef8aa8be317cc5644a
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné a4b617dd95 [FIX] pos: Move "back" button in the action pad
When you clicked on "Review", there were not enough space to
properly check the order lines.
The "back" button took a lot of space in this screen.
Additionally, it shouldn't be the primary button in this view...

It's why this button has been moved in the action pad, next to the
payment button.

Task ID: 2453679

X-original-commit: 1418c9f10c80bea6393b47d5ffc1e0217ad1d4ba
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7334cd3086 [FIX] pos_restaurant: Reduce "Back to Floor" button size on mobile
The "back to floor" button is currently too big to be used on mobile
To fix this we have no choice but to display the table number only.
It would be good practice for this number to be unique; we will fix
the demo data in master branch.

This also fix a misalignment between arrow and text.

Task ID: 2453679

X-original-commit: 31dc371c824cee431072788faafb7f1dfd4a1335
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 360a1168cb [FIX] pos: Improve UX on New Orders page on small screen
The top of new order page is currently unusable because it's too large
for small screens.

To improve the UX, we remove the current search box and only keep the
icon and when the search icon is clicked, the search input is shown.

We also had to reduce the font size and paddings to keep filters next
to the search input. As it doesn't change much in desktop, these
changes are also applied for larger screens.

Task ID: 2453679

X-original-commit: 8f4202de307911e4ea54af6c018de87dd94086b6
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:47 +00:00
Romain EstievenartandAdrien Dieudonné 7594c055de [FIX] pos,pos_restaurant: Improve UX on Search products on small screen
The top of POS is too large and must be scrolled to be used.
To improve the UX, we remove the current search box and only keep the
icon and when the search icon is clicked, the search input is shown.

Task ID: 2453679

X-original-commit: e5d54ac1d30eef789ec1604e3a1212f415224ada
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:46 +00:00
Romain EstievenartandAdrien Dieudonné 3a9bd22ffb [FIX] pos: Improve status-buttons UX on small screen
- Show user avatar logo on desktop and mobile.
  We are now able to know which employee is currently connected on mobile.
  The user name is still shown on desktop but didn't appear for small device.

- Add "sign-out" icon on desktop and mobile.

- Remove label strings like "Close", "Orders" and the username to
  gain some space; the icons will do the job.

- Remove "close_button" unused class

Task ID: 2453679

X-original-commit: 551ef472ec42965af38f68343b9fe50ea7ec4c88
Part-of: odoo/odoo#79448
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2021-11-05 19:44:46 +00:00
Romain Estievenart 2c9da836e5 [FIX] mail: keyboard shouldn't pop on WebRTC call on mobile devices
Steps to reproduce:

1. Log on odoo with a user A on mobile device
2. Log on odoo with a user B on desktop
3. User B call user A
4. User A answer the call and the keyboard popup on the screen => BUG

To avoid this behavior, we disable the input auto-focus when we open a
chat window like other chatting app on mobile devices (like: Signal,
Messenger, WhatsApp...)

closes odoo/odoo#78864

X-original-commit: cf36921df8dff114f26a161c4f9d2f6a05ac2adb
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-10-25 09:53:16 +00:00
Romain Estievenart bfcea333d6 [FIX] pos_restaurant: Allow scroll on Floor screen
Steps to reproduce:

1. On small screen like mobile devices, open the pos app
   and start a bar/restaurant session;
2. You can't navigate on Floor screen => bug

To fix that we allow scroll on Floor screen

Task ID: 2453679

closes odoo/odoo#73333

X-original-commit: 15fea6aa56ec132734c21418798b7dd5903b10bf
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-07-06 16:57:26 +00:00
Romain Estievenart c0bba7e775 [FIX] web: Auto close dropdown is broken
Steps to reproduce:
1. Go to Project App
2. Open and edit a task
3. Click on Customer => search more
5. Click on "Filters"
6. Click on "Group by"
=> The "Filters" and "Group by" dropdown are open at same time => bug

Since odoo/odoo@e4f87710e1, we added a way
to prevent bs and owl dropdown to be open in the same time.

But when the web-editor is present, the CSS selector used to match the
opened modal ("search more" in this case) conflicts with the DOM created
by the web-editor  (modals identified by the classes: .web-editor,
.note-picture-dialog, .note-link-dialog, .note-help-dialog).

To avoid this conflict, this commit uses a more restrictive CSS selector
to match only the first (active) opened modal (as web-editor doesn't
attach its modals at the root of the body).

closes odoo/odoo#65358

X-original-commit: 7cb24db622b231b89558755d9c0e7d899fc994bf
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2021-02-01 16:07:11 +00:00
Romain Estievenart e18782cd7f [FIX] http.py: exception handling parity in mono/multi db
The mobile app's authentication bases its feedback to the user on the
error message returned by the server.
Sadly, in case of multi-databases, no error message are properly
returned when the user provides wrong credentials (presenting only an
empty Snackbar).

This difference of behaviour was introduced in the commit
odoo/odoo@07d5ea3 which goals was to give more power for JsonRequest's
error handling customization. To do so, the catching of the exception
(if one happens) was delegated to the caller instead of the JsonRequest
itself.

This change indirectly introduced a difference about the treatment of an
exception between mono and multi-database :
* mono-database was already catching the exception and handling it
properly (see in
https://github.com/odoo/odoo/blob/f05f8ef647a4eaba49d8a20eb8068f1c7a702297/odoo/addons/base/models/ir_http.py#L235-L241).
* multi-databases didn't catch it.

This commit restores the parity between both use cases by applying the
same behaviour (as described in the commit odoo/odoo@07d5ea3):

```python
ir_http.dispatch():
	try:
		request.dispatch()
	catch Exception as e:
		ir_http._handle_exception(e)

ir_http.handle_exception(e)
	request._handle_exception(e)
```

Steps to reproduce:

1. Open the mobile app;
2. Try to register an account with a wrong password with multiple
   databases;
3. The snackbar is empty and no error is shown => bug;

Task ID: 2287176

closes odoo/odoo#64965

X-original-commit: f54c97f6214c235bac931184c6e533a7fa72fbe2
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-01-22 19:18:13 +00:00
Romain Estievenart f00fcbfca6 [FIX] web: datepicker inside a dropdown
Steps to reproduce:

1. Go to Project
2. Filter > Add custom filter > Last Updated on
3. Click on the date field and use the date picker to change the value
4. The dropdown is closed and you lost your selection => BUG

This bug was due to a conflict between owl and bs dropdown (e4f87710),
to prevent this bug, we added a check to ensure there are no open
bootstrap calendar inside the current dom.

Note that if you click outside the dropdown, the datepicker is already
closed when you go through this code. It means that the datepicker will
not be present in the DOM anymore and the dropdown can be closed too.

opw-2373573

closes odoo/odoo#61262

X-original-commit: 73dfc1f7a8e2197fcdd4053ec57c260576593a15
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
2020-11-03 12:50:41 +00:00
Romain Estievenart 9348cca0f2 [FIX] web: DropdownMenu autoclose behavior should match Bootstrap
Before this commit, with an opened DropdownMenu component, when the user
clicks on a Bootstrap's dropdown the DropdownMenu doesn't close.

This issue is due to a conflict between the global click listener
registered to close the DropdownMenu and the listener registered by the
Bootstrap dropdown:
the last one prevents the event from bubbling up to the `window` element
and be handled by the first one.

This commit fixes it by enabling the `capture` flag on the DropdownMenu
global click listener, giving it the opportunity to handling it properly
 and close the DropdownMenu.

Note: this commit also fixes an issue when a dialog is opened from a
DropdownMenu (like the favorite's delete action) and prevents it from
closing in the background (e.g. when the dialog is still opened).

opw-1879566

closes odoo/odoo#60928

X-original-commit: 7f1bcc8ceb78729725f65585e923b08f94bf75b5
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-10-28 17:22:48 +00:00
Romain Estievenart b04c670ba0 [IMP] web: improve Export Data UI on mobile
This commit improves the UI of the Export Data action's modal on mobile
screens:
* open it full-screen
* 2 main panels are one after the other (side-by-side on desktop)

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Romain Estievenart f9193fa417 [IMP] web: enable action menu on mobile
This commit creates the required hooks to implement this feature.

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Romain Estievenart e1f605bef8 [FIX] web: avoid to display dropdown outside of the screen on mobile
When opening a DropdownMenu OWL component (like the favorite menu, filter
menu) positioned to the right of the screen (left on RTL languages) on a
small screen, the content of the dropdown could easily overflow out of
the viewport, making hard to use or even unreachable.

This commit fixes it by using the middle of the screen as a threshold to
align the dropdown menu to the right (or left in RTL) of the triggering
button.

Note: this fix specifically targets mobile-like/small screens as bigger
one like on desktop would require much precise calculations (and are
not an issue at the time of this commit).

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Romain Estievenart a35dab5653 [IMP] web: allow to simulate a touch-screen when creating a test's view
When running the webclient in a regular environment, a 'o_touch_device'
class is set when ran on a touch-screen enabled device.

This commit adds the ability to simulate touch-screen when creating a
view inside a test (independently of the device), allowing tests to
match the reality.

Task ID: 1879566
2020-10-21 14:45:40 +00:00
Romain Estievenart 17b6674ca2 [FIX] mail: Mailbox is half loaded on mobile
Before this commit on mobile when you come to odoo from a notification
url like:
https://my_domain/web#action=mail.action_discuss&active_id=1&menu_id=93
a traceback occurs on mobile discuss wasn't loaded correctly and the
content didn't appear.

With this commit, it's open the related discuss thread.
It's also ensure the return to the chat tab when you close a chat and
the return to the channel tab when you close a channel conversation.

We also ensure the loading of the inbox items when you navigating on
the mobile discuss button.

Steps to reproduce:

1. Open a chat from a mobile notification
2. A traceback occurs

opw-2310319

closes odoo/odoo#58431

X-original-commit: 8ca5024bef246c93bbb7522d77aca4c4ba7a33b4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-09-24 13:14:40 +00:00
Romain Estievenart 846fb4c892 [IMP] website_event_track_online: PWA's custom offline page
This page will be used in case of lost connection. The web page will be
automatically fetched when you are back online.

We also use this page when it's not possible to use the cache due to a
redirection.

closes odoo/odoo#56514

X-original-commit: a7c5cadc7467bd2c2423cd3e803cad3677961521
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-08-25 12:51:13 +00:00
Romain Estievenart 0b2f2b5d96 [IMP] website_event_track_online: Allow to close the PWA install bar
On mobile device, the event PWA display an install bar to ask the user
to install the event app.

This commit allows to close it without having to install it.

closes odoo/odoo#55919

closes odoo/odoo#55952

X-original-commit: 1f7b2910a75f149f1398bba147f5e10d53448adf
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-08-14 15:18:36 +00:00
Romain Estievenart 71b44f15dd [FIX] im_livechat, website_event_track_online: avoid overlapping banners
On mobile devices, when you go for the first time inside the event
public page the PWA install bar and the livechat tooltip are displayed
at same area. Because of this it's was difficult to click on the
"install" button.

X-original-commit: 6705c6b6fe0360f95b4a499a9141f876648b7202
2020-08-14 15:18:35 +00:00
Romain Estievenart bd09d2acfb [IMP] hr_attendance, barcodes: extract barcode.png to barcodes
It's now possible to use this image in all modules that depend on
barcodes.

Task ID: 2210396
2020-07-01 09:28:45 +00:00
Romain Estievenart ccc243823e [IMP] pos_hr: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode

Task ID: 2210396
2020-07-01 09:28:39 +00:00
Romain Estievenart 80bdbfda62 [IMP] hr_attendance: uniformize barcode screen UI
The main goal of this commit is to apply the same style used by
event_barcode.

Task ID: 2210396
2020-07-01 09:28:37 +00:00
Romain Estievenart 04cc2b5700 [FIX] web, web_tour: mobile quick search view issues
Now we have the mobile search_panel in enterprise,
this commit simply adapt the Odoo repos part with:

- Css Clean up
- Remove the no longer existing step inside the tour
the button 'o_enable_searchview' no longer exist
inside a M2X dialog

Task ID: 2200099

closes odoo/odoo#48376

Related: odoo/enterprise#9494
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-03-29 14:24:33 +00:00
Romain Estievenart 8ec70c9072 [FIX] web: data-mobile on action_manager_act_window
Commit ca4eaf4 introduced the data-mobile attribute, used
to specify options to pass when executing an action, only in
mobile (like using a fullscreen modal).

However, we forgot to add the 'isMobile' check, so the option
was passed in desktop as well.

This commit fixes the issue and adds some tests.

Task ID: 2155601

closes odoo/odoo#47333

X-original-commit: 6cb68a53106fa7326a7f818461418437d5a0df77
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
2020-03-10 21:40:19 +00:00
Romain Estievenart c4755151bd [FIX] web: the signature content is drop when the browser is resized
Step to reproduce:

1. Go to sign
2. Click on the button 'Share' inside a template.
3. Click on Sign now'
4. Click on a field signature
5. Draw a signature
6. Resize the browser

Before this commit the code of the widget drops the content when a browser is triggering a resize.

But with a mobile devices (like Android phone). A resize event is trigger when the keyboard is displayed.

=> The resize drop redraw all the widget content when the user fill the displayed input.

Task ID: 2155601

X-original-commit: a6af5a12efb0da9d8ee7526e6b4738c9595f9816
2020-03-06 15:34:21 +00:00
Romain Estievenart 55cecf91b7 [FIX] web: the pager_counter has a bad display on mobile / tablet (responsiveness)
Task ID: 2155601

X-original-commit: 964aa6838803e5631fe40417a225dec521097cac
2020-03-06 15:34:20 +00:00
Romain Estievenart 4bf35b7cd6 [FIX] web: Don't focus the name on web.name_and_signature for mobile device
Task ID: 2155601

focus

X-original-commit: 681b5a5a834598d650da9611ab19cfff1a1428e9
2020-03-06 15:34:20 +00:00
Romain Estievenart a6344a1a78 [IMP] web: allow options on mobile inside the xml inside an ir_act_window
Now if you use the data attribute 'data-mobile' inside a type="action", we
can now send some specifics options on the dialogs.

Here a sample to open an action dialog in fullscreen on mobile:

Here the original action:

```
<button name="%(sign.action_sign_send_request)d" type="action" class="btn btn-primary btn-sm mt8 o_kanban_sign_send_request" context="{'sign_directly_without_mail': 0}">Send</button>
```

Now if you define the data-attribute data-mobile to allow fullscreen like:

```
<button name="%(sign.action_sign_send_request)d" type="action" class="btn btn-primary btn-sm mt8 o_kanban_sign_send_request" context="{'sign_directly_without_mail': 0}" data-mobile='{"fullscreen": true}'>Send</button>
```

Task ID: 2155601

X-original-commit: 66f99636d2d8bd850e33ed6c8f272eb662d835f7
2020-03-06 15:34:19 +00:00
Romain Estievenart 806cb4aa43 [FIX] mail: preview image distorted on mobile
This commit fix the o_mail_preview_image css by applying the same
rules as desktop.

Task ID: 2200099

closes odoo/odoo#46328

X-original-commit: f4a106c7fa5ba21bba2811d5c51cbf5bf57f4dc9
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-26 11:18:00 +00:00
Romain Estievenart e0231481d6 [FIX] base,hr,web: kanban image sizing/look & feel
The image illustrating some kanban cards (like "Employees" or
"Contacts") has a weird scaling and rendering on smaller screen sizes.

Step to reproduce (on small screen):
1. Open Employee
2. Apply a filter
3. Picture is ugly (shape changes to get something pretty weird)

This commit fixes it by:
1. removing the rounding which was only applied (sic) on smaller screens
2. adjusting the size and/or the margins of the image to keep its ratio
   and the alignment with the other kanban cards.

Task ID: 2198419

closes odoo/odoo#45956

X-original-commit: dd5db84464998b45d0524055f9c96bcad894c4c9
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-21 14:28:04 +00:00
Romain Estievenart 4582f4ade3 [FIX] web_editor: add scope to apply z-index web-editor dialog on mobile
this bug was introduce by the inline z-index define inside the template 'web_editor.FieldTextHtml.fullscreen' (https://github.com/odoo/odoo/commit/912996fe902c41cafa12dcfe09713ce9857f95ab#diff-76a385e3a3e67f1b88b34afd8181f732R13)

This was breaking the z-index web-editor dialog (using inside mass-mailing), so a first fix using a new z-index was made for the web-editor dialog (https://github.com/odoo/odoo/commit/65c8d33c2922bd90e2755cff0a6751c8b3b130d8)

But we a missing a scope to identifiable a web-editor dialog was missing. So this commit add a class to allow target only the web_editor dialog.

Task ID: 2198649

closes odoo/odoo#45702

X-original-commit: 441a5fa5a67f25398744ea18860eebdc4d17dddb
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-19 11:21:39 +00:00
Romain Estievenart baf5ec854c [MOV] base,web: move "base settings" mobile related code
This code is not useful since https://github.com/odoo/odoo/commit/9831ed08fe
Note that this part of code will be refactored in web_enterprise.

Task ID: 2085899

closes odoo/odoo#38499

Related: odoo/enterprise#6077
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-01-13 13:25:01 +00:00
Romain Estievenart a077985123 [MOV] web: move "kanban view" mobile related code
This code is not useful since https://github.com/odoo/odoo/commit/9831ed08fe
Note that this part of code will be refactored in web_enterprise.

Task ID: 2085899
2020-01-13 13:25:01 +00:00
Romain Estievenart 4e536a4ac0 [FIX] web_enterprise: stat buttons not align on iPad
Steps to produce:

1. Go to 'Contacts'
2. Select a contact
3. Click on "More" stat button

To fix this, we need to force the padding to avoid touch_device rules.

closes odoo/odoo#42033

X-original-commit: 2761fec0e152c08dcd2d63bf5dbce94fee2b6a7b
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-12-17 11:07:19 +00:00
715c136cd2 [IMP] web: add column creation support for kanban view on mobile
On mobile, there was no way to create a new column in the kanban view. This
was specifically annoying in the Project app (the user was able to
create the project but couldn't set its stages).

This commit enables this feature by adding a `+` icon at the end of the
tabs. This button opens a quick-create column widget.

If there is no existing column (for example in a newly created project),
this quick-create column widget is opened by default.

Finally, this commit improves the processing needed for the swipe
animation between the columns.

Task ID: 1893137

closes odoo/odoo#40722

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Co-authored-by: Ankit Sathvara <asa@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Romain Estievenart <res@odoo.com>
2019-11-25 09:29:39 +00:00
Romain Estievenart 3fd2debdc8 [FIX] web: Basic model X2Many commands don't handled correctly
Steps to reproduce:

1. Go to the Accounting / Invoicing apps
2. Open Taxes (Configuration -> Accounting / Invoicing -> Taxes)
3. Try to create a new tax and the client crash.

It occurs because the `_processX2ManyCommands()` method doesn't handle
correctly a missing `fieldInfo` on some X2Many tags.

On mobile, when calling `load_views` the kanban view is used by default.
But if the kanban isn't defined, a default kanban view with only the id
of the model is used.

In the case of the taxes form, the `default_get` retrieved for this
form refers to a Many2Many (`tag_ids`) inside a One2Many. But this field
isn't present inside the loaded kanban view, so when we process the
command defined by the `default_get`, the `field_view` item doesn't
exist (because the default kanban loaded only contains the id of the
field).

Now instead of using an undefined `fieldInfo`, we fall back to an empty
object on the missing field to avoid the crash.

closes odoo/odoo#40617

X-original-commit: 47a306a31ac6d3c9e68e83b77a80426d5c6ceb05
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
2019-11-21 12:20:53 +00:00
Romain Estievenart 459228f053 [IMP] web: Fetch all columns in mobile kanban view
In this commit, we remove the lazy loading currently used by the mobile
kanban view to avoid the poor user experience. We had to wait each time
we swiped between kanban columns.

Now all data are fetched like in desktop. Note that it might still have
loading during the swipe for folded columns.

Task ID: 1896614

closes odoo/odoo#28142

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-11-07 13:28:22 +00:00
Romain Estievenart b5bc4dd46a [IMP] mail: wrong image size on mail preview on mobile
Before this commit, the displayed images with 'o_mail_preview_image'
class were not correctly displayed (some icon were distorted).

Note that this is a minor issue that was already present on older versions.

closes odoo/odoo#37161

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-10-07 12:38:55 +00:00
Romain Estievenart f88520280a [FIX] web_editor: make toolbar scrollable in mass_mailing on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were not displayed.

To fix this, we have to revert back the initial position on some elements.

closes odoo/odoo#37076

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-24 10:05:47 +00:00
Romain Estievenart 65c8d33c29 [FIX] web_editor: make toolbar scrollable in note on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were out of the screen area.

To fix this, we have to revert back the initial position on some elements.
2019-09-24 10:05:47 +00:00
Romain Estievenart 90e58efeba [FIX] web_editor: correctly display dialogs on mobile
Before this commit, web_editor dialog was opened inside an iframe and
not on the window.top. So dialogs didn't take all screen area.

To fix this, we open dialogs in full screen mode but we also put the
web editor in full screen to increase the size of the iframe.
Note that the initial state of the web editor (full screen or not) is
preserved when you close the modal.

We also add some fixes to make the "web_editor media dialog" responsive.
2019-09-24 10:05:39 +00:00
Romain Estievenart 00d65a9495 [FIX] calendar: Attendance buttons doesn't exist on mobile
Step to reproduce :
For small screens
 > enter the debug mode
 > go to the calendar app
 > access one of your meetings
 > access the tab "invitations"
 > try to change the state of attendance

It's due to the missing kanban view used by the o2m field 'attendee_ids'
We had to create this missing kanban view to allow theses actions on mobile.

opw-2058770

closes odoo/odoo#36501

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-09 11:42:53 +00:00
Romain Estievenart 3ad7706560 [IMP] mail: adapt responsive rules to allow swipe
Removing these margins makes swipe on 'o_mail_preview'
nicer in enterprise without having blank spaces.

Note that these rules should be in enterprise.

Task ID : 1895453
2019-08-19 13:01:30 +00:00
Romain Estievenart f7fa3b7677 [REF] mail: MessagingMenu: extract "mark as read" code to dedicated method
This allow us to reuse this logic in enterprise when you swipe.

Note that we could have directly called the handler but the name
wasn't appropriate. So we preferred to extract some code in a
well named function.

Task ID : 1895453
2019-08-19 13:01:30 +00:00
Romain Estievenart dfa64cb7fe [MOV] mail: move dedicated mobile file 'discuss_mobile.js' to mail_enterprise
These files are moved to be able to add some new responsive features
implemented in enterprise.

Task ID : 1895453
2019-08-19 13:01:30 +00:00