Commit Graph
1049 Commits
Author SHA1 Message Date
Yannick Tivisse 9e99a9df46 [IMP] product: Remove price/pricelist_id field from template/variant
Purpose
=======

The fields are not used, don't work correctly and there is a specific
report to generate the product prices according to the pricelist and
the ordered quantities
2021-12-23 15:30:23 +01:00
Nicolas Pierre bec3c58df3 [IMP] stock: Inventory Adjustments improvements
Improvements of the Inventory Adjustements page, among which:
 - Add a new 'Apply All' button (without the need to select a record)
 - Show the date at which the last count was done
 - Add warning icon next to duplicated SN
 - Allows to change the lot_id when empty and no quantities are set

closes odoo/odoo#78361

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-17 10:10:45 +00:00
Florian Damhaut e0c1071d59 [FIX] uom: Correct uom creation link
Since 6f182eeeab UoM should be created through the UoM category tab as the UoM form view is now unusable.
To ensure that this is the case, we remove menu link to the form view and update the other to lead to UoM category instead.

opw-2702953

closes odoo/odoo#81221

X-original-commit: 58a3954d606d48b2a4cf678eb0bf13d6e28b1aef
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-15 08:15:43 +00:00
William Henrotin 56e7bcf0cb [REF] *{stock,mrp}*: rename reserved fields
This commit rename product_uom_qty into reserved_uom_qty and product_qty
into reserved_qty on stock move line to stop mistake them with the stock
move quantities fields.

Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin cd9833e4ad [REF] *stock*: rename location destination fields
The stock convention on location name is always to name the destination
`location_dest_id`. It was not the
case on the stock rule model

Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin c146c7d16f [REF] *stock*: rename model stock.location.route into stock.route
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin 6a23b9bcd6 [REF] *stock*: rename model stock.production.lot into stock.lot
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:05 +00:00
yhu-odoo a9d9a258e4 [IMP] stock(_picking_batch): improve set/clear qty button
Add a "clear qty" button to revert the change by "set qty" button in
(batch) picking.
On the move, Whenever the qty_done != reserved, we consider it a
manual change from the user. "set/clear qty" buttons won't change the
line with manual change.
Show "set qty" button when there are moves with 0 qty_done and non-zero
reserved. Show "clear qty" button when we don't show "set qty" button
and there are moves with qty done == reserved but the number is not 0.

Task-2659233

closes odoo/odoo#78737

Signed-off-by: Steve Van Essche <svs@odoo.com>
2021-12-07 11:50:45 +00:00
yhu-odoo b9b7bde33d [FIX] stock: add company_id to package type view
We didn't show company_id on package type view, there was no way to
change it. Add it in this commit.
Also made company_id on stock_storage_category form not visible when not
in multi-company.

X-original-commit: 61792e9dc13bf9d326e69eb59efe3a22354f1ca5
Part-of: odoo/odoo#80519
2021-11-30 14:31:06 +00:00
Raman Salihi 45e0d3f0e6 [FIX] stock: fix grammar in reordering rule view
closes odoo/odoo#80406

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-11-30 13:41:35 +00:00
Touati Djamel (otd) e2b965cd89 [FIX] stock, mrp: fix the manufacturing product moves filter
Steps to reproduce the bug:
- Create a storable product > add a BOM
- Create a MO> add the product > confirm > Mark as done
- Go to the product form > click on product moves
- The move linked to the MO is displayed
- Add the "Manufacturing" filter
- No move is displayed

Solution:
Display all "stock.move.line" which are linked to a "stock.move" with a "mrp.production"

Bug2:
The "Manufacturing" filter should be defined in the MRP module instead of the stock
otherwise, users who do not have MRP installed will have access to this filter as well

opw-2697254

closes odoo/odoo#80578

X-original-commit: f4ab29a19f0aaac567da27d4c4d5c79119982bc6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-30 12:06:18 +00:00
Adrien Widart a8d350fe11 [FIX] stock: add required fields to SML's kanban view
When using a mobile, scanning a product to manage a delivery won't work

To reproduce the error:
(Need stock_barcode. Use demo data)
1. In Operations Types, edit "Delivery Orders":
    - Enable "Show Detailed Operations"
3. Create a planned delivery order DO:
    - 1 x [FURN_1118] Corner Desk Black
4. Mark a Todo
5. Switch to a mobile view
6. Edit DO and scan 601647855640 (i.e., the barcode of FURN_1118)
7. Save DO

Error: An error is displayed "The operation cannot be completed [...]
Model: Product Moves (Stock Move Line) (stock.move.line), Field: From
(location_id)"

The kanban view does not include both `location_id` and
`location_dest_id` although they are required

OPW-2688915

closes odoo/odoo#80470

X-original-commit: 248f659615a2934df7b5ee83734aa78508987fdb
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-29 08:50:19 +00:00
Vishal Thacker e71a9e4494 [IMP] stock: added groups to packaging field
Before this commit, packaging field was visible on the stock location
form view even if the packaging configuration set to off.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:26 +00:00
Vishal Thacker ccefd39015 [IMP] stock: add orderpoint Trigger Manual filter
Replaces the orderpoint's default search on manual trigger by a search
filter named "Trigger Manual".

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:25 +00:00
Vishal Thacker ec75fe6c0f [IMP] stock: Changed the string of lot_name field
Part-of: odoo/odoo#74695
2021-11-26 15:10:25 +00:00
svs-odoo c948aa6a64 [IMP] point_of_sale,stock: hide reservation method
Before this commit, Reservation Method in `stock.picking.type` form view
was visible for the PoS Orders' Operation type which should not be
visible. So, reservation method will now be invisible in this case.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:23 +00:00
Vishal Thacker 202ee3a6c7 [IMP] stock, delivery: move fields to delivery
Before this commit, `print_label` and `propogate_carrier` fields were
visible despite the delivery methods setting is off.
This commit moved these two fields into delivery module so now these
fields will be visible once the user installed the delivery module.

task-2581265

Part-of: odoo/odoo#74695
2021-11-26 15:10:23 +00:00
Touati Djamel (otd) 4f386b0dec [FIX] stock: add correctly a product in storage categories
Steps to reproduce the bug:
- Connect as Admin and select “My Company (San Francisco)”
- Create a storable product “P1” and select “My Company (San Francisco)” in the `”company”` field
- Go to inventory settings and enable the “Storage Categories” option
- Create a new “Storage Categorie” > select “My Company (San Francisco)” in the `”company”` field > save

BUG1:  Edit and try to add the product “P1” > Edit and try to add the product “P1”
> "P1" is not filtered correctly with domain, because the `”company”` field of the `"stock.storage.category.capacity"` model is not set.
As it's a related field, the “default_company_id” should be in the context so that the “company_id” field will be correctly set with this value

BUG2: Add a new line > create and edit a new product > the product type is “consumable” instead of storable, so we should add the type in the context

BUG3: Add multi-company security rule

opw-2689426

closes odoo/odoo#80061

X-original-commit: f5554fa94d41d7eae62c4a1271e41012178c4d8f
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2021-11-19 08:08:51 +00:00
Tiffany Chang (tic) 2c77fdf0cf [IMP] stock: move auto-show reception report to picking type
Previously this setting was an application setting which meant the
report could auto-open at undesired times (e.g. internal picking when
multi-step). Instead we make it more flexible for the user's desires by
moving it to the picking type setting.

Part of Task: 2632884
Upgrade PR: odoo/upgrade#2815

Part-of: odoo/odoo#76147
2021-11-09 13:19:51 +00:00
Tiffany Chang (tic) a44dda1a90 [IMP] stock: conditionally show "Allocation" (reception report) button
Simplify user workflow by not showing the "Allocation" button in the
(batch) picking form view if there is nothing to allocate (i.e. when
reception report is enabled).

Also:
- fix the location search condition for the outgoing moves that can
  be allocated to (i.e. the same logic used in show_allocation field
  compute logic is also used in reception report generation/auto-opening)
- replace ['stock.location'].search() with ._search() for better
  performance.

Part of Task: 2632884
ENT PR (for barcode equivalent): odoo/enterprise#20805

X-original-commit: 11ffb85fe7398854e4aefa4f9d0cfbc3b88aad8a
Part-of: odoo/odoo#79408
2021-11-05 13:48:51 +00:00
Adrien Widart aef496fce3 [IMP] stock: display the SM's date on picking form
Adding the date of a SM on the picking form allows a user to reschedule
the delivery of a specific product instead of rescheduling the delivery
of all products.

Linked to OPW-2651828

closes odoo/odoo#79413

X-original-commit: 845f5bdde594f37d42ad12adcbe9489b1b64bd83
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-05 13:00:50 +00:00
Adrien Widart 218db1cd5f [FIX] stock: display 'Order Once' if qty > 0
If the multiple quantity of a RR is less than 1.0, the buttons 'Order
Once' and 'Automate Orders' may remain invisible

(Need sale_management,purchase_stock)
1. Create a product P
    - Type: Storable
    - Add a vendor
    - Routes: Buy
    - Reordering rule:
        - Trigger: Manual
        - Min Quantity: 0
        - Max Quantity: 0
        - Multiple Quantity: 0.01
2. Create and confirm a sale order with 0.50 x P
3. Inventory > Operations > Replenishment

Error: P is present, its qty to order is 0.50, however the button 'Order
Once' is not displayed

OPW-2612472

closes odoo/odoo#79379

X-original-commit: 81b2677677645329999cc496dc961db22bd522dd
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-11-05 10:16:52 +00:00
roen-odoo 1281b5be2a [FIX] stock : Missleading help message
WO are released in confirmed state, but the help message says that they are released in draft.

opw-2609040

closes odoo/odoo#78954

X-original-commit: 3244944d0b6ccf7d18d8bb852183d14282674097
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-02 09:12:45 +00:00
Rémy Voet (ryv) 88bacad9a0 [FIX] stock,mrp: fix confusing labels
"Material Availability" vs "Component Availability" label means
the same thing but it shouldn't.
- Rename these and add a help string for both fields.
- Change decoration to be green if the MO Readiness is
'ready'.
- The logic of `_compute_*_availability` doesn't take in account the
'ready' `(reservation_)state` to distinct clearly both fields
(`(reservation)_state` vs `*_availability`)

task-2668922

closes odoo/odoo#79033

X-original-commit: acc385137a6a59f3632d91a7fcabd5ab42e8bc7f
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-10-26 19:40:56 +00:00
Tiffany Chang (tic) b954cae9a9 [IMP] stock: hide SN clear all button when no mls
Hide the "Clear All" button next to "Assign Serial Numbers" button when
there are no move lines to clear.

Follow up to task: 2426281

closes odoo/odoo#75676

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-10-25 14:48:56 +00:00
Swapnesh Shah bd4576273a [FIX] stock: remove upgrade_boolean from wave group
Process operations in wave transfers exists in community edition.

closes odoo/odoo#78461

X-original-commit: f078b9f69341405d14a268d5371c9360aa66475d
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-15 14:59:04 +00:00
Florian Damhaut 6d42d865be [FIX] stock: Product Search in stock picking
This commit makes the picking search by product more consistent with
the general product search as the following case could happen:

  - Have a product with two variants;
  - Each variant has the following internal reference:
    - Variant 1: 'SoMething'
    - Variant 2: 'SomethingElse'
  - Create two pickings, each one containing one of the variant;
  - Then filter pickings by product and the result will vary:
    - Searching for 'SoMething' -> Found one picking
    - Searching for 'Something' -> Found two pickings

The expected behavior is to find the two pickings in both cases.

opw-2646214

closes odoo/odoo#78451

X-original-commit: d0090ee01fc3d105ad87d6764733fe332b36db56
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-10-15 14:58:49 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
wan 9b0baa3aa4 [FIX] *: product back2basics post-freeze fixes
This should have been a fixup of 37eb0dfbb54db1c062276cd8c172bf8dac9e557b but we needed
to freeze 🤷‍♂️

closes odoo/odoo#77344

closes odoo/odoo#77876

Related: odoo/enterprise#21425
Related: odoo/enterprise#21467
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-11 10:15:49 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +00:00
Rémy Voet (ryv) d547bce39d [REV] stock: group_by WH when multiple WH
This reverts commit 70ce14e798
because :
- It is ugly by default with dropship activated.
- This behavior can be done easily with a favorite search (for
poeple which wanted this feature).
- Technical debt

closes odoo/odoo#77092

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-09-24 14:00:23 +00:00
Rémy Voet (ryv) ac14fd4819 [IMP] stock,mrp: add lazy column in tree view
It allows to read some fields (slow computation) after the render
of the list without blocking the UI.

task-2579011

Part-of: odoo/odoo#77092
2021-09-24 14:00:23 +00:00
Rémy Voet (ryv) da06104c61 [IMP] stock,mrp: improve _compute_(products/component)_availability
Improve 'Component Availability' and 'Product Availability':
Add these fields in form and tree view (the performance issues
is addressed in next commits and these fields will be load lazily)

task-2579011

Part-of: odoo/odoo#77092
2021-09-24 14:00:22 +00:00
Rémy Voet (ryv) 99515038fa [IMP] stock,mrp: unify the json_popover
The `_compute_json_popover` of (`mrp.production`)
was slowing down the tree view of MO (because it loaded
every move due to `production.move_raw_ids` even if there
isn't `delay_alert_date`.
Make it more lazier: we gain a speed up
when the there aren't any delay_alert_date
(always when the setup is simple)

To read 150 MO (7500 moves behind):
Before: 0.099 ± 0.002 SQL sec, 0.224 ± 0.005 Python sec (37 SQL requests)
After: 0.060 ± 0.0008 SQL sec, 0.096 ± 0.002 Python sec (29 SQL requests)

Also, unify the code with `stock.picking`.

task-2579011

Part-of: odoo/odoo#77092
2021-09-24 14:00:21 +00:00
Rémy Voet (ryv) 6417b6ed6c [IMP] stock: improve picking draft form
The reserved and the done column doesn't have any sense for
draft picking and the forectasted button was always green.
-> Fix it

Also we add forectasted information for draft move in mrp
(281e1a57b3).
-> Use it also for outgoing picking

task-2579011

Part-of: odoo/odoo#77092
2021-09-24 14:00:21 +00:00
Tiffany Chang (tic) 6cc2c8d901 [FIX] stock: ensure safe UoM change for done smls
We fix 2 related UoM issues:

1. Fix quant inconsistency from changing the UoM of Done
   stock.move.lines

Steps to reproduce:
- Enable "Storage Locations" setting
- Create a new "Storable Product" and create a receipt for 1 unit of it
- Validate the 1 unit receieved
- Open "Detailed Operations" of the move and change the stock.move.line
  UoM to dozen.

Expected result: 13 on hand
Actual result: 1 on hand

To fix this:
- prevent users from editing the UoM after the picking is
  done (i.e. unless adding a new stock.move.line and not saving).
- update the write on done logic so stock.move.line UoM changes are
  considering and will update the quant correctly (in case of RPC or
  direct write).

2. Prevent changing UoM of Done stock.move to prevent inconsistent field
values within stock.move and confusion for users

Steps to reproduce:
- Complete a picking (incoming is easiest to see) with a new product
  (i.e. 0 qty) having 1 unit done.
- Unlock picking and add a new stock.move with 1 unit done and save.
- Edit the just added stock.move's UoM from Units to Dozen.
- Check the quantity on hand / Done qty of stock.move after leaving and
  returning to form.

Expected result: 13 On Hand
Actual Result: 2 On Hand and the "Done" qty in the picking is 0.0083
  (i.e. 1/12 of a dozen)

To fix this:
- prevent users from editing the UoM after the picking is done (unless
  adding a new stock.move and not saving)
- if a Done stock.move UoM is uodated, a UserError occurs because there
  is no straightforward way to ensure the quant is updated correctly
  since is handled within the move.line (i.e. has no visibility to its
  move's uom change => changing only UoM and not qty done will result in
  no quant update)

closes odoo/odoo#76916

X-original-commit: 72a1e7d75f0b13f23def912c8bcc758c58438b04
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-09-22 08:15:51 +00:00
Nathan Marotte (nama) 9bdb206096 [FIX] mrp_workorder quality: product and template desynchronized
Issue : When selecting mrp_operation as picking_type, the product
variant is not changed

Steps to reproduce:

Install Quality, MRP
Disable variants
Edit View: Form (debug mode) and remove
groups="product.group_product_variant" to show the variants
(This is done so we can see the issue in the backend)
Set a product
Changing product changes the variant
Set the operation to manufacturing
Set another product
-> The variant is not updated
Why is that a bug:
It can lead to some problems if the variants are disabled and then
enabled at a later time for the company

Side-Note:
The original bug related to the related commit was not present in
v13 as said in the related commit opw discussion

Related commit 2dc2003
opw-2515100 (related to opw-2490412)

closes odoo/odoo#76707

X-original-commit: 441fb1e9ee97e2dcc1c2bd1a9fdb393d006aa1a5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
2021-09-20 08:13:02 +00:00
Xavier Morel 499b1621ba [FIX] *: non-accessible buttons
closes odoo/odoo#76581

Related: odoo/enterprise#20897
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-09-15 15:22:58 +00:00
William Henrotin 485273b914 [FIX] stock: open move lines with context
Calling the xml action directly in the view make it miss the filling
context done in _get_action().

closes odoo/odoo#76294

X-original-commit: b818927898e42e8837230b7d1f089d4d822d7d76
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-10 08:49:22 +00:00
Mathieu Duckerts-Antoine 7545913020 [REF] *: graph archs cleaning
We clean various graph archs taking into consideration that:
 - the default type of a graph is "bar".
 - a bar chart is by default stacked.
 - the field attributes type="row" and type="col" does not make sense for
   a graph view (since its implementation was separated from the pivot
   implementation a long time ago))
 - the boolean attributes should now take 1 or 0 as value (but the other
   values are accepted for retrocompatibility).

Part-of: odoo/odoo#76065
2021-09-07 15:50:14 +00:00
wan fa034b2a64 [IMP] *: product back2basics 15.0
Rework the whole view, generally.

task-2605931

Part-of: odoo/odoo#75862
2021-09-07 15:50:00 +00:00
yhu-odoo caa908506b [IMP] mrp,stock: count kits product
When a product's has a kits bom, we consider it a kits product.
When a product is a kits product, we count its "on hand" and "forecast"
qty by caculating how many can be produced according to the bom.
We add status button to the show the qty on kit product form.

Task-2444000
COM PR odoo/odoo#75555
ENT PR odoo/enterprise#20440
UPG PR odoo/upgrade#2783

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-03 08:11:42 +00:00
William Henrotin 8d3805eccb [IMP] stock_picking_batch: add quick access to batch
This commit adds a quick access to all the batches and waves of a picking
type (only transfers picking type) ready to be processed from the
Inventory dashboard.

Task : 2411102

Part-of: odoo/odoo#63291
2021-09-02 14:14:10 +00:00
William Henrotin dd53f5323f [IMP] stock: wave pickings
This commit introduce Wave Pickings. This new object is a group of stock
move lines related to different pickings. The goal is to group stock
movements having similar characteristics like same source location, same
product category, ...

Wave pickings are created from stock move lines. Those are removed from
their picking to a copy of it. All the new picking are grouped together
in a new batch picking. This batch is the wave.
To differentiate the batch pickings and the wave pickings. This commit
introduces a new menu and a new sequence.

Task : 2411102

Part-of: odoo/odoo#63291
2021-09-02 14:14:09 +00:00
William Henrotin bf9944c100 [IMP] stock,delivery: quick access to operations
This commit add a quick access to all the move lines of a picking
type (only transfers picking type) ready to be processed from the
Inventory dashboard

Task : 2411102

Part-of: odoo/odoo#63291
2021-09-02 14:14:09 +00:00
William Henrotin f5a08bb1dc [FIX] stock: remove unused view
The quants are only displayed on list view

Task : 2555118

closes odoo/odoo#74715

Related: odoo/upgrade#2711
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-02 12:57:33 +00:00
William Henrotin 179bd67970 [IMP] stock,mrp_subcontracting: rearange quants filters
Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:33 +00:00
William Henrotin 749225db2a [FIX] stock: quants view adjustments
Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:33 +00:00
William Henrotin 8f12dbc00f [IMP] stock: merge two wizards into one
This commit merge the wizards asking for a inventory name and the one
warning the user not all quant have been set.

Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:32 +00:00
William Henrotin 79ee1ae3d2 [FIX] stock: use the same editable view for inventories and products
This commit makes sure the same view is used between the "inventory
adjustments" menu and the " update quantity" button in the product form.
The two views should always keep the same fields and buttons.

Task : 2555118

Part-of: odoo/odoo#74715
2021-09-02 12:57:32 +00:00