Commit Graph
20 Commits
Author SHA1 Message Date
Martin Maes a934cc4376 [FIX] mrp: add breadcrumbs on the subcontracting portal
task-3201527

Sub-task: 3
Part-of: odoo/odoo#127409
2023-10-26 13:41:01 +00:00
Chrysanthe (chgo) df8535fbd4 [REF] portal, *: portal redesign
*: base, account, account_payment, auth_top_portal, hr_timesheet, loyalty,
   mrp_subcontracting, payment, project, purchase, sale, sale_stock,
   sale_timesheet, website_crm_partner_assign, website_sale,
   website_slides

Portal general redesign. Increase visual consistencies with the backend
[1] and adapt to the new default website design [2].

[1] https://github.com/odoo/odoo/pull/116641
[2] https://github.com/odoo/odoo/pull/120302

task-3046004

Part-of: odoo/odoo#138077
2023-10-25 15:50:36 +00:00
Aaron Bohy b3972b26a1 [REF] web,*: remove legacy service provider
This service was used to redirect legacy service requests to the
wowl service infrastructure. It has been incrementally simplified
with the codebase getting converted. It now only allows to redirect
calls to the effect service, which doesn't seem useful anymore.
This commit thus removes it.

Part of task~3439226

closes odoo/odoo#138120

Related: odoo/enterprise#48654
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-10-10 07:15:47 +00:00
Jorge Pinna Puissant ef424a9dc2 [REF] *: remove owl from linter's accepted global variables
Before this commit, owl was in the linter's accepted global variables.
This allowed  direct access to owl global object.

For instance, to use xml from owl, you could do :
`const { xml } = owl;`
or you could use it directly:
`owl.xml`

Now, owl is not accepted on linter's global variables anymore, so to
import xml, now you need to use a proper import:

`import { xml } from "@odoo/owl";`

task-id 3498859

closes odoo/odoo#137517

Related: odoo/enterprise#48364
Related: odoo/design-themes#709
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-10-05 10:21:53 +00:00
Vraj Panchal eaf7e6d581 [IMP] mrp_subcontractiong: hide action button on portal
Remove the cogs icon on the subcontracting portal page.

task-3471491

closes odoo/odoo#135090

X-original-commit: f02aeeb30180bdc096442fcf82df6f0a0c70fdb9
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-13 03:37:55 +00:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.

task 3410198

[1]: 19ea1ac08043e22a811630968e44715cc3bfc495

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
Pierre Pulinckx (pipu) 8bfa76a842 [REF] *: Unify _t and _lt
The goal of this commit is to prepare ground to remove
lazytranslate function _lt() and keep only _t()
for a better understanding of the use of the translation function.

In this commit,

the translate function _t() has been updated to return the translation
if they are loaded. If not, it throws an error.
the lazytranslate function _lt() returns _t() function.
Corollaries :
Steps in test tours are now a function that returns an array of steps
to avoid any interpolation of _t in this ones before translations has
been loaded.

Example :

registry.category("web_tour.tours").add("example", {
    test: true,
    steps: () => [
        {...},
        {...},
    ],
});

task-3292454

closes odoo/odoo#124157

Related: odoo/enterprise#43153
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-19 13:13:16 +02:00
Arnold Moyaux 9a01c6a29c [FIX] mrp_subcontracting: only import needed files
Follow the same behavior than project. Only import the code for the
views. It's not a good idea to import all the backend since it's not
needed and it could cause issue with extra features

closes odoo/odoo#121669

closes odoo/odoo#119040

X-original-commit: 8f3f10731545f32d283772fc009733c1b43f536b
Related: odoo/enterprise#41188
Related: odoo/enterprise#39987
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-21 10:37:04 +02:00
Touati Djamel (otd) a1213accd6 [FIX] mrp_subcontracting: fix traceback in bom overview
Steps to reproduce the bug:
- Enable subcontracting in mrp settings
- Create a storable product:
    - add “azure interior “ as supplier
    - Create a BoM:
        - Type: subcontracting
        - subcontractor: azure interior
        - save
- Click on BoM overview

Problem:
Traceback is triggered: “OwlError: Invalid props for component
'BomOverviewSpecialLine': 'precision' is missing (should be a number)”

opw-3321346

closes odoo/odoo#123435

X-original-commit: 60eca5439e72786bb0e913d7ac643697376205c9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-06-05 14:49:46 +02:00
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