OdooWiki OCA HUB

Stock Average Daily Sale

stock_average_daily_sale folder_open OCA/stock-logistics-reporting open_in_new
Uncategorised License: AGPL-3

This module allows to gather stock consumptions and build reporting for average daily consumptions. Technically, this has been done through a materialized postgresql view in order to be as fast as possible (some other flow modules can depend on this).

You can add several configurations depending on the location from which consumptions are counted.

For each product ABC classification, you can define the computation horizon, i.e. the amount of time to look backward (in days or weeks or months or years).

You can exclude some days of the week like saturday and sunday from the computation. However, if moves occurs on those excluded days, they are still counted. If your warehouse is open usualy on week days, the averages will be on 5 days a week. If the warehouse had some activity during the week-end, this will be considered in the total and average as if it happened during weekdays.

The report also provides a recommended quantity. That recommended quantity is the biggest between:

  • a coverage in days * the average daily consumption + a safety
  • a coverage in days * the average consumption

The second part tries to better recommend a quantity for C products. The safety is computed as: daily standard deviation * sqrt(coverage) * a safety factor It is up to you to configure the safety factor.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Adds an 'Average Daily Sales' report that shows, per product and per ABC class, how much stock leaves the warehouse on average each day, plus a safety stock and a recommended quantity to keep in stock.

This module gives warehouse and purchasing staff a read-only report of how fast products are consumed, based on completed stock moves leaving a chosen location.

Where it appears: - A new 'Average Daily Sales' entry under the Inventory reporting menu, with a list and a form per product. You can search by product, filter on 'Can be Sold', 'Normal product' or 'On Order', and group by warehouse or location. - A new 'Average daily sales computation parameters' menu in the Inventory configuration, where stock managers create the rules.

What the report shows per product: number of sales (deliveries), average quantity per delivery, average number of deliveries per day, average quantity per day, maximum quantity in a day, daily standard deviation, a safety stock and a recommended quantity.

Business rules and automation: - Each configuration applies to one ABC classification level, one warehouse and one location, and is unique per ABC level and location. - You choose the analysis horizon (days, weeks, months or years) and can exclude weekends; moves done on weekends are still counted in totals. - Safety stock = daily standard deviation x safety factor x square root of the number of days of stock. - Recommended quantity = the larger of (average daily quantity x days of stock + safety) and (number of sales kept in stock x average quantity per sale). - A scheduled job refreshes the figures every 24 hours; until it has run, the report stays empty. - Records are filtered per company.

Models and fields (3)
  • stock.average.daily.sale · new modelis_mto (On Order), safety, date_to (To), sale_ok (Can be Sold), config_id (Stock Average Daily Sale Configuration), date_from (From), nbr_sales (Number of Sales), product_id (Product), location_id, warehouse_id, max_daily_qty, recommended_qty, average_daily_qty, average_qty_by_sale, abc_classification_level (ABC), daily_standard_deviation (Daily Qty Standard Deviation), average_daily_sales_count
  • stock.average.daily.sale.demo · new model
  • stock.average.daily.sale.config · new modelactive, company_id (Company), location_id (Location), period_name (Period analyzed unit), period_value (Period analyzed value), warehouse_id (Warehouse), safety_factor, exclude_weekends, abc_classification_level, number_days_qty_in_stock (Number of days of quantities in stock), number_sales_qty_in_stock (Number of sales quantities in stock)

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 14.0

Confirmed on 2026-11-03 in branch 14.0 of OCA/stock-logistics-reporting.

terminal Installation and usage

OCA documentation · Odoo 16.0
  • To configure data analysis, you should go to Inventory > Configuration > Average daily sales computation parameters
  • You need to fill in the following informations:
  • The product ABC classification you want - see product_abc_classification module
  • The concerned warehouse
  • The stock location for which you want to compute the usage
  • The period of time to analyze back (in days/weeks/months/years)
  • A safety factor
  • Go to Configuration > Technical > Scheduled Actions > Refresh average daily sales materialized view By default, the scheduled action is set to refresh data each day. Note that the current day is not take into consideration in the computations, so you better run the scheduled action on the early morning. WARNING: The current query is not TZ compliant. So the cron must run after midnight UTC time.
  • By default, the root location where analysis is done is the Warehouse stock location, but you can change it and you can compute usage for multiple locations of the warehouse. Ensure to set a location that is used by the stock moves or a parent one.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.