Commit Graph
197 Commits
Author SHA1 Message Date
Sébastien Theys d08a18b791 [IMP] mail, *: tests: use contains in click and insertText
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail, web, website_livechat

`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

closes odoo/odoo#130451

Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-21 21:00:03 +02:00
Sébastien Theys 9a1efcbde7 [REF] mail, im_livechat, mrp: rename waitUntil to contains
`await contains` is shorter and reads better than `await waitUntil`.

Part-of: odoo/odoo#130451
2023-08-21 21:00:02 +02:00
Sébastien Theys 3f8544d906 [IMP] mail, im_livechat: tests: add assert to waitUntil
`QUnit` tests require at least one `assert`. This change allows to write
tests that only contain `waitUntil` without extra `assert` in the test.

`waitUntil` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

Currently existing tests that contain `waitUntil` have been adapted
accordingly. More and more tests should make use of it in the future.

Part-of: odoo/odoo#130451
2023-08-21 21:00:00 +02:00
Pierre Pulinckx (pipu) c07181b20b [REF] *: Replace env._t() by _t()
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :

<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>

task-3292454

closes odoo/odoo#131390

Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-18 19:17:16 +02:00
Brieuc-brd 92ce339ec0 [FIX] mrp: BOM control_panel layout
This commit fixes the layout of the BOM control panel.

task-3419079
Part of task-3326263

closes odoo/odoo#132025

X-original-commit: c0fac4b7b8b66315a553337956999d8eb602ac13
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-16 17:47:36 +02: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
Martin Maes 562114c532 [FIX] mrp: remove microseconds on timesheets
**Sum of timesheets time different than what the timer displays**

Steps to reproduce:

 1. Start a workorder timesheet, then stop it
 2. Repeat the process multiple times.

Current behavior:

The error is based on a microsecond precision so you could need
to try multiple times before reaching the problem.

 - The time displayed on the timer widget does not display the same as
the sum in the timesheet list.
 - The difference between the start date and end date of a timesheet
is not always equal to its duration.

Expected behavior:

 - The sum of duration should be the same as the one displayed on the
timer widget.
 - The difference between the start and end date of a timesheet
should be equal to it's duration.

The computation of the duration of a timesheet will take microseconds
into account. It's not useful in the timsheets to save microseconds
as the precision is too high and as the user cannot change it manually
anyway.

Removing this precision (i.e. setting microseconds to 0) solve this
problem as it does not trigger rounding errors in a single timesheet
and thus in the total computation of duration of a workorder.

Also, there was a precision rounding error on the timer widget.
Time is saved as minutes in db, and displayed as seconds.
So 2s is 1/30 of min => 0,0333... min.
As multiplying this by 60 will return 1,99999 and as the timer was flooring the result,
there was some difference between the time recorded and the value displayed in the
widget.

enterprise : https://github.com/odoo/enterprise/pull/41727
opw-3241156

closes odoo/odoo#130618

X-original-commit: 0172395fa60c94150609bbbfe174d5eee44525fe
Related: odoo/enterprise#45109
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-08-03 10:43:49 +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) 60fe2e9b17 [REF] *: remove _lt()
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().

task-3292454

closes odoo/odoo#130179

Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-01 13:51:17 +02:00
FrancoisGe 9d2656720c [REF] *: remove model.notify()
Since the relational model was rewritten (PR 114024), it is now reactive,
so it is no longer necessary to use model.notify() to render the view.

closes odoo/odoo#130058

Related: odoo/enterprise#44781
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 23:21:18 +02:00
Bastien PIERRE 65242e31e9 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:34 +02:00
218ad8456a [REF] *: adapt codebase to new RelationalModel
This commit adapts the code in addons w.r.t. the introduction of
the RelationalModel.

Main changes that were requested are:
 - record datapoints no longer always have an "id" key in their
 data (they still do if the id field is in the view), so we use
 record.resId instead
 - the new model is based on fined-grained reactivity, so several
 components that previously relied on onWillUpdateProps to update
 their internal state no longer worked. Typically, using the hook
 "observeRecord" is the way to go now.
 - specialdata are no longer handled in the model, so the components
 needing specialData can use the hook "useSpecialData"
 - more generally, all overrides of models (RelationalModel or
 KanbanModel) needed to be reworked.

Part of task~3179751

Part-of: odoo/odoo#114024
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Pierre Rousseau <pro@odoo.com>
2023-07-24 20:17:50 +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
Arjun Panchal 9f1888c0c8 [FIX] mrp: BoM Overview Formatting
Align the product with the caret icon on small screen

task-3357011

closes odoo/odoo#124236

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-20 15:58:06 +02:00
Michele 97d07c8e01 [FIX] mrp: fix format of bom quantity in mrp_report_bom report
If you are using a locale that uses "," as decimal_point and "." as
thousand_seps the parseFloat around formatFloat is not parsing correctly
the float because the parseFloat is not locale-based but uses always the
"." as decimal point. example: in Italy the thousand separator is ".".
parseFloat("3.000,00000") returns "3" as result but the correct result
is "3000" . It is not necessary to use formatFloat but it is needed

closes odoo/odoo#123711

X-original-commit: 48dd3d189a50b4b2a25ce0c3cf6dca0f744fd928
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-05 17:51:29 +02:00
Touati Djamel (otd) 432f7d4e9d [FIX] mrp: allow overviewing of bom with decimal quantity
Steps to reproduce the bug:
- Create a storable product with BoM:
    - add any product as component
    - save
    - Click on the BoM overview widget
    - Change the quantity of a BOM with a number that has a decimal
        value.

Problem:
The quantity is converted to an integer because this input does not
accept a decimal value.

opw-3288403

closes odoo/odoo#123024

X-original-commit: de5087df501bffdaa14ca6a8b7a19da802f4e016
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-01 09:14:00 +02:00
Adrien Dieudonne 42a458f144 [FIX] web, *: x2many list horizontal overflow
Follow-up of https://github.com/odoo/odoo/pull/121468

Since https://github.com/odoo/odoo/commit/9f4622492c5cd84847368d32bf02b0b538a6dd69 (16.2), ´additionalClasses´ has to be added on the field
instead of the component.

closes odoo/odoo#122963

X-original-commit: 82228e65b59427d536f10970cd85610136347ff8
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-05-31 09:23:16 +02:00
Martin Maes 0db02bc52a [FIX] mrp: BoM overview kit fix
When overviewing a BoM with a "kit" type and with no route,
the availability was always unavailable, wich is wrong if all the parts
are in stock or can be replenished.

Task-3184663

closes odoo/odoo#121783

X-original-commit: f13b4d1ae8c12a1668222e6994dea26a27c6f5d4
Related: odoo/enterprise#41248
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-23 16:31:52 +02:00
Martin Maes bf5ed6d9e8 [IMP] mrp: BoM overview search
Added the possibility to search among variants in the BoM Overview view

Task-3184663

X-original-commit: 1c636b5119a40fc9e92174027495b63fa1cafa31
Part-of: odoo/odoo#121783
2023-05-23 16:31:52 +02:00
Martin Maes d2058c39c2 [FIX] mrp: BoM overview context
To reproduce this bug, you need to create a RFQ, add a product with
variants and click on the button to view the quantity forecast.
Then, click on Manufacturing forecast. The BoM overview does not
have the correct variant selected in the Select.

To fix this, simply added an active_product_id to the context, used it
to get the correct BoM data ans then display it in the select.

Task-3184663

X-original-commit: a4ab49d5e41debfe6b2d46840dfffe1008f0f1ec
Part-of: odoo/odoo#121783
2023-05-23 16:31:51 +02:00
Antoine Guenet 995bf2d883 [REF] web, mail: rename attachment_viewer to file_viewer
Since the attachement viewer was moved to core, this renames it to file
viewer to decouple it from the Attachment model/concept from the mail
module.

Part-of: odoo/odoo#119625
2023-05-23 16:31:21 +02:00
Antoine Guenet 8aec394f71 [MOV] mail, mrp, mail, web: move attachment_viewer from mail to web
The `mail` module's `attachment_viewer` is useful for more than `mail`
alone. In order to be able to use it in the `web_editor` module (which
doesn't depend on `mail`), we move it to the `web` module.

task-3109331

Part-of: odoo/odoo#119625
2023-05-23 16:31:21 +02:00
Adrien Dieudonné fdf4cbf600 [FIX] web, *: x2many list horizontal overflow
This issue only occurs on Firefox because ´has´ is not supported
and the following rule is not applied:
https://github.com/odoo/odoo/commit/2cd0106e63785dd34553c2b4747d72b93b9a7afd

Anyway, there is an existing css rule that is applied if the field
class is correclty added.

Steps to reproduce:
- Open Sale
- Add some content in the sale order line

opw-3201461
opw-3285854
opw-3266130
opw-3244581

closes odoo/odoo#121979

X-original-commit: add1df806157c074fd1a3224d1d8bdf1922481fb
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-05-23 08:42:12 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Eteil Djoumatchoua(etdj) cf12912497 [FIX] mrp: Get the google slide for manufacturing operations with specific page step
Steps to reproduce:
    1- Create a BOM for a product, define an Operation on the product
    2- Link a Google Slides document to the Operation as the Operation Worksheet.
    3- Define an instruction on the Operation
    4- Set Step Document to Specific Page of Operation Worksheet and define a page.

    Issue: The step will not load the document.

    Cause: tablet.js passes the wrong value to let know the viewer is a google slide url. Also when the good
    value is passed the viewer always show the first page. That's because the SlideViewer has the page set in the
    setup() method so it never change despite we change the step in the same document.

    opw-3165142

closes odoo/odoo#121477

X-original-commit: 2160115647932ef86db3afc59b7f193075c94fd0
Related: odoo/enterprise#41098
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Djoumatchoua Eteil Junior (etdj) <etdj@odoo.com>
2023-05-16 14:42:20 +02:00
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