Commit Graph
10 Commits
Author SHA1 Message Date
Pierre Paridans caef16ee4e [REF] web,*: ControlPanel layout
This commit brings the ControlPanel into a single line with 3 main
sections:
- buttons & breadcrumb
- layout related actions (ie. the SearchBar in multirecord view or
  ButtonBox in formView)
- navigation (pager, switch view...)

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

Also adapt navigation hook.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
Joseph CaburnayandJulien Mougenot 3a798039d6 [REF] web_tour,*: convert web_tour to owl
* The tours are now run by the `MacroEngine` defined in `macro.js`.
  * This is accomplished by converting (at runtime) the user-defined tours to
    `Macro`s. See `tour_compilers.js` for the step (and tour-to-macro) compilation.
* API is kept the same as much as possible. Basically, declaring tours stayed
  the same with some exceptions:
  * `allowInvisible` can be provided in a step to allow consuming the trigger
    element even if it is invisible.
  * `isCheck` can now be used to replace the no operation `run` that is
    traditionally signals the runner to only perform a check.
  * Before, multiple `run`s can be called simultaneously. Now, each `run` method
    is awaited before proceeding to the next step.
* If the trigger element is `disabled`, the tour runner will *not* proceed on
  calling the `run` method and the runner will stay on current step until the
  trigger element becomes `enabled`.
  * However, the tour runner is okay with `disabled` trigger element if the step
    has `isCheck = true`. As long as the trigger element is found for `isCheck`
    step, the tour runner will happily move to the next step.
* Some tours are adjusted to properly run with this new tour runner.
* When the tour failed:
  * The dom string is not logged anymore.
  * However, a warning message containing the relative location of the step will
    be logged. This is better in helping the author in locating the failed step.

**Some guidelines learned during the development:**

* Each step may trigger a dom mutation. It's a good practice to insert an
  intermediate step that *checks* the existence of an element that result from
  the action of the previous step.
* Refrain from using the `run` method for assertions. `run`, in principle, is
  provided to perform actions that are not offered by the helper. Use the
  `trigger` for assertions.
* During dev, find `SHOW_POINTER_DURATION` and set it to `250`. This will show
  the pointer (pointing to the trigger element) for 250ms when watching the
  tour.

closes odoo/odoo#107618

Task-id: 3082036
Related: odoo/enterprise#37560
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2023-03-15 13:19:45 +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
clesgow 6b9a443f7c [IMP] mrp{,_subcontracting}: OWL adaptations
Adapt event handling to better match OWL specifications.

closes odoo/odoo#105067

X-original-commit: 5c1701de318284bd13a75cab221bc49e4ef4a52d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-07 09:12:12 +01:00
Tiffany Chang (tic) 85dfd22b49 [IMP] mrp_subcontracting: convert portal to OWL
The subcontracting portal was already mainly written in OWL, but a
couple of small tweaks are needed to match the latest implementation.

Used for reference:
https://github.com/odoo/odoo/blob/b8ef0cc4f22827f684cf3361ee9fd526d27cb72a/addons/project/static/src/project_sharing/project_sharing.js
i.e. the OWL changes to the code that this portal was originally
"inspired" by

closes odoo/odoo#104024

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-10-25 14:03:21 +02:00
yhu-odoo 70810919da [FIX] mrp_subcontracting: portal should be readonly
1. Except for registering components, the portal should be readonly
2. Don't open sm form when click it.

closes odoo/odoo#102935

X-original-commit: 4c5ba480e91b7e06c49b3683c36ff0a9aac9b60f
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2022-10-11 15:52:02 +02:00
clesgow 8eca2351ba [REF] mrp_subcontracting: picking_form_controller to OWL
Updates the subcontracting_portal_picking_form_view js_class into OWL.

Task-2885757

closes odoo/odoo#99013

Related: odoo/enterprise#31024
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-09-05 14:50:24 +02:00
clesgow 5e2d48fbfa [REF] mrp_subcontracting: Adapt subcontracting for BoM Overview
The 'Structure & Cost' report has been changed to 'Overview', changing
some of its functionnalities. The override previously done in
mrp_subcontracting must be adapted to match the changes done in the mrp
module.

Also, the report has been converted to OWL in the process, requiring
changes in the overriden files as well.

Finally, the now obsolete code only related to the old 'Structure &
Cost' report has been removed.

Task-2628323

Part-of: odoo/odoo#93194
2022-08-26 17:16:41 +02:00
Géry Debongnie 613b6343a9 [REF] mrp_subcontracting: update move list view to owl
It now uses the new owl code, instead of the legacy list view, which
will be removed in the future.

closes odoo/odoo#96595

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 01:30:17 +02:00
Nicolas Pierre 99b56ec706 [IMP] mrp_subcontracting: subcontracting portal
Creation of a subcontracting portal to let the subcontractor register himself
all the components that were used for the production. The portal is
reusing the backend view of the stock picking where components were
registered before.

closes odoo/odoo#83465

Task: 2645298
Community-pr:  https://github.com/odoo/odoo/pull/83465
Enterprise-pr: https://github.com/odoo/enterprise/pull/24647
Related: odoo/upgrade#3402
Related: odoo/enterprise#24647
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-04-11 11:01:50 +02:00