diff options
| author | nie <nie@odoo.com> | 2021-04-28 08:20:00 +0000 |
|---|---|---|
| committer | nie <nie@odoo.com> | 2021-04-28 08:25:38 +0000 |
| commit | 978853a6355e36e81752bf0714102f519a6a7931 (patch) | |
| tree | b22ffa64682bc36d879f83300ae7bf2b60ef93a4 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 8a8ff03f6111f377bcd9c2b0f584c450b82a4182 (diff) | |
[FIX] stock_account: check destination and source locations in forecast
Steps:
- Go to Inventory / Products / Products
- Create a product (2)
- Storable Product
- Cost: 10
- Click Update Quantity
- Create a new quantity line with 3 in On Hand Quantity
- Update the line with 1 in On Hand Quantity
- Go back to the product
- Click the "Forecasted" smart button
Bug:
The on hand value is 30 instead of 10.
Explanation:
When `location_dest_id` is the current location, it is used to specify
that a given quantity has been added to this location's stock. However,
when removing a quantity, the move goes from the current location to a
virtual one. The current location is, in this case, stored in
`location_id` and the destination is the virtual location.
This makes stock removals not appear in the on hand value since we only
filter the layers on their move's `location_dest_id`.
This commit assumes that a move always goes from or to a virtual
location and checks if the current location is in `location_dest_id` or
in `location_id`.
opw:2510911
closes odoo/odoo#69969
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
