OdooWiki OCA HUB

Sale Analytic Distribution Model warehouse

sale_analytic_distribution_model_warehouse folder_open OCA/account-analytic open_in_new
Purchases, Accounting License: AGPL-3

Automatically assigns analytic distributions to purchase order lines based on the sale's warehouse.

This module extends analytic distribution models to support warehouse-based automatic assignment in sale orders. When you create a sale order, the system automatically applies the appropriate analytic distribution based on the origin warehouse.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets you set up analytic distribution rules that depend on the warehouse, so sale order lines automatically get the right analytic account based on the warehouse the sale is shipped from.

This module adds a Warehouse field to analytic distribution models, so you can create rules that say "when the sale comes from this warehouse, use this analytic account".

  • On the analytic distribution model screen (the list of rules used to fill analytic accounts automatically), a new Warehouse column appears next to the Company column. You can leave it empty for rules that apply to all warehouses.
  • When a sale order line is created or changed, Odoo looks at the warehouse of the sale order and picks the matching analytic distribution rule. The analytic account is then filled in automatically on the line.
  • The rule matching now also considers the warehouse, so two rules with the same product, partner or company but different warehouses are treated as different rules.
  • The module works together with the sale and inventory apps (sale_stock), and it touches the analytic distribution model and sale order line records.

No new menus or buttons are added; the change appears inside the existing analytic distribution model list and form, and in the automatic computation of analytic accounts on sale order lines.

Depends on

sale_stock
Models and fields (2)
  • sale.order.line · extends an existing model
  • account.analytic.distribution.model · extends an existing modelwarehouse_id

Text generated by AI (DeepSeek) from reading the Odoo 18.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: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 18.0

Confirmed on 2026-11-03 in branch 18.0 of OCA/account-analytic.

terminal Installation and usage

OCA documentation · Odoo 18.0

To configure the analytic distributions:

  • Go to Accounting > Configuration > Analytic Distribution Models
  • Create a new distribution model or edit an existing one
  • Set the Warehouse field to specify which warehouse this model applies to
  • Configure your analytic accounts and percentages
  • Save the model

The module works automatically:

  • Create a sale order
  • Add products to order lines
  • The system automatically applies analytic distribution based on the order warehouse
  • Confirm the order

The analytic distribution appears in the Analytic Distribution field on each sale order line.

Note: Manual changes to the analytic distribution field are still possible if needed.

Note: Changing the warehouse of the order may recompute the analytic distribution of all its lines. If the new warehouse has a distribution model, its result replaces the value of every line, manual values included. If it has none, the lines keep the distribution they already had.

No verified information in OCA: Installation.

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.