Skip to content

Cannot reduce quantity on incoming shipment after partial delivery — blocked by stock_no_negative #1951

@uvid-vlado

Description

@uvid-vlado

Module

stock_no_negative (from stock-logistics-workflow)

Describe the bug

When attempting to reduce the quantity of a validated incoming shipment after a partial delivery has already been made, the system raises a stock availability error, even though the resulting stock level would remain positive. This prevents legitimate corrections to incoming quantities.

To Reproduce

v16:

  1. Create a new incoming shipment (picking type: Receipts).
  2. Add a product with Done Qty = 10.
  3. Validate the picking (this is the first stock entry for the product).
  4. Create and validate an outgoing delivery for 2 units of the same product.
  5. Go back to the incoming shipment, unlock it.
  6. Change the Done Qty from 10 to 8.
  7. Try to validate the picking.

Expected behavior
The system should allow reducing the quantity on an incoming shipment as long as the resulting stock on hand remains >= 0. In this case, reducing from 10 to 8 while only 2 have been delivered should leave 6 units in stock, which is valid. The error is too strict and blocks valid corrections.

Additional context
Odoo 16.0 Enterprise
OCA module stock_no_negative
Product has tracking disabled
Product has no previous stock (first receipt)

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