account_invoice_margin
Displays sales margin figures directly on invoices.
Key Features
- account.move: Adds computed margin, signed margin, and margin percentage fields that roll up invoice line margins and show on invoice form/tree views for users allowed to see margins.
- account.move.line: Computes purchase cost from product standard price with unit and currency conversion and derives margin amounts/percentages, skipping purchase documents and handling refunds with signed margins.
- security: Provides a “Show Invoice Margin” group to gate visibility of margin fields, enabled for the administrator by default.
- technical: Pre-init hook creates missing margin-related database columns and backfills margins for existing invoices during installation or migration.