Sales Margin after other estimated costs

sale_margin_delivery_cost
REPOSITORY
REPOSITORYOCA/margin-analysis
GIT
GIThttps://github.com/OCA/margin-analysis.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/margin-analysis/tree/14.0/sale_margin_delivery_cost
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSales
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Open Source Integrators
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Open Source Integrators
COMMITTERS
COMMITTERSDaniel Reis, oca-travis, Weblate, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/margin-analysis
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_margin
    - sale_management
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
    - delivery
    - sale_stock
    - stock_account
    - stock
    - barcodes
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
view_carrier_form Delivery Carrier: charge policy delivery.carrier field Inherits delivery.view_delivery_carrier_form
view_order_form_inherit Sale Order: other costs sale.order field Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • charge_policy Selection
    default='sale' help='How shipping costs are added to the sales order: charged in a sales order line, estimated on an other costs line.' required=True string='Charging Policy' args: [('sale', 'As SO Line'), ('other', 'As Other Cost')]
Public methods (0)

No public methods.

New fields (1)
  • other_cost_ids One2many → sale.order.other.cost
    auto_join=True copy=True states={'cancel': [('readonly', True)], 'done': [('readonly', True)]} string='Other Costs' args: 'sale.order.other.cost', 'order_id'
Public methods (1)
  • set_delivery_line(self, carrier, amount)

New fields (7)
  • company_id Many2one
    index=True readonly=True related='order_id.company_id' store=True
  • is_delivery Boolean
    default=False string='Is a Delivery'
  • name Text
    required=True string='Description'
  • order_id Many2one → sale.order
    copy=False index=True ondelete='cascade' required=True string='Sales Order' args: 'sale.order'
  • price_unit Float
    digits='Product Price' args: 'Cost'
  • product_id Many2one → product.product
    change_default=True check_company=True domain="[('type', '!=', 'product'), '|', ('company_id', '=', False), ('company_id', '=', company_id)]" ondelete='restrict' string='Product' args: 'product.product'
  • recompute_delivery_price Boolean
    related='order_id.recompute_delivery_price'
Public methods (1)
  • product_id_change(self)
    @api.onchange('product_id')
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/margin-analysis
PULL REQUEST
PULL REQUEST[16.0][MIG] sale_margin_delivery_cost: Migration to 16.0 (#191)