Commit Graph
111 Commits
Author SHA1 Message Date
Brieuc-brd d17743e34e [IMP] * : add missing borders
Depending on Milk, this commit adds some missing borders.

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

task-2818586

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

Better breadcrumbs actions alignment in ControlPanel.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:15 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
Aaron Bohy 49297bc7bb [REM] *: remove legacy basic views + some fields/widgets
This commit removes the legacy implementation of the form, kanban
and list views. It also removes the legacy view widget registry,
and all legacy widgets it contained. The legacy field registry
couldn't be removed yet as some fields are still used (e.g. in
client actions: FieldMany2One, FieldMany2ManyTags...), and
sometimes accessed from that registry (e.g. uom service). More
clean up will come later. Note that all tests using legacy views
have thus been removed, even though the tested feature might still
remain (e.g. FieldMany2One tests have been removed, but that field
is still there). However, those features are deprecated and
unlikely to evolve. They should be removed in the next saas, or the
one after.

Finally, this commit also removes the legacy view dialogs.

Task 3168640

Part-of: odoo/odoo#111809
2023-02-08 13:27:58 +01:00
Géry Debongnie b53f78e224 [REF] web_tour,*: use the registry in collecting the tours
This is a step closer to a goal of avoiding dependence on asynchronous
modules. Starting from this commit, new tour definition should be
registered to `registry.category("web_tour.tours")` registry.

So, instead of the following:

```js
import tour from "web_tour.tour";
tour.register(name, options, steps);
```

We now do:

```js
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add(name, optionsWithSteps);
```

Notice the `options` and `steps` params are merged when registering
the tour definition. It should look something like so:

```js
registry.category("web_tour.tours").add("account_tour", {
  test: true,
  steps: [ ... ],
});
```

And if the `TourManager` instance is needed, one can get it from the
registry like so `registry.get("tourManager")`. Note however that
this instance is only available when the `TourManager` has been
instantiated -- so it's not available at top level of the module.

closes odoo/odoo#111103

Related: odoo/enterprise#36335
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-01-27 23:17:35 +01:00
Jorge Pinna Puissant 886f3de768 [IMP] web,*: force props validation for components
*: base_automation, lunch, mail, mrp, project, web_editor, website

This commit adds a warning if the props validation is not set for a
component.

The props validation is important to tell how a component should be
used, by looking at its code, it's a good documentation of the component.
It's also critical, to test if the component is correctly used, if all
the obligatory props are passed and that there are of the correct type.

For more information, see: https://github.com/odoo/owl/blob/master/doc/reference/props.md#props-validation

closes odoo/odoo#103723

Related: odoo/enterprise#33044
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-10-26 16:07:18 +02:00
stefanorigano (SRI) 8acfa3c3c5 [FIX] lunch: use bg-view to correctly handle dark-mode
In order to correctly handle dark-mode (https://github.com/odoo/odoo/pull/99755) elements
that match views bg-color should use `bg-view` class.

task-3012970

X-original-commit: 4292ac903209fc7af9a3e4e6a6abd512831e792a
Part-of: odoo/odoo#103118
2022-10-12 11:29:54 +02:00
Morgane (morm) 24d9019f99 [IMP] Lunch: scss revamp
Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2920029

closes odoo/odoo#96027

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-08-30 20:22:04 +02:00
Kevin Baptiste 503c0d6f8f [IMP] lunch: migrate to Owl
Migrate lunch to Owl.

task-2916338

Part-of: odoo/odoo#99021
2022-08-30 08:18:36 +02:00
+2 bc0a0cead6 [IMP] web,*: enable owl list & form views
The new list and form views were merged recently [1], but they
weren't activated because they weren't 100% ready yet. This is now
the case. This commit adds those views to the view registry. As a
consequence, a lot of qunit tests and tours needed to be adapted,
mostly for selector changes.

We also add legacy list and form views to the view registry, with
keys 'legacy_list' and 'legacy_form'. This allows to force those
legacy views when necessary. For instance, we did it in views
using complex custom legacy x2many field widgets that haven't been
converted yet (we have a compatibility layer but it isn't complete
and doesn't support every advanced usecases).

[1] odoo/odoo#92475

Part-of: odoo/odoo#78221
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
2022-07-22 16:21:45 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli 9b5c9484fe [REF] *: BS5: adapt changes in media query mixin
> Media query mixins parameters have changed for a more logical approach

> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).

https://getbootstrap.com/docs/5.1/migration/#sass

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli 903e72d0ac [REF] *: BS5: various
Refs:
https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:20 +02:00
Aaron Bohy 4f984568e1 [REF] *: adapt code to new kanban view
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).

It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
stefanorigano (SRI) 87a7449afd [IMP] web, *: odoo-brand color classes
Prior to this commit branded UI components were styled exclusively in
raw SCSS using the '$o-brand-odoo' variable.

This leaded to unnecessary code repetitions since, to achieve the same
visual result, each module defined its own classes.
Visual inconsistencies were frequent too since each module defined its
own variations for interactive states (eg :hover).

This commit injects '$o-brand-odoo' into bootstrap's default
'$theme-color' map, allowing the framework to automatically generate
odoo utility/contextual classes.
These classes can be used to handle text, backgrounds, borders and
buttons wherever needed.

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2800721

closes odoo/odoo#87448

Related: odoo/enterprise#25700
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-05-05 14:00:37 +02:00
Dossogne Bertrand bd8a6ef7ef [IMP] lunch: add lunch tour for users
This commit adds a tour for users to order their lunch.

taskID 2810265

closes odoo/odoo#88089

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-04-20 16:41:06 +02:00
Kevin Baptiste 565f11ec92 [FIX] lunch: properly open lunch products
Since odoo/odoo#fb9c8cd6 it was no longer possible to open the lunch product
in the kanban view as both _openRecord() (from base class) and
_onSelectRecord() were triggering events.

closes odoo/odoo#87612

Taskid: 2810219
X-original-commit: a497d95e8a4a55884800377d0de32babb78c05ce
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-31 09:40:48 +02:00
Kevin Baptiste 58c7e17a68 [IMP] lunch: add 'Sent' status
Added a new 'Sent' status, meaning the orders have been made to the
supplier. Once an order is 'Sent' it cannot be modified anymore.

It's no longer possible to order a product after the automatic email has
been sent.

closes odoo/odoo#80584

Taskid: 2678064
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-03-14 17:27:54 +00:00
Jorge Pinna Puissant bc20eb4790 [IMP] test_lint, *: enable no-unused-vars rule
Part-of: odoo/odoo#85569
2022-03-02 13:05:42 +00:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
+2 318cdcc0b8 [REF] *: adapt code to owl 2
Owl 2 changelog: https://github.com/odoo/owl/blob/a9f29c4caad4f32d06be1ec4780572825781cd9b/CHANGELOG.md

Part-of: odoo/odoo#80156
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-02-10 07:46:13 +00:00
Kevin Baptiste fbc7b78036 [FIX] lunch: show only company locations
All lunch locations were showing regardless of the company the user is
logged in.

Now only the lunch locations of the current company are showing.

closes odoo/odoo#81603

Taskid: 2710417
X-original-commit: 3e87770bb8faf2a58ba0b429148f64256537a4da
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-17 16:07:37 +00:00
Martin Trigaux 293d3765fa [IMP] lunch: avoid a call to ir.model.data
Not needed to do it via a specific call, can be included in the
controller data
2021-08-10 13:49:04 +02:00
Xavier Morel b451441e58 [IMP] lunch: de-traw-ify
Remove t-raw of alert messages:

* Add alert testing to one of the existing tests.
* Transform widget data straight in `_fetchWidgetData` so the widget
  itself only ever sees the "proper" shape of things (to come), this
  includes the existing parsing and reformatting of `wallet`, as well as
  the new wrapping of all alerts' `message` in a `Markup`.

Note: conditional updating of `alerts` because while the endpoint
actual always sets it, test data doesn't necessarily do so (?).
2021-07-20 05:41:35 +00:00
Xavier Morel ce50728aa0 [REM] lunch: outdated / unused file
lunch.xml apparently stoped being used in
855c6dac25, but was never deleted.

Finally drop it, and its t-raw.
2021-07-20 05:37:41 +00:00
Yannick Tivisse d7ddd5de53 [IMP] lunch: Store the lunch location on lunch orders 2021-07-16 12:02:56 +02:00
Yannick Tivisse 01ae6a69f2 [IMP] lunch: Improve general UX (back2basics)
TaskID: 2586326
2021-07-16 12:02:56 +02:00
Francois (fge)andSimon Genin d29666c04c [IMP] web, *: adapt some JS files to new module system
The previous work on adding support for native JS modules needs to adapt
some existing files, which have an incompatible name (with a '/').

Also, we convert a few JS file in /web to the native JS module system,
to show that it can work.

Part of PR 63177

Co-authored-by: Simon Genin (ges) <ges@odoo.com>
2021-02-15 10:18:11 +01:00
Julien Mougenot 6e780b2e4f [IMP] lunch: Make dispatch actions synchronous
Before this commit, the return value of some of the dispatch actions of
the lunch model extension was wrapped inside a promise with the use of
the "async" keyword. This caused the synchronous aspect of all these
methods to be delayed.

Now they are not longer asynchronous.
2020-08-04 12:44:18 +00:00
Julien MougenotandMathieu Duckerts-Antoine 3162141e4d [IMP] lunch: Conversion of model to extension
Conversion of the lunch kanban model to a proper search extension.

Now that the view search model supports model extensions, it has become
more convenient to provide additional domain informations by appending
new extensions.

This is why the lunch "location" logic (locationId and userId) has been
shifted to a new model extension ("Lunch Model Extension") which
provides an additional domain part to the other search extensions.

Part of task 2228968

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2020-07-23 08:21:10 +00:00
Aaron Bohy 8abbc5a3b5 [REF] *: adapt code to web changes
Some changes in AbstractModel have been done to ease the
implementation of the sample data feature. This commit reverberates
those changes in other addons.

Part of task 2232801

X-original-commit: dd8069a3c80570e7fa03a80dbb100ab0a182692a
2020-06-22 13:04:02 +00:00
Julien Mougenot f5f0ca843d [IMP] *: enable_counters with false as default
In the search panel, the attribute disable_counters with default False
has been changed to enable_counters with default False.
2020-06-12 13:34:04 +00:00
Anh Thao Pham (pta) 8b6b09fc26 [IMP] lunch: add list view for lunch.product.report
- Move code from kanban view that is common with list view in common files
- Add action to add selected products to cart
- Add/update tests

closes odoo/odoo#47556

Taskid: 2160048
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-30 11:40:39 +00:00
Julien Mougenot 7ace5a986a [FIX] web,lunch: separate search panel domain
Before this commit, the SearchPanel widget was given a single unified domain coming
from the view/controller. The issue was that some modules injected additional leaves
in this domain and there was no way to remove them/separate them from the original
view/controller domain.

Now, another paramater (the `viewDomain`) is given to the SearchPanel, containing
the distinct domain related to the view. The Lunch module has been adapted to give
the `location` domain through this new key.

Note that some tests steps had to be inverted since the method retreiving the
domain of the view/controller is asynchronous (needed by Lunch to give time to the
model to be loaded). It mainly concerns the RPC order which does not matter in this
case.

Task 2239706

closes odoo/odoo#49720

X-original-commit: e895e553899933be14c8abfd8c676b44a7f534d8
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-17 14:21:02 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
RomainLibert 69319bba3e [IMP] lunch: get rid of the lunch_order_temp wizard
Replace lunch.order.temp wizard by lunch.order (fp request)

closes odoo/odoo#35585

Taskid: 2048667
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 12:37:52 +00:00
RomainLibert d4fb89cd25 [IMP] lunch: back2basics
closes odoo/odoo#38899

X-original-commit: f4dbee9b844015e95afd5edf892489582cf1f397
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-16 16:39:16 +00:00
Christophe Simonis 58a83d1222 [MERGE] forward port branch saas-12.4 up to 4a1321bc99
closes odoo/odoo#37127

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-20 14:33:54 +00:00
Christophe Simonis 080f8b1f96 [MERGE] forward port branch saas-12.3 up to d8ce75466e 2019-09-17 17:49:09 +02:00
Sébastien Theys b6288e5446 [IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-19 10:23:39 +00:00
Florimond Husquinet (fhu) 6abfdd37b2 [FIX] lunch: add test for domain generation when location false
Fine tuning of 988e201d2e

closes odoo/odoo#36628

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-10 14:47:11 +00:00
RomainLibert 988e201d2e [FIX] lunch: allow location_id to be NULL
In case the last location of a user was NULL in databse, lunch was
crashing because lunch_kanban was adding an undefined leaf to the load
domain.

closes odoo/odoo#36571

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-09 14:04:12 +00:00
Christophe Simonis 5a273e74f0 [MERGE] forward port branch saas-12.4 up to fe59754c52
closes odoo/odoo#36721

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-13 13:32:51 +00:00
RomainLibert ba8bdcfaf2 [IMP] lunch: improve lunch again 2019-09-04 07:26:43 +00:00
RomainLibert c0febb02d8 [IMP] lunch: Improve the product dashboard
The default image for the lunch product should be the one from the
category (added an image on the categories).

In case there is no image either on the product either on the category,
in the kanban view there should be a specific image (fork and knife
image)

Added some data in order to always have something displayed in the
kanban view

Fixed the layout of the dashboard

Bug fix, in `_check_wallet` there was a flush missing

Bug fix, `product_id` should be a many2one, not an integer field and the
orm should be used in order to avoid problems when favoriting products

This is a back2basics task

Task 2048246

closes odoo/odoo#35632

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 08:59:12 +00:00
Lucas Perais (lpe) 466b97c594 [FIX] lunch: lunch search panel right domain on start
Open the Lunch kanban view

Before this commit, the counts for each product were the counts
across all location
This was before the location domain from the lunch widget was not sent

After this commit, the counts displayed on startup are the ones
of the right user location

OPW 2053044

closes odoo/odoo#35976

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-23 14:42:44 +00:00
Christophe Simonis 51354fadb0 [MERGE] forward port branch saas-12.3 up to 50e571acf7
closes odoo/odoo#36491

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-11 09:39:33 +00:00
Christophe Simonis 34a8754d4f [MERGE] forward port branch saas-12.2 up to 498b4b4350 2019-06-14 15:20:01 +02:00
Christophe Simonis 25e3f27062 [MERGE] forward port branch saas-12.3 up to 48a9f5a633 2019-06-17 13:20:35 +02:00