Skip to content

[15.0] stock_inventory: inventory is blocked when there are stock moves between the count and the validation #2343

@AaronHForgeFlow

Description

@AaronHForgeFlow

When installed stock_inventory & stock_inventory_discrepancy and stock_inventory_lockdown is not installed. Do the following scenario:

  1. Create an inventory adjustment for 2 products in Stock location
  2. Begin the adjustment and put some quantities over-passing the threshold
  3. Do a delivery of one of the products
  4. Try to apply all the counts, validating the discrepancy.
  5. You are blocked because of this: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_quant.py#L346
  6. The user does not see any error message not any window.
  7. None of the counts are applied, even when the issue is in one single product.

This is reproducible in runboat, for example: http://oca-stock-logistics-warehouse-15-0-6c43ef54f885.runboat.odoo-community.org/web

There are a few ways we could handle this:

  1. Automatically accept the Counted Quantity, even if the On Hand Quantity has changed in the meantime.
  2. Show a confirmation window during validation, displaying the new On Hand Quantity, and allowing the user to confirm or update the Counted Quantity.
  3. Use stock_inventory_lockdown, but that is not always desired.

If you have faced this issue and have some recommendations I am open to different ideas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions