mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_realign_move_and_quants: inventory on stockable products
Some products may have existing stock moves while not being of type product (those product where of type 'product' before).
This commit is contained in:
committed by
Robin Keunen
parent
2c6d917a8d
commit
4ce7fbc7d4
@@ -17,8 +17,11 @@ WITH product AS
|
||||
(
|
||||
SELECT DISTINCT product_id
|
||||
FROM stock_move
|
||||
WHERE state = 'done'
|
||||
AND create_date > %(start_date)s
|
||||
JOIN product_product pp ON pp.id = stock_move.product_id
|
||||
JOIN product_template pt ON pt.id = pp.product_tmpl_id
|
||||
WHERE stock_move.state = 'done'
|
||||
AND stock_move.create_date > %(start_date)s
|
||||
AND pt.type = 'product'
|
||||
),
|
||||
location AS (SELECT id AS location_id, usage FROM stock_location),
|
||||
error_move_lines AS (
|
||||
|
||||
Reference in New Issue
Block a user