Commit Graph
172 Commits
Author SHA1 Message Date
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Damien Bouvy 1e706d3069 [IMP] web, *: milk adaptations
*: hr_holidays, stock, sale, product, web, sale, purchase, stock,
   website, survey

Adapt some custom control panels (mainly for custom reports) to the
milk controlpanel.

hr_holidays:
Move the buttons to create a new time off or a new allocation to the
"create button" slot and transform it into a dropdown (creating
allocation requests is clearly a secondary action, not a primary one)

stock:
3 lines does not fit, must be on 2 lines

Part-of: odoo/odoo#116641
2023-05-12 22:59:19 +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
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
Martin Maes 266fa04aa1 [FIX] mrp: Timer not working
On the manufacturing order, modifying the timer value does save it's value
in db but does not actualise it in the front.

The "rerun" condition is already checked in MrpTimer and does not need
to be checked in MrpTimerField

closes odoo/odoo#120385

X-original-commit: a8cfa1d26ef84aa6690d3cfa8b98b6cecf4f27d9
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-05-10 19:17:12 +02:00
Adrien Minne (adrm) 2c1096da95 [IMP] web,spreadsheet_dashboard: add missing props validation
closes odoo/odoo#120323

Task: 3297417
Related: odoo/enterprise#40611
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-05 18:08:02 +02:00
Touati Djamel (otd) b7af38b6ec [FIX] mrp: use product unit of measure precision in BoM overview
Steps to reproduce the bug:
- Go to Decimal accuracy:
    - Select the “Product Unit of Measure”
    - Set the Value to “4”

- Create a storable product with BoM:
    - add any product as component
    - save
    - Click on the BoM overview widget

Problem:
The “Product UoM” precision is not used

opw-3288403

closes odoo/odoo#120296

X-original-commit: 837a6ca90d6944f9faf4b28e69703f5310c6ec6a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-05-03 12:39:50 +02:00
clesgow 8e2a293faf [FIX] mrp: Add support for picking replenishment in MO Overview
When a reception picking was created to resupply a component (without
using a purchase order), the picking was correctly linked in the MO
Overview, but the date was set as "Not available" as the planned date of
the picking wasn't read.
Also adds the color scheme for pickings states for the Overview.

Part of task-3217757

closes odoo/odoo#118023

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-13 15:26:42 +02:00
clesgow bd2a99b469 [FIX] mrp: use the right uom for replenish wizard
When opened from the MO Overview, the uom in the wizard is the one from
the product's form.
The problem is that the quantity given to it is in the overview's line
uom. So instead we add an already converted quantity to the `to_order`
lines.

Part of task-3217757

Part-of: odoo/odoo#118023
2023-04-13 15:26:42 +02:00
clesgow 77531c5a67 [IMP] mrp: Restrict shown column on done MO in Overview
Product availabilities and their related replenishments are no longer
relevant when displaying a completed MO. Therefore, those columns are
disabled in the Overview when the the MO is either done or cancelled.

Part of task-3217757

Part-of: odoo/odoo#118023
2023-04-13 15:26:39 +02:00
Jorge Pinna Puissant baebb6a5b0 [REF] web, *: Unique id for field nodes
Before this commit, the field node id (`field_id`) uses the field name
for the first occurrence on the arch, and add an underscore and a number
for the rest of the occurrences. This can create inconsistencies when
sombody assumes that the field_id is equal to the name, and don't take
into account the possibility of multiple occurrences.

Now, a unique id is created since the first occurrence, this remove all
ambiguity between the id and the name.

Part-of task-id 3179751

closes odoo/odoo#117799

Related: odoo/enterprise#39511
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-11 15:17:20 +02:00
clesgow 93446d0cf7 [FIX] mrp: fix forecast for product template
Following 873d6d9, the forecast would now redirect correctly to the
corresponding bom when a `product.product` was used.
The issue is that `bom_variant_ids` doesn't exist on `product.template`,
raising a traceback when the forecast was accessed through the product
themselves instead of their variants

closes odoo/odoo#115776

X-original-commit: 93f6bf8dc5319082579a2b4ecbc48b482b81cc9d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-03-20 15:31:35 +01:00
Martin Maes 35eb9ef155 [FIX] mrp: timer wrong values on list view
The value of the timer was wrong when timesheeting with multiple employees
at the same time.
The problem was that the compute duration already takes the current timesheets
into account. So the problem was that we added some time
that was already in the duration

task id : 3216277

closes odoo/odoo#114901

Related: odoo/enterprise#38007
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-03-17 19:21:54 +01:00
7710c3331e [REF] mail, *: refactor Discuss
This commit refactors discuss code to use OWL components
and new tools and services in web/.
Functionally, Discuss app should work relatively the same as
before this commit.

closes https://github.com/odoo/odoo/pull/110188

Related:
https://github.com/odoo/enterprise/pull/38058
https://github.com/odoo/upgrade/pull/4423

closes odoo/odoo#110188

Related: odoo/upgrade#4423
Related: odoo/enterprise#38058
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre (aku) <aku@odoo.com>
Co-authored-by: Didier (did) <did@odoo.com>
Co-authored-by: Géry (ged) <ged@odoo.com>
Co-authored-by: Louis (wil) <wil@odoo.com>
Co-authored-by: Maël (mapa) <mapa@odoo.com>
Co-authored-by: Maryam (maki) <maki@odoo.com>
Co-authored-by: Sébastien (seb) <seb@odoo.com>
Co-authored-by: Thanh (tso) <tso@odoo.com>
Co-authored-by: Matthieu (tsm) <tsm@odoo.com>
Co-authored-by: Zelong (zel) <zel@odoo.com>
2023-03-17 11:47:09 +01:00
Touati Djamel (otd) 1b02516d12 [FIX] mrp: display the BoM overview of the current product variant
Stpes to reproduce the bug:
- Create a storable product “P1” with 2 variants:
    - Color: Red and blue in this order
    - Create a BoM for each variant
- Create a SO:
    - select the product “P1 - blue” → the second variant
    - Click on the forecast button →  manufacturing forecast

Problem:
The BoM overview is showing the wrong product variation because it pulls
the default BoM of the base product (always the first variant from the
list)

opw-3166074

closes odoo/odoo#115421

X-original-commit: 873d6d921c3955b707d10826a898ae405f296531
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-03-16 10:48:52 +01: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
Jorge Pinna Puissant 745d67cfa8 [REF] mrp: MrpTimer and MrpTimerField
Since [1], [2], [3] and [4], the field API was simplified and specified.
Some props were removed (update, type, setDirty and value) and some were
now mandatory (record and name).  This specification make it difficult
to use the fields as a "normal" component (without a record). This was
the case with MrpTimer, that was used as a field, but also as a
component. To solve this issue, in this commit, we divide it in two
different components, MrpTimer and MrpTimerField.

[1]: https://github.com/odoo/odoo/commit/aed1ba484d0c48a59e166ef01e69967bd618a562
[2]: https://github.com/odoo/odoo/commit/8cde3e84bb70a2bd097921c08c0059bf65bee602
[3]: https://github.com/odoo/odoo/commit/688986f888f2fe2371d58b74ded81315ba6bb353
[4]: https://github.com/odoo/odoo/commit/91303252f413325859a6f1651d056593a8cf6382

closes odoo/odoo#114761

Related: odoo/enterprise#37960
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-03-15 12:19:52 +01:00
Jorge Pinna Puissant 688986f888 [REF] web, *: simplify concrete fields API - remove value prop
This commit, is part of a series of commits that aim to simplifie the
concrete fields API.

In this commit we will remove value prop from concrete fields. Now each
field will directly use this.props.record.data[this.props.name] to
access their value, As a consequence of this, the name props need to be
mandatory.

task-id 3179751

closes odoo/odoo#113495

Related: odoo/enterprise#37464
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-07 09:02:50 +01:00
Hansun (hale) d47b5c3fa7 [FIX] mrp: broken UI on Group By
1. Install [Manufacturing] on Apps
2. On [Settings]>[Manufacturing]
- toggle on [Work Orders], [Quality] & [Quality Worksheet]
3. Go to Manufacturing
- Work Centers (a.k.a WC) Overview should be visible
- if no W.C. by default, add from [Configuration]>[Work Centers]
- give tag to each W.C. (lengthy so as to test the overlap)
- click Manufacturing and [Group by] Tag (Custom)

affected branch: 16.0-master

opw-3177656

closes odoo/odoo#114303

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
2023-03-03 19:10:18 +01:00
clesgow 1ef03b92a0 [IMP] {purchase_,}mrp: Add MO Overview
Adds in a new report that allows the user to monitor the entire
production of a product, including the resupply of the components (i.e.
subassemblies, purchases, ...) in a single view.

Task-3059467

Part-of: odoo/odoo#113394
2023-03-03 18:10:57 +01:00
Martin Maes 09314106e2 [IMP] mrp_workorder: employee login in workorder list view
This main feature of this commit is adding the possibility to login with multiple employees on the list view of workorders.

There is now a button in the header that will allow to log in as an employee in the list view.
The flow is the following :
- The employee logs in
- He becomes the "admin" of the session and his name appears next to the log out button.
- If another employee logs in, he will become admin and the first one will no longer be visible in the header.
- The employee will start timesheeting on the workorder if he press the start button. Notice that the employees working on the workorder will appear in the last column of every work_order record.
- If this second employee logs out, the first one will not become admin automatically. He will first need to click on his name/avatar in the popup and will be asked his pin code (if needed) to log in again.

There is also a way to assign employees to a workorder.
A filter will help retreive the workorder on wich the admin of the session has been assigned.
In addition, a new button in the header allows to mark as done multiple workorders at once.

The timer component has been updated to avoid wrong values if the computer goes to sleep mode.

The wizard of the workorders allowing to see the time traking has also be modified (switching tabs).

From a more technical point of vue, the employees and admin will be saved in the session.
The employees working on a workorder will be saved on the record.

related : https://github.com/odoo/enterprise/pull/34786

Part-of: odoo/odoo#107473
2023-03-03 17:04:47 +01:00
Jorge Pinna Puissant 91303252f4 [REF] web, *: simplify concrete fields API - remove value setDirty
This commit, is part of a series of commits that aim to simplifie the
concrete fields API.

In this commit we will remove setDirty prop from concrete fields. Now if
needed the fields can declare itself dirty using triggering
"FIELD_IS_DIRTY" on the model's bus.

Note that this PR partially revert [1] and completely revert [2]

task-id 3179751

[1] : 89c2a3978e
[2]: c79bb3c9c6

closes odoo/odoo#114124

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-02 16:01:19 +01:00
yhu-odoo 5bb0f96f19 [IMP] mrp: manual consumption improvement
Previously we set a component on MO to be manual consumption by comparing
the To Consume and Consumed, if they are not the same, we consider it a
manual consumption. Now if any input activity in the Consumed cell, we
will consider it a manual consumption.

Note that in the code, we make the css class change happended in the
list renderer instead of the field widget. We do that because we want to
change the background color of the whole cell not just the text of the
field.

Task-3116125

Part-of: odoo/odoo#113538
2023-03-01 17:01:16 +01:00
Bruno BoiandMathieu Duckerts-Antoine d19037e141 [IMP] web,*: better classes handling in view archs
**Before this commit**
- The optional "class" attribute set on the root node of a view arch
  is ignored, except for the kanban view which has a custom
  way of using it.
- The optional "js_class" attribute set on the root node of a view arch
  does not have any impact on the class names passed to its controller.

**After this commit**
The content of the optional attribute "class" set on the root node of an
arch like in

<list class="o_custom_class">
    ...
</list>

as well as an additionnal class derived [1] from the value of the
"js_class" attribute set on the root node of an arch like in

<list js_class="extended_list">
    ...
</list>

will both be found in the prop "className" of any view controller.

[1] a js_class value of "xyz" yields to the class "o_xyz_view"

**Note on this commit**
The kanban view was already appending the root node class attribute
to its renderer element. This is no longer the case and some styling
rules has been adapted.

closes odoo/odoo#113014

Related: odoo/enterprise#37265
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2023-03-01 17:01:03 +01:00
859a289b01 [REF] web,*: OWL GanttView (part 2)
This commit acts as a setup that allows the newly converted gantt view
extensions in enterprise to work properly.

Part-of: odoo/odoo#112756
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-02-28 20:38:49 +01:00
clesgow 5da90dfc4e [FIX] web,stock,mrp: check if viewSwitcherEntries exists
When using the ControlPanel's bottom-right slot in another component, if
`viewSwitcherEntries` wasn't defined in `env.config` it would raise a
traceback, as the template would try to check an `undefined`'s length.

Removed the workaround that added an empty `viewSwitcherEntries` in the
forecast report and the bom overview report since it's no longer
necessary.

closes odoo/odoo#112415

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-23 16:08:33 +01:00
Hansun (hale) d741a3a312 [FIX] mrp: UI issue on manufacturing work orders kanban view
1. Install [Manufacturing]
2. Go to [Manufacturing]
- [Configuration] > [Settings], toggle on [Work Orders]
- [Operation] > [Work Orders]
- click on Kanban view
- remove all filters, then click on [Group By] - choose any

Issue: overflowing state tag beyond each kanban card

Resolve by: ordering line by line the information to display

Impacted versions: 16.0 up to master

opw-3162947

closes odoo/odoo#113386

X-original-commit: a72dbedcb00cef76e9a85f59cc875461cf38eafe
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
2023-02-22 17:48:53 +01:00
Jorge Pinna Puissant 8cde3e84bb [REF] web, * : simplify concrete fields API - remove update prop
This commit, is part of a series of commits that aim to simplifie
the concrete fields API.

In this commit we will remove update prop from concrete fields. Now each
field will directly use this.props.record.update to make changes, and
handle the save in fields that need to (e.g. priority). As a consequence
of this, the record props need to be mandatory.

task-id 3179751

Part-of: odoo/odoo#112792
2023-02-22 13:46:19 +01:00
Ahmed Khalaf 3a0678cbc3 [FIX] stock, mrp: fix forecasted report for MOs
Before this commit, the reserve and unreserve buttons did not appear
for MOs.

Another bug was also fixed, removed the 0 Inventory on Hand line that appeared
when there are no moves in the report.

closes odoo/odoo#112981

Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-02-20 18:27:53 +01:00
Michael (mcm) 9f4622492c [REF] *: register field descriptors instead of components
Before this commit, the field's description was stored on the
component and this component was then registered.

Now, an object describing the field is used on registration the same way
as it is done for views since https://github.com/odoo/odoo/commit/b828cfc72c587d0b73fcc5459695705640437671.
This split the component's description (props, template, ...) of
the field's description (displayName, supportedTypes, ...) and makes
it clearer.

closes odoo/odoo#112498

Task: 3171520
Related: odoo/enterprise#37105
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-16 14:13:32 +01:00
e93988ea65 [REF] mrp, web: OWL GanttView
Community counterpart of the enterprise commit having the same name.

This commit acts as a setup to allow for the reworked gantt view to work
properly.

Task Id: 3105022

Part-of: odoo/odoo#110819
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-02-14 17:09:06 +01:00
Ahmed Khalaf (ahkh) 2dad4a5eea [IMP] stock: forecast report reserve/unreserve
Before this commit, the reserve/unreserve buttons did not work / were
hidden with multi-step delivery settings. The report now works with the
entire linked chain of moves, it displays which step is reserved,
if more than one is reserved in the chain the later move is shown.

Because reservation works differently on chained moves (they reserve
quantities brought by previous move in the chain) any extra unreservable
quantities are shown as on stock in transit.

closes odoo/odoo#112162

Taskid: 2858139
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-02-08 13:28:07 +01: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
Mathias Mathy (MAMA) 0a43740481 [REF] Stock: report_stock_forecasted to owl
Refactoring of report_stock_forecasted to owl
Since it wasn't really a report (no print action),
it changed from a report to a client action.
Task: 2885757
See Upgrade : odoo/upgrade#3926
See Enterprise : odoo/enterprise#32116

closes odoo/odoo#101247

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-02-06 14:16:26 +01:00
Martin Maes e084b5dcf9 [FIX] mrp: Workorder timer not updating
This PR addresses a bug introduced in odoo/odoo/pull/109776
The user can indeed modify the timer, but because a started timer is a readonly field,
the timer does not update.
Using isDirty allows to check if the user really modified the timer.

closes odoo/odoo#111064

X-original-commit: 9aa8752da18ed679d7ddae93682c045204083104
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-26 18:51:34 +01:00
Martin Maes 5d69c69c57 [FIX] mrp: Workorder timer not updating on user input
This PR addresses a bug where the user tries to update the real duration of a work order in the list view.
The timer was updated in the backend (so the update was showing when refreshing the page) but not in the front
The problem was the following : the state was never updated in the widget

closes odoo/odoo#110132

X-original-commit: 42bb1ac5195b614de4de674c47864abab79a5082
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-18 13:25:35 +01:00
JF Aubert b0a6c525b0 [IMP] mrp: Improvements
- Many ui/text updates
- Fix To consume field display
- Add Draft/Done filters to Scrap views
- Fix BoM name_create problems due to _rec_name set to product_tmpl_id

Task: 3094741
Part-of: odoo/odoo#108446
2023-01-11 13:20:47 +01:00
clesgow c7e3f40a67 [IMP] mrp: display routes with lead times in overview
In the BoM Overview, routes were always displayed regardless of the
display options selected in the filter. Since lead times are only
relevant when checking their associated routes (as they determine them),
it makes sense to add the display of the routes in the lead times
filter.

closes odoo/odoo#108808

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-12-29 15:16:56 +01:00
JF Aubert 0296c93edd [FIX] mrp: fix workorder timer for sample data
get_working_duration can't work on generated samples.

closes odoo/odoo#107934

Task: 3098709
X-original-commit: 642ca37e4e5a3db6ef7929a25850fafc499e4257
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Jean-François Aubert <ajf@odoo.com>
2022-12-14 15:36:48 +01:00
Tiffany Chang (tic) a24d57daeb [FIX] mrp: correct unit cost in bom
Incorrect variable reference + calculation for unit BoM cost for
byproduct/product (to produce) within in BoM overview report. This
was leading to the displayed value having the cost_share being multipled
into the unit cost twice.

Steps to reproduce:

- create component with cost 100
- create BoM with 1 of this component + 1 byproduct with
  qty = 2 and cost_share = 50.00
- click on Overview

result before this commit:
Manufactured Product unit cost = 25.00
Byproduct unit cost = 12.50

actual result should be:
Manufactured Product unit cost = 50.00
Byproduct unit cost = 25.00

closes odoo/odoo#107410

X-original-commit: 2339bed170b5f670b1f5a6cebd533a9cee72d4db
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-12-07 19:56:17 +01:00
Ahmed Khalaf 1aa59f8b01 [FIX] stock, mrp: popover widget sub templates
This commit changes popover widget such that instead of altering the
popover component during app lifecycle to make dynamic
popover templates, use `t-call` to call template passed in props.

closes odoo/odoo#107286

X-original-commit: f1a9de85c19a53c9516cac44de6cbaf53d850842
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-12-06 17:11:58 +01:00
JF Aubert b7e499473c [FIX] mrp(workorder_hr): fix workorder times
Fix workorder times problems:
- sum in workorders list view
  (displays numeric value rather than mins:secs)
- timers sometimes starts at -00:01
- almost all tablet view actions reset the timer (click burger, ...)
- clicking pause stops the timer at the next second
- seconds are lost in employee timers

Task: 2985735
X-original-commit: 7dceef12771890f9fb9fa554e70414c622053ced
Part-of: odoo/odoo#106908
2022-12-01 14:33:57 +01:00
clesgow 0289fd45b2 [FIX] mrp: BoM Overview filters display
Since the pager div doesn't appear anymore in the DOM when it would be
empty, the filters buttons (warehouse and display) would be pushed back
to the end of the flex div.

Part of task-2985735

X-original-commit: 4ee3875a6d6faf5563c720fa399eca5b4a1d0e4f
Part-of: odoo/odoo#106935
2022-12-01 11:54:55 +01:00
clesgow ba450b568f [FIX] mrp: Allow leaving the BOM Overview
Typo made the call to `this.changeFolded` instead of
`this.props.changeFolded`. As it couldn't be found in the unmount, it
raised an error each time the user tried to leave the report.

Steps to reproduce :
Go to MRP -> Products -> Bill of Materials -> Any BoM -> Overview -> Go
anywhere else than the report.

Also got rid of the now useless `this.bus` in the main overview
component.

opw-3061658

closes odoo/odoo#105773

X-original-commit: c22e7a2a245ce98654a4d99a663c555bedfee165
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-11-15 18:25:50 +01:00
Mathias Mathy (MAMA) b4f36b45c7 [FIX] mrp: Update "To Consume" on Quantity Change in MO
Steps to reproduce :
    In a Manufacturing Order, update quantity (product_qty)

Expected behavior :
    In the "Components" tab, "To Consume" column should update without Save

Actual behavior :
    Due to "mrp_should_consume" widget not being reactive, should_consume_qty is not updated in the view until it's saved.

closes odoo/odoo#104364

Task: 2985735
X-original-commit: b3ec31d89eb635b555f77b3eb9ecaac4c65981e6
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-07 10:06:21 +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
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
William Henrotin 50dddf3aa0 [FIX] mrp: show slides in readonly
Ensure the google slide are displayed in both readonly and editable
mode. The slides should be hidden only if the url is wrong or empty.

closes odoo/odoo#103872

Task: 2991906
X-original-commit: bbf4f1e7b9cb456f2930c270f7e2b2c35cc9e80d
Related: odoo/enterprise#33100
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-24 09:16:55 +02:00
William Henrotin 3bc9d3dabe [FIX] mrp: make the timer editable
This commit makes the ongoing timer editable

Task: 2991906
X-original-commit: b2ce5adeead3255de765a6136116ffc7f36ea49e
Part-of: odoo/odoo#103872
2022-10-24 09:16:55 +02:00
Xavier Luyckx (xlu) c1a5542f8d [FIX] mrp: use bg-viewto correctly handle dark-mode
In order to correctly handle dark-mode (#99755) elements
that match views bg-color should use `bg-view` class.

task-3012970

closes odoo/odoo#103132

X-original-commit: e29347b4c45325584b0dd30a15fdf5d662f62c99
Related: odoo/enterprise#32753
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-10-12 11:30:04 +02:00