mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[FIX] stock_available_unreserved: pre_init_hook
Before this commit, unreserved_quantity and contains_unreserved were not updated at install when there was quantity and not reserved_quantity.
This commit is contained in:
@@ -37,7 +37,6 @@ def add_field_unreserved_quantity(cr):
|
||||
"""
|
||||
UPDATE stock_quant
|
||||
SET unreserved_quantity = quantity - reserved_quantity
|
||||
WHERE reserved_quantity > 0.01
|
||||
"""
|
||||
)
|
||||
|
||||
@@ -59,6 +58,6 @@ def add_field_contains_unreserved(cr):
|
||||
cr.execute(
|
||||
"""
|
||||
UPDATE stock_quant
|
||||
SET contains_unreserved = (reserved_quantity > 0.01);
|
||||
SET contains_unreserved = (unreserved_quantity > 0.0);
|
||||
"""
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user