Account Invoice Margin
account_invoice_margin · OCA/margin-analysis
Health
90/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 5 months ago
-
Required by15/251 module depends on it
-
Maturity25/25In 9 Odoo series since 11.0
Heuristic over the facts below, not an audit · How it's computed
Required by
1
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.15 MB
Module directory on disk
Code analysis
1 migration note
3 models
2 views
0 HTTP endpoints
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `WITH am AS( SELECT id FROM account_move WHERE move_type NOT ILIKE 'in_%' ) UPDATE account_move_line SET margin = price_subtotal, margin_signed = price_subtotal, margin_percent = 100 FROM am WHERE am.id = account_move_line.move_id AND price_subtotal > 0.0;` - re-check the table/column names still match after upgrading. (2 occurrences in this file) migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
This module allows to show sales margin in invoices.
The new information is available:
- on the invoice form view

- and on the invoice tree view

Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 2
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
invoice_margin_form_tree |
account.move | tree | Inherits account.view_move_form | |
view_account_invoice_tree |
account.move | tree | Inherits account.view_invoice_tree |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 3
New fields (1)
-
marginFloatreadonly=Truestring='Margin Analysis'
No public methods.
New fields (3)
-
marginMonetarycompute='_compute_margin'currency_field='currency_id'store=True -
margin_percentFloatcompute='_compute_margin'digits='Product Price'store=Truestring='Margin (%)' -
margin_signedMonetarycompute='_compute_margin'currency_field='currency_id'store=True
No public methods.
New fields (4)
-
marginFloatcompute='_compute_margin'digits='Product Price'store=True -
margin_percentFloatcompute='_compute_margin'readonly=Truestore=Truestring='Margin (%)' -
margin_signedFloatcompute='_compute_margin'digits='Product Price'store=True -
purchase_priceFloatcompute='_compute_purchase_price'digits='Product Price'readonly=Falsestore=Truestring='Cost'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…