Sale Order Line Price Source Tracking

sale_order_line_price_source
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/19.0/sale_order_line_price_source
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Ricardoalso
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:48
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module tracks from where each sale order line unit price comes
from.

It extends `sale.order.line` with: - `price_source` (`pricelist`,
`product`, `manual`) - `price_source_pricelist_item_id` (the applied
`product.pricelist.item` when source is `pricelist`)

Price source is computed from core pricing behavior, including
manual-price detection based on `technical_price_unit` versus
`price_unit`.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
view_order_form_inherit_price_source sale.order.form.inherit.price.source sale.order xpath Inherits sale.view_order_form
view_order_line_form_inherit_price_source sale.order.line.form.inherit.price.source sale.order.line xpath Inherits sale.sale_order_line_view_form_readonly
view_order_line_tree_inherit_price_source sale.order.line.tree.inherit.price.source sale.order.line xpath Inherits sale.view_order_line_tree
Models touched (1)

New fields (2)
  • price_source Selection
    default='product' help='Indicates the source of the unit price: Pricelist rule, product base price, or manual override.' args: [('pricelist', 'Pricelist Rule'), ('product', 'Product Sales Price'), ('manual', 'Manual Override')]
  • price_source_pricelist_item_id Many2one → product.pricelist.item
    help="The pricelist rule that determined this line's price (if source is Pricelist)." args: 'product.pricelist.item'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, values)