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
*: account, gamification, mail, mrp, note, project, website_blog,
website_event_track.
Uniform design defining a common element shared across different
modules.
task-2818586
Part-of: odoo/odoo#116641
This pr fixes a bug where a validation error occurs in the timesheet
wizard.
Indeed, when the user enter manually a start or end date in a workorder,
the whole MO becomes "plan".
The problem here was that if the user opens the wizard of another
workorder (on the same MO) that has no start/ end date set, and then if
he saves (no matter if he changed something), it will trigger a
validation error because the start and end date of the workorder is
required in that view if the MO is planned.
closesodoo/odoo#120386
X-original-commit: c9728858aa46e6cb1a3d39cbc8da8e175007e456
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Steps to reproduce :
- Install stock, mrp
- Go to Inventory -> Operations -> Manufacturings
- No MO could be found
The view showed `stock.picking` having a 'manufacturing'
picking_type_code. Now instead shows a list of `mrp.production` as it is
done when clicking on the 'Manufacturing' type in the stock Overview.
Part of task-3218314
Part-of: odoo/odoo#119381
Steps to reproduce:
Go to Manufacturing App
Click on some MO
When pressing the 'ALT' shortcut key the Scrap and Cancel tabs offer the letter 'Z'.
According to this spreadsheet
the scrap action (line 79) should be assigned to shortkey 'Y'
OPW-3202893
closesodoo/odoo#118075
X-original-commit: 577a467ca757b1d0c02e13e0710f2c0216c1e6a0
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: malv-odoo <malv@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
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]
4. click on the 3 dots at the top right corner of each WC card
Issue: ugly layout
Fix: restore the style
affected branch: saas-16.1 up to master
closesodoo/odoo#117695
X-original-commit: 40a5d29d9b5b4070269175a83866837c7725b8c9
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#116167
Related: odoo/enterprise#38542
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
This commit add a mass start and stop buttons that allows to start
or stop multiple workorder at the same time.
Starting a workorder checks if the user needs to be logged and
if the workorder is not blocked.
This commit also change the appearance of the mark as done button
task id : 3216277
Part-of: odoo/odoo#114901
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.
The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Since starting a workorder and marking it as done replaces the
planned dates with the actual ones,
there is no need to keep dates which will always end up being the same.
task: 3108291
see odoo/enterprise#36102
see odoo/upgrade#4247closesodoo/odoo#110550
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
The type fields of actions already defaults to
the model name in the base model definition.
Therefore, specifying `ir.actions.server`, `ir.actions.act_window`
& so on as type is useless (and adds noise since it's the same as
the action model).
closesodoo/odoo#114539
Related: odoo/enterprise#37855
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Steps to reproduce
==================
- Make sure the "Work Orders" setting is enabled
- Manufacturing > Products > Bills of Materials > New
- Select a random product
- In the Operations tab, add a line
- Type something in the Operation field
- Set the workcenter to Assembly line 1
- Save and close
- Click on the "Show Instructions" action button
```
Traceback (most recent call last):
File "/home/hubert/src/16.0/odoo/odoo/models.py", line 5108, in ensure_one
_id, = self._ids
^^^^
ValueError: not enough values to unpack (expected 1, got 0)
```
Cause of the issue
==================
The action is called without in id because the record is not yet created
Solution
========
The button should display a warning in x2manys when the record is virtual.
This was actually the case before Odoo 16 but there was an option on the
button `options='{"warn": true}'`. With this commit, it will be the
default behavior.
We also remove this option from the xml since it isn't used.
sentry-3950549982
closesodoo/odoo#114505
X-original-commit: 9fc0424a4450923aa8582bdb6766e1b19cb68546
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
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
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
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
In 49bc9aac201136e684cac9d84df97f80d217afa4, when we need operation_id
when we check if manual_consumption is readonly or not, so
groups="mrp.group_mrp_routings" was added for manual_consumption.
As a result, we can't see manual_consumption on BOM when workorder is
not enabled.
To fix, we add a computed field as a workaround.
Task-3116125
Part-of: odoo/odoo#113538
**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.
closesodoo/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>
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>
In the inventory menu, the "Operations" menu has now three sub items:
- Transfers
- Adjustments
- Procurement
All the existing `menuitem` go now under one of these sections.
Also, for the old transfers menu itme, this commit replaces it by three
other menu items: "Receipts", "Deliveries" and "Internal Transfers".
Each of them will display only the transfers with the matching picking's
type (depending of the picking type's code).
When a picking is created from there, its picking type will be set by
default according to it and the field will be filtered by its code.
When `mrp` is installed, adds a menu item for the manufacturing
operations in "Transfers" submenu too.
task-3076044
Part-of: odoo/odoo#109511
Since the conversion of the list view to owl, the relative field size
has not been reimplemented. We have decided not to support it anymore.
So we will remove all its uses.
The relative width consists in adding a width attribute with a
value. This value corresponds to the weight of the field, the higher
it is, the more space the field will take. This size is only used when
the list is empty.
Example of this:
<tree>
<field ... width="2">
<field ... width="1">
</tree>
The first field will take 2x more space than the first one when the list
is empty.
closesodoo/odoo#110382
Related: odoo/documentation#3375
Related: odoo/enterprise#36020
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Since 5b68871097, the scrollable menu of
the picking type kanban card (`kanban-menu`) is the mrp one even for
stock picking type. The inherited view replace the template without
testing the picking type code as it was done before.
This commit adds a `t-if` for stock picking types and another for mrp
one to makes sure the two template are mutually exclusives
closesodoo/odoo#110412
X-original-commit: c7f49d1381ab1bf3dd7ed42436d0c881d7bab27d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
When you don't have any mrp access rights and want to open a product
template form view, you get an access error. This is caused by the field
bom_count that tries to count the number of BOM without having the
access rights.
So we only add this field to the view, and the action that depends on it
when you have mrp access rights.
closesodoo/odoo#109636
X-original-commit: a655276d556f1d2bf92c3f3160a8306cc673a115
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
- 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
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).
The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.
closesodoo/odoo#107589
Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Reproduction:
1. Install Sale, Inventory
2. Go to Sale->products, search for “Customizable Desk”
3. Hover the cursor on the stat button “Sold”, from its definition, the
analysis should show the sold items in last 365 days
4. Click on the “Sold” button, no filter for “Order Date”
Reason: in V14, the “time_ranges” feature is removed. Thus using it in
the context won’t create any filter for searching
Fix: We use a custom filter to replace the time range "last_365_days".
We also make sure that the domain produced by that filter is the same as
the one used to compute the button count server side (this was not the
case in Odoo 13 when "last_365_days" was used). Similar fix is also done
in mrp and l10n_ar. Mind the utc convert for correct results.
opw-3000595
Related commits:
Removal of time_ranges: https://github.com/odoo-dev/odoo/commit/be5a51a345b8986da0e19627260f64f984e11ae9
Date filter fix: https://github.com/odoo/enterprise/pull/10938closesodoo/odoo#108951
X-original-commit: 03057029b210a59f3d7012aeea66cfa95790a8c8
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
Prior to this commit, the layout of the settings in the kanban card was
broken
closesodoo/odoo#107895
X-original-commit: 922029c2197145d555b65becd7210c4d7a13d439
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
The aim of this commit is to simplify and standardize the settings archs.
To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.
The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.
```xml
<app string="CRM" name="crm">
...
</app>
```
- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
logo is created using the `name` parameter :
`/{name}/static/description/icon.png`.
The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.
```xml
<block title="Title of group Bar">
...
</block>
```
- `title` *optional* : The title of the block of settings (the old h2),
you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
(the old h3), you can perform research on its text.
The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.
```xml
<setting string="this is bar">
<field name="bar"/>
...More elements
</setting>
```
- `type` *optional* : By default, a setting is visually separated on two
panels (left and right), and is used to edit a given field. By
defining `type='header'`, a special kind of setting is rendered
instead. This setting is used to modify the scope of the other
settings. For example, on the website application, this setting
is used to indicate to which website the other settings apply.
The header setting is visually represented as a yellow banner on
the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
displayed just below the setting label (with classname
`text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
icon is displayed next to the setting label to explicit that
this setting is company-specific.
- `documentation` *optional* : If this attribute is set, an icon is
added next to the setting label, this icon is a link to the
documentation. Note that you can use relative or absolute path.
The relative path is relative to
`https://www.odoo.com/documentation/server_version`, so it's not
necessary to hard-code the server version on the arch anymore.
closesodoo/odoo#106425
Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
mrp
===
- no time has been recorded on operations then give warning with apply button
- do not allow to mass edit UOM in any manufacturing state
- set value of lot/serial from MO and set read only on unbuild from MO
- remove "archive operation" icon
repair
======
Currently it is not possible to select a return on a repair order unless save it first. so after this commit user can able to select it without save it.
only show picking related to selected product
closesodoo/odoo#106571
Task: 2845380
X-original-commit: dd60647ce41547ecd00bbde45ddf564a7ada91c7
Related: odoo/enterprise#34403
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Issue: In the MO view, the src location for components was editable and
the dest location for byproducts was editable when neither of these
should be.
Due to the same field appearing twice in the same x2many field list,
there were 2 issues:
1. something changed (probably during OWL refactoring) that made it so
the 2nd invisible field instance of the field was overriding the
"readonly='1'" property of the 1st instance when it was in the view
(i.e. when multi-locations is active) [in previous versions this did
not happen]
2. because of the change by https://github.com/odoo/odoo/commit/168cbe66bee7824bdf389de5c6c680342e27bc6d
we ensure that these two required fields are always correctly set (to
the MO's values as per the default when multi-loc is active) when the
MO's moves are created.
Part of general bugfix task: 2985735
closesodoo/odoo#106542
X-original-commit: 1bb2c44d32e669a9b936da90cbd80721b2c897ef
Related: odoo/enterprise#34396
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
When manualy create a productivity log on the workorder form, you are
always asked to choose a time_id(productivity). But by default, the
field is hidden. Make this field shown by default for better use
exprience.
closesodoo/odoo#106007
X-original-commit: 84cde486c700420c8898847342f158393c02649c
Related: odoo/enterprise#34098
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
When the mrp_routing_workcenter table is big, the domain
[routing_line_ids, =, []] in the workcenter FormView can
lead to significant slowness. This comes from
the ORM having to retrieve the mrp_routing_workcenter
records in the read.
To avoid such issue, adds a new boolean computed field
to check if a given workcenter has Operations.
opw-2954461
closesodoo/odoo#99313
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
- set monetary widget to align foat field with other monetary fields
- use default production order in the list view to have the same order
everywhere.
Task: 2991906
X-original-commit: 38b82230b75f972a7da5d4c53ea1a4c7359cd913
Part-of: odoo/odoo#103055
Since odoo/odoo#95729
nodes with a `groups=` are completely removed from the views when
the user is not part of the group, instead of being made invisible.
In that PR, views have been adapted to add back fields, with invisible="1",
when they were required, for instance when they were used in a domain
of another field which was still there despite the user is not part
of the given group.
As `tree` views having `multi_edit="1"` where not considered
as editable views, the domain of fields in these views were not
validated:
- https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1460
- https://github.com/odoo/odoo/blob/1fb8fa16ab7dc298d54f089d7163fb556dbc5fcc/odoo/addons/base/models/ir_ui_view.py#L1321-L1322
while they are well required for the web client,
in `multi_edit="1"` this is possible to edit relational/many2one field,
and therefore it will do `name_search` calls using the domain of the
field, and therefore the fields used in these domains must always
be present in the views. Without it, a crash in the web client occurs
when attempting to edit the relational/many2one field.
This revision targets to consider the `multi_edit="1"` tree views
as editable, to make the field domains validated as they should be.
Hence, views are adapted to add back fields with `invisible="1"`
when they are required in domains of other fields.
Part-of: odoo/odoo#103790
Before this commit, in the mrp_production form view, the quantity items
were spread out.
After this commit, they are closer together.
closesodoo/odoo#102582
X-original-commit: 3aa74fd15ed951974485fadd6a362fdaf374b202
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The status badge on workorder kanban card was hidden behind a dropdown
widget because of a wrongly used class.
X-original-commit: 491546a5c3ce6203763a7d829b44107e66ff3f42
Part-of: odoo/odoo#102398
When creating a MO with some WO from a mobile, the quality checks are
not created
To reproduce the issue:
(Need quality_control)
1. Create two storable products P_compo, P_finished
2. Create a BoM:
- Product: P_finished
- Components: 1 x P_compo
- Operations: create a new operation OP
3. Add a step to OP:
- Type: Pass - Fail
4. Switch into mobile mode
5. Create a MO for 1 x P_finished
6. Confirm it
7. Open the WO
Error: the tablet view skipped the pass-fail step, the user can already
mark the MO as done and close it
When confirming the MO, it leads to the quality checks creation. To do
so, we iterate on the `quality_point_ids` of the WO to generate these
quality checks:
https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L406
But, the WO has not any quality point, which is incorrect: it should
have the one related to the step created on the operation P. This field
is a computed one and is based on the quality points defined on the
operation linked to the WO:
https://github.com/odoo/enterprise/blob/7ff0f43df777027bf8544be3ac95e76feb7da957/mrp_workorder/models/mrp_workorder.py#L70-L73
But again, there is an issue: the WO has not any defined operation
(which is incorrect, it should be linked to OP). And this is because of
the WO creation from the kanban view: the field `operation_id` is
missing so it is not defined during the WO creation.
OPW-2984037
closesodoo/odoo#101346
X-original-commit: 751f1253d4a32491d210aceb4767084088c314ad
Signed-off-by: Adrien Widart <awt@odoo.com>
With the change to 'always edit' on form views by default, several
'oe_read_only' fields had to be modified to play nice with the fact
that in most cases, there is no read_only mode
closesodoo/odoo#101188
X-original-commit: 868992abeeda983768323e1126b5643eff8fdb33
Related: odoo/enterprise#31810
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Added an option on Manufacturing Operation Type
This option allow auto-consumption up to the reserved
quantity of tracked components in manufacturing orders.
Task : 2950200
Enterprise PR : odoo/enterprise#30805closesodoo/odoo#98461
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Steps to reproduce:
- install the mrp_plm module (Product Lifecycle Management app);
- create a product with a long name;
- create a bill of material for that product;
- create a manufacturing order and select that bill of material;
- confirm the manufacturing order.
Issue:
The value of the bill of material field overflows into the second column.
Cause:
There is a problem in the use of classes in the .xml file (o_row and d-flex).
Solution:
Change the classes used (Bootstrap and Odoo classes) to have the correct rendering.
opw-2966863
closesodoo/odoo#100305
X-original-commit: 7a7c6870a2006edab8ffe62c016e5eb0681a46f8
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Create analytic accounting entries for employee times logs on workorder.
Compute BoM costs based on employee hourly cost and employee number
required on mrp operations.
closesodoo/odoo#91565
Task: 2427466
Related: odoo/enterprise#23032
Related: odoo/upgrade#3556
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
This patch is part of a complete rework of the workorder tablet view and general
work order processing experience. It's mainly done in the Enterprise
repo. In community: the changes are the follows:
- The workorder kanban view remodeled
- Prepare workorder productivity timer to work with employee
Task: 2427466
Part-of: odoo/odoo#91565
This views has multiple custom features such as file upload, attachment
viewer and download.
A lot of files have been rendered obsolete and have been deleted,
notably `file_upload_mixin` which has been replaced by the
file_upload service and hooks.
closesodoo/odoo#99769
Related: odoo/enterprise#31145
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>