Skip to content

Commit

Permalink
stock_average_daily_sale: Take production location into account
Browse files Browse the repository at this point in the history
Take also production location as dest location for daily usage calculation
  • Loading branch information
twalter-c2c committed Sep 12, 2024
1 parent 693370b commit 296bc61
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _create_materialized_view(self):
JOIN cfg on cfg.abc_classification_level = coalesce(pt.abc_storage, 'c')
WHERE
sl_src.usage in ('view', 'internal')
AND sl_dest.usage = 'customer'
AND sl_dest.usage in ('customer', 'production')
AND sm.date BETWEEN cfg.date_from AND cfg.date_to
AND sm.state = 'done'
WINDOW pid AS (PARTITION BY sm.product_id, sm.warehouse_id)
Expand Down

0 comments on commit 296bc61

Please sign in to comment.