Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Inventory
  3. Stock Analytic Distribution v 18.0
  4. Sales Conditions FAQ

Stock Analytic Distribution

by Haytham Afify https://github.com/haythamafify
Odoo
v 18.0 Third Party 13
Download for v 18.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Inventory (stock)
• Discuss (mail)
• Purchase (purchase)
• Invoicing (account)
Lines of code 259
Technical Name stock_analytic_split
LicenseLGPL-3
Websitehttps://github.com/haythamafify
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Inventory (stock)
• Discuss (mail)
• Purchase (purchase)
• Invoicing (account)
Lines of code 259
Technical Name stock_analytic_split
LicenseLGPL-3
Websitehttps://github.com/haythamafify
Stock Analytic Distribution Banner

📦 Stock Analytic Distribution

Bring the power of analytic accounting directly to your stock transfers. Split costs across multiple analytic accounts — the same way you do on invoices. Now with auto-sync from Purchase Orders and Sales Orders — analytic is pulled automatically from the source document.

🆕 New in v4 — Auto-Sync from PO / SO

When a receipt or delivery is linked to a Purchase Order or Sales Order, the analytic distribution is pulled automatically from each order line and applied to the matching stock move. The field is locked to prevent manual override — ensuring data integrity. For standalone transfers (no PO/SO), manual entry remains fully available.

Key Features

🎯 Analytic Widget on Move Lines
The native analytic_distribution widget appears on every product line in your transfer form — exactly like invoice lines.
🔄 Auto-Sync from PO / SO Lines (NEW)
Each stock move inherits the analytic from the matching PO or SO line automatically. Field is locked when linked to a source document.
✏️ Manual Entry for Standalone Transfers
Internal transfers and receipts with no PO/SO remain fully editable — set cost center manually per line or via the header field.
✅ Auto Analytic Lines on Validate
When you validate a transfer, analytic lines are automatically created for each distribution percentage on every done move.
🔗 Full Stock Traceability
Analytic lines are linked back to stock.move and stock.picking for full operational traceability.
🌍 Arabic Translation + Multi-Plan
Full Arabic i18n/ar.po translation included. Supports multiple analytic plans and percentage splits simultaneously.

How It Works

  1. Set Analytic on PO/SO Line — In your Purchase Order or Sales Order, set the Analytic Distribution on each product line (requires Analytic Accounting enabled in Settings).
  2. Confirm the Order — Odoo creates the linked receipt or delivery automatically.
  3. Analytic Auto-Applied — Open the receipt/delivery and find the analytic already filled from the source document. Field is locked.
  4. Validate — Click Validate. Analytic lines are created automatically per distribution.
  5. Standalone Transfers — For transfers without PO/SO, set the analytic manually on the header or per line and validate normally.

Technical Notes

  • Auto-sync uses stock.move.purchase_line_id and stock.move.sale_line_id to match move → order line.
  • Works safely with or without sale_stock module installed — sale_id is checked dynamically.
  • Header analytic stored as JSON in stock.picking.analytic_distribution.
  • Per-line analytic uses stock.move.analytic_distribution.
  • Cost source uses stock_valuation_layer_ids.value; falls back to standard_price × qty.
  • Open Source — LGPL-3 license.

Dependencies

stock analytic stock_account purchase_stock

Changelog

  • v4.0.0 — Auto-sync analytic from PO/SO lines to stock moves. Field locked when linked to source document. Safe detection of sale_stock module.
  • v3.0.0 — Header-level Default Analytic field that propagates to all lines automatically.
  • v2.0.0 — Per-line analytic distribution widget with auto analytic line creation on validate.
  • v1.0.0 — Initial release.
👤 Author
Haytham Afify  |  haythamgamal6@gmail.com
🐙 GitHub: github.com/haythamafify  |  💼 LinkedIn

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with