Skip to content

Commit

Permalink
stock_average_daily_sale: run materialized view query for active conf…
Browse files Browse the repository at this point in the history
…igs only
  • Loading branch information
twalter-c2c committed Dec 11, 2024
1 parent 1c7def4 commit 99e272d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stock_average_daily_sale/models/stock_average_daily_sale.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ def _create_materialized_view(self):
) AS nbr_days
FROM
stock_average_daily_sale_config
WHERE
active = True
),
-- Create a consolidated view of all the stock moves from internal locations
-- to customer location. The consolidation is done by including all the moves
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class StockAverageDailySaleConfig(models.Model):
_description = "Average daily sales computation parameters"
check_company_auto = True

active = fields.Boolean(default=True)
abc_classification_level = fields.Selection(
selection=ABC_SELECTION, required=True, default="b"
)
Expand Down

0 comments on commit 99e272d

Please sign in to comment.