Skip to content

Commit

Permalink
[FIX] stock_pikcing_volume: pre_init_hook, ambiguous columns
Browse files Browse the repository at this point in the history
  • Loading branch information
sebalix committed Aug 28, 2024
1 parent 7815b1c commit 5fa689a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stock_picking_volume/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ def pre_init_hook(cr):
update stock_move
set volume =
CASE
WHEN state in ('partially_available', 'assigned') THEN
product_qty * pp.volume
WHEN stock_move.state in ('partially_available', 'assigned') THEN
reserved_qty_by_move.product_qty * pp.volume
ELSE
product_uom_qty * pp.volume
stock_move.product_uom_qty * pp.volume
END
from reserved_qty_by_move
join product_product pp on pp.id = reserved_qty_by_move.product_id
where
stock_move.id = reserved_qty_by_move.move_id
and state not in ('done', 'cancel')
and stock_move.state not in ('done', 'cancel')
"""
)
_logger.info(f"{cr.rowcount} rows updated in stock_move")
Expand Down

0 comments on commit 5fa689a

Please sign in to comment.