ERC Intercompany Profit/Loss Elimination
by ERC Implementors (Benedito Monteiro) https://erc-implementors.com$ 198.90
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Inventory (stock) • Invoicing (account) • Manufacturing (mrp) • Purchase (purchase) |
| Community Apps Dependencies | Show |
| Lines of code | 4393 |
| Technical Name |
erc_intercompany_profit_loss |
| License | OPL-1 |
| Website | https://erc-implementors.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Inventory (stock) • Invoicing (account) • Manufacturing (mrp) • Purchase (purchase) |
| Community Apps Dependencies | Show |
| Lines of code | 4393 |
| Technical Name |
erc_intercompany_profit_loss |
| License | OPL-1 |
| Website | https://erc-implementors.com |
Why This Module?
Automatically capture intercompany profit margins at invoice post time and generate IFRS 10 / ASC 810-compliant elimination journal entries — directly inside Odoo, without spreadsheets.
The Problem
When Company A sells goods to Company B within the same group, the profit on that sale is unrealized from a consolidated perspective — until Company B sells to an external customer. Without elimination, the group overstates both revenue and inventory.
The Solution
Automatically logs the margin embedded in every intercompany invoice line. Tracks how much of the purchased stock has been sold externally. Generates draft elimination entries ready for the accountant's review — one journal, full audit trail.
Enterprise Result
Consolidated P&L that passes group audit. Elimination entries isolated in the ICPE journal — filter it to see every intercompany profit reversal for any period at a glance. Zero manual calculation.
Try Our Live Demo
URL: https://erc-implementors.me/web/database/selector
Database: erc_intercompany_us
Login: ERC_ME
Password: demo
Automated Persistence & Setup
Install once — the ICPE journal and all defaults are created automatically and survive every upgrade.
On Install
Creates the ICPE general journal for each company, links it as the P&L Elimination Journal, and seeds system parameters. One install — full infrastructure.
On Upgrade
The data file with noupdate="0" re-runs _plc_ensure_icpe_journal() on every odoo -u. New companies added since install are automatically provisioned.
On Every Invoice Post
When an intercompany customer invoice is posted, a Profit Log is auto-created with lines for each product — capturing cost price, margin, and profit type at that exact moment.
The Problem This Module Solves
Unrealized Profit in Consolidated Inventory
When one group entity sells goods to a subsidiary, the seller records a profit — but that profit is not yet earned. The goods are still inside the group, sitting in the subsidiary's inventory at a price that includes the seller's margin.
Until the subsidiary sells those goods to an external customer, the embedded profit is unrealized. Yet without elimination, it quietly inflates:
- Inventory value on the consolidated balance sheet
- Revenue and gross profit on the consolidated P&L
- Inter-entity payables and receivables that cancel each other out
This distorts every financial ratio your investors, auditors, and regulators rely on.
Mandatory Under International Standards
The fix is mandatory under IFRS 10, US GAAP ASC 810, and equivalent local GAAP: unrealized intercompany profit must be eliminated from consolidated statements — period.
Why it's hard in practice: most ERPs handle journal routing. None automate the profit tracking and elimination calculation:
- How much margin did the seller embed in this shipment?
- How much of that stock has the buyer actually sold on?
- What portion is still sitting in the warehouse — unrealized?
Accountants typically do this in spreadsheets, manually, at quarter-end. Error-prone, audit-unfriendly, and invisible to management during the period.
How Automatic Margin Capture Works
Complete transparency into what happens when you post an intercompany invoice.
Trigger: Invoice Confirmed
The moment you click Confirm on a customer invoice, Odoo calls account.move._post(). This module hooks into that exact moment — after the invoice is legally posted — and runs silently in the background.
Is This Intercompany?
Three conditions are checked: move type is out_invoice, state is posted, and the partner has Is Intercompany = True. If all pass and "Auto-log P&L on IC Invoice Post" is enabled on the company, the capture proceeds.
Which Config Applies?
The buyer company is identified by matching the invoice partner to a res.company record. The system then finds the active Elimination Config for that seller→buyer pair. If none exists, a warning is logged — the invoice is unaffected.
Cost Snapshot at Post Time
For each product line, the system reads price_unit (transfer price) and product.standard_price (cost) at this exact moment. The cost is snapshotted because standard_price will change with future stock movements — this is the only moment it can be captured accurately.
Margin Calculated Per Line
Each line immediately computes: Margin = Qty × (Unit Price − Cost) and Margin % = Margin ÷ Revenue × 100. Products are auto-classified: service type → Service profit type; all others → Goods Unsold (accountant can update as buyer sells through).
Draft Log Created — Not the Entry
A Draft Profit Log is created and linked to the invoice (visible via smart button). The elimination journal entry is not posted automatically — it is generated on demand, reviewed by your accountant, and posted at period-end. The calculation is done; the decision is yours.
Unrealized = (Stock Qty × Unit Price) × Margin% ÷ (100 + Margin%)
Unrealized = (Sold Qty × Cost Price) × Margin% ÷ 100
Unrealized = Full Margin Amount
Key Product Highlights
Everything your consolidation team needs to eliminate intercompany profit — out of the box.
Auto Profit Log on Invoice Post
Every time an intercompany invoice is posted, a Profit Log is created automatically — capturing seller unit price, seller cost price (at post time), margin %, and profit type per line. Zero manual effort.
3 Profit TypesSmart
Each invoice line is classified automatically: Goods — Unsold Inventory (stock still held), Goods — Sold to External (realized portion), or Service / Expense (full margin). The correct elimination entry pattern is applied per type.
Single ICPE Journal
All elimination entries — across all seller→buyer pairs, all periods — land in one dedicated ICPE general journal per company. The accountant filters by journal to see every elimination at a glance. No scattering across multiple journals.
Draft → Review → Post Workflow
Elimination entries are always created as Draft. The accountant reviews the Dr/Cr lines, adjusts qty sold externally if needed, then posts. The Profit Log state tracks the full lifecycle: Draft → Pending → Posted → Reversed.
Batch Wizard by Period
Use the Generate Eliminations wizard to batch-process all pending logs for a period and company in one action. Filter by specific seller→buyer config pairs. Get a list of all generated entries for review.
Configurable GL Accounts per Pair
For each seller→buyer company pair, configure 7 dedicated GL accounts (buyer AP, Inventory, Sales, COGS, Expense + seller AR, Service Revenue). Use Auto-Populate to copy defaults from erc_intercompany_je in one click.
3 Profit Types & Elimination Journal Entry Patterns
Each profit type generates a specific Dr/Cr pattern in the ICPE journal. All entries created as Draft.
1. Goods — Unsold Inventory
IC goods still held in buyer's stock. Profit is unrealized until sold externally.
Amount: qty_in_stock × unit_price × margin% / (100 + margin%)
2. Goods — Sold to External
IC goods the buyer has already sold to external customers. Margin embedded in COGS is eliminated.
Amount: qty_sold × cost_price × margin% / 100
3. Service / Expense
IC services rendered. Full margin eliminated on both the seller (revenue) and buyer (expense) sides.
Buyer:
Seller:
Amount: full seller margin amount
Profit Log Lifecycle
From invoice post to consolidated elimination — every step is tracked and auditable.
IC Invoice Posted
Seller company
Profit Log Created
Draft
Update Qty Sold
Buyer updates stock
Generate Entry
Pending
Post Entry
Posted
What the Profit Log Captures
- Seller unit price — from the invoice line at post time
- Seller cost price —
standard_pricesnapshot at post time - Margin amount & % — computed and stored
- Profit type — auto-classified, editable by user
- Qty sold externally — user-maintained, drives unrealized calc
- Unrealized profit — computed per type formula
Unrealized Profit Formulas
| Goods Unsold | stock_value × margin% / (100 + margin%) |
| Goods Sold | sold_cost × margin% / 100 |
| Service | full margin amount |
Configuration at a Glance
Two configuration points — company settings and per-pair GL accounts. That's it.
1. Company Settings
Go to Accounting → Settings → Intercompany P&L Elimination.
- P&L Elimination Journal — auto-set to
ICPEon install; override if needed - Auto-log P&L on IC Invoice Post — toggle to disable automatic log creation
ICPE journal is created automatically on install — no manual journal creation required.
2. Elimination Config (per Seller → Buyer Pair)
Go to Accounting → Intercompany P&L → Elimination Config. One record per company pair.
- Buyer AP Intercompany — payable account
- Buyer Inventory — stock/asset account
- Buyer Product Sales — revenue account
- Buyer COGS — cost of goods account
- Buyer Expense — service expense account
- Seller AR Intercompany — receivable account
- Seller Services Revenue — revenue account
Auto-Populate button copies defaults from erc_intercompany_je company settings in one click.
Complete GL Account Map
Seven configurable accounts per seller→buyer pair. Each has a clear role in the elimination entry.
| Account Field | Side | Account Type | Dr / Cr | Used For |
|---|---|---|---|---|
| Buyer — AP Intercompany | Buyer | Liability / Payable | Dr | Goods Unsold, Service |
| Buyer — Inventory | Buyer | Asset | Cr | Goods Unsold |
| Buyer — Product Sales | Buyer | Income | Dr | Goods Sold to External |
| Buyer — COGS | Buyer | Expense / Direct Cost | Cr | Goods Sold to External |
| Buyer — Expense | Buyer | Expense | Cr | Service / Expense |
| Seller — AR Intercompany | Seller | Asset / Receivable | Cr | Service / Expense |
| Seller — Services Revenue | Seller | Income | Dr | Service / Expense |
Generate Eliminations WizardBatch
Process an entire period's worth of intercompany logs in a single action.
Wizard Parameters
- Company — seller or buyer company to filter by
- Date From / Date To — invoice date range
- Limit to Configs — optional: restrict to specific seller→buyer pairs
What Happens
- Finds all
Draft / Pendinglogs in range - Skips logs already with a posted elimination
- Creates one draft
account.moveper log - Sets log state to
Pending - Returns a list of all generated entries for review
Full Traceability from the Invoice
Every intercompany invoice carries a smart button showing the linked P&L log — one click to the full elimination record.
Smart Button
A P&L Log smart button appears on the invoice form showing the count. Click to jump directly to the profit log, see all lines, margins, and the linked elimination entry.
Linked Elimination Entry
The profit log stores a direct reference to its elimination_move_id. From log to journal entry in one click. The entry's ref field also references the original invoice name.
State Tracking
Log states: Draft (created, awaiting qty update) → Pending (elimination entry generated, not yet posted) → Posted → Reversed. Full lifecycle visible at a glance.
Works Alongside erc_intercompany_je
This module is a companion — it extends, not replaces. Both modules can be used independently within a Odoo multi-company group.
erc_intercompany_je (Required Dependency)
- Detects IC partners via
is_intercompanyflag - Provides default GL accounts on
res.company(AR, AP, COGS, Service Revenue, etc.) - Routes IC invoices to dedicated journals (ICS, ISS, ICP, ICE)
- Auto-Populate button reads these company defaults
erc_intercompany_profit_loss (This Module)
- Adds profit log auto-creation on IC invoice post
- Tracks margin per line with 3 profit type formulas
- Generates draft elimination entries in ICPE journal
- Batch wizard, smart button, full state lifecycle
Visual Product Tour
Every screen your consolidation team will work with — from invoice post to posted elimination entry.
1. Company Settings — ICPE Journal
Accounting › Settings › Intercompany P&L Elimination — ICPE journal auto-created on install.
2. Elimination Config per Company Pair
7 GL accounts per seller→buyer pair. Auto-Populate copies defaults from erc_intercompany_je.
3. Profit Log List
All IC profit logs — colour-coded by state (Draft / Pending / Posted), with IC amount, margin and unrealized totals.
4. Profit Log Form — Header & Totals
Invoice reference, seller/buyer, total IC amount, total margin, unrealized profit — all computed and stored.
5. Profit Lines — Margin & Qty Tracking
Per-line: cost price snapshot at post time, margin %, profit type, qty sold externally (editable), unrealized profit.
6. ICPE Journal — Draft Elimination Entry
Auto-generated Dr/Cr lines in ICPE journal. Review, adjust if needed, then post. Ref links to original invoice.
7. Generate Eliminations Wizard
Batch-process an entire period: select company + date range + configs → generates all draft elimination entries at once.
8. Smart Button on Invoice
P&L Log smart button appears on every intercompany invoice — click to jump directly to the log and its elimination entry.
Corporate Identity
- CNPJ: 12.353.398/0001-29
- Owner: Benedito Monteiro
- Website: erc-implementors.com
Rua Professora Gioconda Mussolini, 239. Jd Rizzo, Sao Paulo - SP, Brazil
What’s New in v1.3Phase 2
Ten enhancements that transform P&L elimination from a manual process into an automated, auditable workflow.
Dashboard KPIs
Three live KPIs on the Settings page: pending log count, total unrealized profit, and last elimination date. Click the pending count to jump straight to the log list.
Chatter & Tracking
Profit logs inherit mail.thread with state tracking. Every elimination generation, reversal, and status change is posted to chatter for full team visibility and audit compliance.
Auto-Logging on Invoice Post
Post an IC customer invoice and a profit log is created automatically in draft with all profit lines pre-populated. Toggle on/off per company. Eliminates 80%+ of manual data entry.
Stock Delivery Sync
When the buyer ships goods to external customers, sold quantities update automatically on matching profit lines. FIFO matching within a 90-day window. Full picking traceability via M2M link.
Inventory Tracking Fields
Three new fields per profit line: qty sold external, qty still in stock (computed), and qty auto-sold (from deliveries). Dynamic unrealized profit based on what’s actually still in inventory.
Batch Reverse Wizard
Reverse elimination entries for an entire period with one wizard. Filter by date range and seller/buyer config. Live preview of affected logs before execution. Skips errors, reports results.
PDF Elimination Report
Comprehensive QWeb PDF report with product-level detail: qty, seller price, cost, margin %, profit type, unrealized amount. Auto-attached to elimination journal entries for audit.
Smart Button on Invoices
IC invoices show a smart button with the count of related profit logs. One click navigates to the filtered log list. Only visible when logs exist.
Cascade Reversals
Reverse a source IC invoice and all related profit logs are automatically reversed. No orphaned elimination entries. Ensures GL consistency across the chain.
ERC IMPLEMENTORS LTDA
Professional Odoo Solutions & Localization Experts
© 2026 ERC Implementors. All Rights Reserved. | CNPJ: 12.353.398/0001-29
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module