Repository
OCA/margin-analysis · module folder · Try on Runboat
Module version
1.0.1
Category
Sales
Folder size
0.06 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/margin-analysis
Last tracking update
2026-08-07 08:42:57
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Carlos Roca, Weblate, OCA-git-bot, oca-ci, Bhavesh Heliconia
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
sale_margin_delivered_dropshipping, sale_margin_delivered_security
Description
Computes sale order lines margins for the delivered items.

This module takes in consideration Outgoing and Returns.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
view_order_form sale.order form Inherits sale_margin.sale_margin_sale_order_line_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (3)
  • margin_delivered Float
    compute='_compute_margin_delivered' help='Total Margin of all delivered products.\n\nFormula: Delivered Quantities * (Unit Price with Discounts - Average Unit Cost of Delivered Products)\n\nValue may differ from Cost Price because Stock Valuation Layers are used instead of Cost on line.' store=True
  • margin_delivered_percent Float
    compute='_compute_margin_delivered' help='Margin percent between the Unit Price with discounts and Delivered Unit Cost.\n\nFormula: ((Unit Price with Discounts - Average Unit Cost of delivered products) / Unit Price with Discounts)' readonly=True store=True
  • purchase_price_delivery Float
    compute='_compute_margin_delivered' help='Average Unit Cost of delivered products.\n\nFormula: Value Delivered / Quantity Delivered\n\nWhen using the FIFO method, the value of this field may not match the actual cost of the product delivered.\nThere may also be differences with the costing of the Sales from Deliveries report, because when the sales order is created, it is not known exactly which units will actually be delivered to calculate their cost.\nThis is because when the sales order is created, it is not known which units will actually be delivered to calculate their actual cost. You do not have this information until you validate the corresponding delivery note.' store=True
Public methods (0)

No public methods.

New fields (1)
  • margin_delivered Float
    readonly=True
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…