Skip to content
Snippets Groups Projects
Commit 795c3cd1 authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] stock: make the location current stock view non-editable

Steps to reproduce the bug:
- Enable “Storage Locations” option in the inventory settings
- Go to Inventory > Configuration > Warehouse > locations
- Choose any Location > Click on current stock > Select any product
- Try to add two line

Problem:
Traceback is triggered, Because the line should not be added twice(like in “Inventory Adjustments” view)
and as in the `_onchange_location_or_product_id` we access the quantity,
it should be only one quant: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_quant.py#L517



In v14, this list view is not editable, but since the refactor in v15 added the new view `stock.quant.inventory.tree.editable`,
it is being called by this action

Solution:
set the `view_id` to `stock.quant.tree`, which is the view it was previously using

opw-2779795

closes odoo/odoo#86766

X-original-commit: 68657a85
Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
Signed-off-by: default avatarDjamel Touati (otd) <otd@odoo.com>
parent 4c28a6fd
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment