Delivery - Stock

stock_delivery
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/stock_delivery
VERSION
VERSION 1.0
CATEGORY
CATEGORYShipping Connectors
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Thibault Delavallée, Pierre Masereel, Arnold Moyaux, Julien Castiaux, Victor Feyens, Andrea Grazioso (agr-odoo), William Henrotin, Alvaro Fuentes, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, William Braeckman, Mathieu Walravens, Djamel Touati, Pieter Claeys (clpi), Dylan Kiss (dyki), lase@odoo.com, Quentin Wolfs, reka-odoo, kcv-odoo, nihp-odoo, Mohammad Abdulmoneim, David Van Droogenbroeck (DROD), Mohammad Abdulmoneim (abdu), djameltouati, Krzysztof Magusiak (krma), Hazem Ibrahim, vlst-odoo, Lancelot Semal, Amr Elkhatieb, srap-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:46
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_stock
    - 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
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - delivery
    - payment_custom
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Allows you to add delivery methods in pickings.
===============================================

When creating invoices from picking, the system is able to add and compute the shipping line.

Code Analysis

Views touched (28)
XML IDNameModelTypeStatus
alternative_zpl_label alternative_zpl_label ir.ui.view qweb Inherits stock.alternative_zpl_label
choose_delivery_carrier_view_form choose.delivery.carrier.form choose.delivery.carrier xpath Inherits delivery.choose_delivery_carrier_view_form
delivery_stock_report_delivery_no_package_section_line delivery_stock_report_delivery_no_package_section_line ir.ui.view qweb Inherits stock.stock_report_delivery_no_package_section_line
delivery_tracking_url_warning_form delivery.carrier.warning.url.form stock.picking form New
label_package_template_view_delivery label_package_template_view_delivery ir.ui.view qweb Inherits stock.label_package_template_view
normal_zpl_label normal_zpl_label ir.ui.view qweb Inherits stock.normal_zpl_label
product_template_hs_code product.template.form.hs_code product.template xpath Inherits stock.view_template_property_form
report_delivery_document2 report_delivery_document2 ir.ui.view qweb Inherits stock.report_delivery_document
report_package_barcode_delivery report_package_barcode_delivery ir.ui.view qweb Inherits stock.report_package_barcode
report_package_barcode_small_delivery report_package_barcode_small_delivery ir.ui.view qweb Inherits stock.report_package_barcode_small
report_shipping2 report_shipping2 ir.ui.view qweb Inherits stock.report_picking
sale_order_portal_content_inherit_sale_stock_inherit_website_sale Shipping tracking on orders followup ir.ui.view qweb Inherits sale_stock.sale_order_portal_content_inherit_sale_stock
stock_location_route_view_form_inherit_stock_delivery stock.route.form stock.route xpath Inherits stock.stock_location_route_form_view
stock_move_line_view_search_delivery stock.move.line.search.delivery stock.move.line xpath Inherits stock.stock_move_line_view_search
stock_package_type_form_delivery stock.package.type.form.delivery stock.package.type xpath Inherits stock.stock_package_type_form
stock_package_type_tree_delivery stock.package.type.list.delivery stock.package.type xpath Inherits stock.stock_package_type_tree
stock_package_view_form stock.package.weight.form stock.package field Inherits stock.stock_package_view_form
stock_put_in_pack_form stock.put.in.pack.form stock.put.in.pack field Inherits stock.stock_put_in_pack_form
stock_report_delivery_aggregated_move_lines_inherit_delivery stock_report_delivery_aggregated_move_lines_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_aggregated_move_lines
stock_report_delivery_has_serial_move_line_inherit_delivery stock_report_delivery_has_serial_move_line_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_has_serial_move_line
stock_report_delivery_package_section_line_inherit_delivery stock_report_delivery_package_section_line_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_package_section_line
view_delivery_carrier_form_inherit_stock_delivery delivery.carrier.form delivery.carrier xpath Inherits delivery.view_delivery_carrier_form
view_move_line_tree_detailed_delivery stock.move.line.list.detailed stock.move.line xpath Inherits stock.view_move_line_tree_detailed
view_picking_type_form_delivery stock.picking.type.list.delivery stock.picking.type xpath Inherits stock.view_picking_type_form
view_picking_withcarrier_out_form delivery.stock.picking_withcarrier.form.view stock.picking data Inherits stock.view_picking_form
view_picking_withweight_internal_move_form stock.picking_withweight.internal.move.form.view stock.move xpath Inherits stock.view_move_form
view_stock_rule_form_delivery stock.rule.list.delivery stock.rule xpath Inherits stock.view_stock_rule_form
vpicktree_view_tree stock.picking.delivery.list.inherit.delivery stock.picking xpath Inherits stock.vpicktree
Models touched (13)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • invoice_policy Selection
    help='Estimated Cost: the customer will be invoiced the estimated cost of the shipping.\nReal Cost: the customer will be invoiced the real cost of the shipping, the cost of theshipping will be updated on the SO after the delivery.' ondelete={'real': 'set default'} selection_add=[('real', 'Real cost')]
  • route_ids Many2many → stock.route
    domain=[('shipping_selectable', '=', True)] args: 'stock.route', 'stock_route_shipping', 'shipping_id', 'route_id', 'Routes'
Public methods (11)
  • base_on_rule_cancel_shipment(self, pickings)
  • base_on_rule_get_tracking_link(self, picking)
  • base_on_rule_send_shipping(self, pickings)
  • cancel_shipment(self, pickings)
    Cancel a shipment :param pickings: A recordset of pickings
  • fixed_cancel_shipment(self, pickings)
  • fixed_get_tracking_link(self, picking)
  • fixed_send_shipping(self, pickings)
  • get_return_label(self, pickings, tracking_number=None, origin_date=None)
  • get_return_label_prefix(self)
  • get_tracking_link(self, picking)
    Ask the tracking link to the service provider :param picking: record of stock.picking :returns: an URL containing the tracking link or None :rtype: str | None
  • send_shipping(self, pickings)
    Send the package to the service provider :param pickings: A recordset of pickings :returns: A list of dictionaries (one per picking) containing of the form:: { 'exact_price': price, 'tracking_number': number } :rtype: list[dict] | None

New fields (2)
  • country_of_origin Many2one → res.country
    help="Rules of origin determine where goods originate, i.e. not where they have been shipped from, but where they have been produced or manufactured.\nAs such, the ‘origin’ is the 'economic nationality' of goods traded in commerce." args: 'res.country', 'Origin of Goods'
  • hs_code Char
    help='Standardized code for international shipping and goods declaration.' string='HS Code'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_delivery_line(self, carrier, amount)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • weight Float
    compute='_cal_move_weight' compute_sudo=True digits='Stock Weight' store=True
Public methods (0)

No public methods.

New fields (3)
  • carrier_id Many2one
    related='picking_id.carrier_id'
  • destination_country_code Char
    related='picking_id.destination_country_code'
  • sale_price Float
    compute='_compute_sale_price'
Public methods (0)

No public methods.

New fields (5)
  • package_carrier_type Selection
    related='package_type_id.package_carrier_type'
  • weight Float
    compute='_compute_weight' digits='Stock Weight' help='Total weight of all the products contained in the package.'
  • weight_is_kg Boolean
    compute='_compute_weight_is_kg' args: 'Technical field indicating whether weight uom is kg or not (i.e. lb)'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' default=_get_default_weight_uom readonly=True string='Weight unit of measure label'
  • weight_uom_rounding Float
    compute='_compute_weight_is_kg' args: "Technical field indicating weight's number of decimal places"
Public methods (0)

No public methods.

New fields (2)
  • package_carrier_type Selection
    default='none' string='Carrier' args: [('none', 'No carrier integration')]
  • shipper_package_code Char
    args: 'Carrier Code'
Public methods (0)

No public methods.

New fields (12)
  • allowed_carrier_ids Many2many → delivery.carrier
    compute='_compute_allowed_carrier_ids' args: 'delivery.carrier'
  • carrier_id Many2one → delivery.carrier
    check_company=True domain="[('id', 'in', allowed_carrier_ids)]" string='Carrier' args: 'delivery.carrier'
  • carrier_price Float
    string='Shipping Cost'
  • carrier_tracking_ref Char
    copy=False string='Tracking Reference'
  • carrier_tracking_url Char
    compute='_compute_carrier_tracking_url' string='Tracking URL'
  • delivery_type Selection
    readonly=True related='carrier_id.delivery_type'
  • destination_country_code Char
    related='partner_id.country_id.code' string='Destination Country'
  • integration_level Selection
    related='carrier_id.integration_level'
  • is_return_picking Boolean
    compute='_compute_return_picking'
  • return_label_ids One2many → ir.attachment
    compute='_compute_return_label' args: 'ir.attachment'
  • weight Float
    compute='_cal_weight' compute_sudo=True digits='Stock Weight' help='Total weight of the products in the picking.' store=True
  • weight_uom_name Char
    compute='_compute_weight_uom_name' default=_get_default_weight_uom readonly=True string='Weight unit of measure label'
Public methods (6)
  • button_validate(self)
  • cancel_shipment(self)
  • get_multiple_carrier_tracking(self)
  • open_website_url(self)
  • print_return_label(self)
  • send_to_shipper(self)

New fields (3)
  • package_carrier_type Char
    args: 'Carrier Type'
  • shipping_weight Float
    compute='_compute_shipping_weight' readonly=False store=True args: 'Shipping Weight'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' string='Weight unit of measure label'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • shipping_selectable Boolean
    args: 'Applicable on Shipping Methods'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/stock_delivery
VERSION
VERSION 1.0
CATEGORY
CATEGORYInventory/Delivery
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Xavier Morel, Odoo Online, Arnold Moyaux, Andrea Grazioso (agr-odoo), William Henrotin, Alvaro Fuentes, Tiffany Chang (tic), Gorash, william-andre, Mathieu Walravens, Vincent Larcin, Walid, Gauthier Wala (gawa), clesgow, Djamel Touati, Pieter Claeys (clpi), Andrew Gavgavian, Dylan Kiss (dyki), kir-odoo, Paweł Fertyk, adda-odoo, Nicolas Viseur (vin), Ethan Vincent, lase@odoo.com, Quentin Wolfs, bary, Louis (wil), asno-odoo, mano-odoo, LauraCForgeFlow, Jitendra Prajapat, David Van Droogenbroeck (DROD), djameltouati, fd-oerp, Vraj Panchal, srap-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:26:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_stock
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - delivery
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Allows you to add delivery methods in pickings.
===============================================

When creating invoices from picking, the system is able to add and compute the shipping line.

Code Analysis

Views touched (26)
XML IDNameModelTypeStatus
choose_delivery_carrier_view_form choose.delivery.carrier.form choose.delivery.carrier xpath Inherits delivery.choose_delivery_carrier_view_form
choose_delivery_package_view_form choose.delivery.package.form choose.delivery.package form New
delivery_stock_report_delivery_no_package_section_line delivery_stock_report_delivery_no_package_section_line ir.ui.view qweb Inherits stock.stock_report_delivery_no_package_section_line
delivery_tracking_url_warning_form delivery.carrier.warning.url.form stock.picking form New
label_package_template_view_delivery label_package_template_view_delivery ir.ui.view qweb Inherits stock.label_package_template_view
product_template_hs_code product.template.form.hs_code product.template xpath Inherits product.product_template_form_view
report_delivery_document2 report_delivery_document2 ir.ui.view qweb Inherits stock.report_delivery_document
report_package_barcode_delivery report_package_barcode_delivery ir.ui.view qweb Inherits stock.report_package_barcode
report_package_barcode_small_delivery report_package_barcode_small_delivery ir.ui.view qweb Inherits stock.report_package_barcode_small
report_shipping2 report_shipping2 ir.ui.view qweb Inherits stock.report_picking
sale_order_portal_content_inherit_sale_stock_inherit_website_sale Shipping tracking on orders followup ir.ui.view qweb Inherits sale_stock.sale_order_portal_content_inherit_sale_stock
stock_location_route_view_form_inherit_stock_delivery stock.route.form stock.route xpath Inherits stock.stock_location_route_form_view
stock_move_line_view_search_delivery stock.move.line.search.delivery stock.move.line xpath Inherits stock.stock_move_line_view_search
stock_package_type_form_delivery stock.package.type.form.delivery stock.package.type xpath Inherits stock.stock_package_type_form
stock_package_type_tree_delivery stock.package.type.list.delivery stock.package.type xpath Inherits stock.stock_package_type_tree
stock_report_delivery_aggregated_move_lines_inherit_delivery stock_report_delivery_aggregated_move_lines_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_aggregated_move_lines
stock_report_delivery_has_serial_move_line_inherit_delivery stock_report_delivery_has_serial_move_line_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_has_serial_move_line
stock_report_delivery_package_section_line_inherit_delivery stock_report_delivery_package_section_line_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_package_section_line
view_delivery_carrier_form_inherit_stock_delivery delivery.carrier.form delivery.carrier xpath Inherits delivery.view_delivery_carrier_form
view_move_line_tree_detailed_delivery stock.move.line.list.detailed stock.move.line xpath Inherits stock.view_move_line_tree_detailed
view_picking_type_form_delivery stock.picking.type.list.delivery stock.picking.type xpath Inherits stock.view_picking_type_form
view_picking_withcarrier_out_form delivery.stock.picking_withcarrier.form.view stock.picking data Inherits stock.view_picking_form
view_picking_withweight_internal_move_form stock.picking_withweight.internal.move.form.view stock.move xpath Inherits stock.view_move_form
view_quant_package_weight_form stock.quant.package.weight.form stock.quant.package field Inherits stock.view_quant_package_form
view_stock_rule_form_delivery stock.rule.list.delivery stock.rule xpath Inherits stock.view_stock_rule_form
vpicktree_view_tree stock.picking.delivery.list.inherit.delivery stock.picking xpath Inherits stock.vpicktree
Models touched (13)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • company_id Many2one
    related='picking_id.company_id'
  • delivery_package_type_id Many2one → stock.package.type
    check_company=True args: 'stock.package.type', 'Delivery Package Type'
  • picking_id Many2one → stock.picking
    args: 'stock.picking', 'Picking'
  • shipping_weight Float
    compute='_compute_shipping_weight' readonly=False store=True args: 'Shipping Weight'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' string='Weight unit of measure label'
Public methods (1)
  • action_put_in_pack(self)

New fields (2)
  • invoice_policy Selection
    help='Estimated Cost: the customer will be invoiced the estimated cost of the shipping.\nReal Cost: the customer will be invoiced the real cost of the shipping, the cost of theshipping will be updated on the SO after the delivery.' ondelete={'real': 'set default'} selection_add=[('real', 'Real cost')]
  • route_ids Many2many → stock.route
    domain=[('shipping_selectable', '=', True)] args: 'stock.route', 'stock_route_shipping', 'shipping_id', 'route_id', 'Routes'
Public methods (11)
  • base_on_rule_cancel_shipment(self, pickings)
  • base_on_rule_get_tracking_link(self, picking)
  • base_on_rule_send_shipping(self, pickings)
  • cancel_shipment(self, pickings)
    Cancel a shipment :param pickings: A recordset of pickings
  • fixed_cancel_shipment(self, pickings)
  • fixed_get_tracking_link(self, picking)
  • fixed_send_shipping(self, pickings)
  • get_return_label(self, pickings, tracking_number=None, origin_date=None)
  • get_return_label_prefix(self)
  • get_tracking_link(self, picking)
    Ask the tracking link to the service provider :param picking: record of stock.picking :return str: an URL containing the tracking link or False
  • send_shipping(self, pickings)
    Send the package to the service provider :param pickings: A recordset of pickings :return list: A list of dictionaries (one per picking) containing of the form:: { 'exact_price': price, 'tracking_number': number } # TODO missing labels per package # TODO missing currency # TODO missing success, error, warnings

New fields (2)
  • country_of_origin Many2one → res.country
    help="Rules of origin determine where goods originate, i.e. not where they have been shipped from, but where they have been produced or manufactured.\nAs such, the ‘origin’ is the 'economic nationality' of goods traded in commerce." args: 'res.country', 'Origin of Goods'
  • hs_code Char
    help='Standardized code for international shipping and goods declaration.' string='HS Code'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_delivery_line(self, carrier, amount)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • weight Float
    compute='_cal_move_weight' compute_sudo=True digits='Stock Weight' store=True
Public methods (0)

No public methods.

New fields (3)
  • carrier_id Many2one
    related='picking_id.carrier_id' store=True
  • destination_country_code Char
    related='picking_id.destination_country_code'
  • sale_price Float
    compute='_compute_sale_price'
Public methods (0)

No public methods.

New fields (2)
  • package_carrier_type Selection
    default='none' string='Carrier' args: [('none', 'No carrier integration')]
  • shipper_package_code Char
    args: 'Carrier Code'
Public methods (0)

No public methods.

New fields (10)
  • carrier_id Many2one → delivery.carrier
    check_company=True string='Carrier' args: 'delivery.carrier'
  • carrier_price Float
    string='Shipping Cost'
  • carrier_tracking_ref Char
    copy=False string='Tracking Reference'
  • carrier_tracking_url Char
    compute='_compute_carrier_tracking_url' string='Tracking URL'
  • delivery_type Selection
    readonly=True related='carrier_id.delivery_type'
  • destination_country_code Char
    related='partner_id.country_id.code' string='Destination Country'
  • is_return_picking Boolean
    compute='_compute_return_picking'
  • return_label_ids One2many → ir.attachment
    compute='_compute_return_label' args: 'ir.attachment'
  • weight Float
    compute='_cal_weight' compute_sudo=True digits='Stock Weight' help='Total weight of the products in the picking.' store=True
  • weight_uom_name Char
    compute='_compute_weight_uom_name' default=_get_default_weight_uom readonly=True string='Weight unit of measure label'
Public methods (6)
  • button_validate(self)
  • cancel_shipment(self)
  • get_multiple_carrier_tracking(self)
  • open_website_url(self)
  • print_return_label(self)
  • send_to_shipper(self)

New fields (4)
  • weight Float
    compute='_compute_weight' digits='Stock Weight' help='Total weight of all the products contained in the package.'
  • weight_is_kg Boolean
    compute='_compute_weight_is_kg' args: 'Technical field indicating whether weight uom is kg or not (i.e. lb)'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' default=_get_default_weight_uom readonly=True string='Weight unit of measure label'
  • weight_uom_rounding Float
    compute='_compute_weight_is_kg' args: "Technical field indicating weight's number of decimal places"
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • shipping_selectable Boolean
    args: 'Applicable on Shipping Methods'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/stock_delivery
VERSION
VERSION 1.0
CATEGORY
CATEGORYInventory/Delivery
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Xavier Morel, Odoo Online, Arnold Moyaux, Victor Feyens, Andrea Grazioso (agr-odoo), William Henrotin, Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Pierre Paridans, Miquel Raïch, Ahmad Khanalizadeh, william-andre, bat-odoo, Walid HANNICHE (waha), Mathieu Walravens, Gaetan Vanden Bergh (gavb), Walid, Hamza (hisl), Djamel Touati, Pieter Claeys (clpi), Valentin Vallaeys (vava), Dylan Kiss (dyki), kir-odoo, Surabhi Varma, adda-odoo, Nicolas Viseur (vin), Eteil Djoumatchoua(etdj), Ethan Vincent, lase@odoo.com, bary, Richard Prosser, Julien Carion (juca), Louis (wil), asno-odoo, Mohammad Abdulmoneim (abdu), djameltouati, fd-oerp, Parth Solanki(PASO), srap-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - sale_stock
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - delivery
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Allows you to add delivery methods in pickings.
===============================================

When creating invoices from picking, the system is able to add and compute the shipping line.

Code Analysis

Views touched (26)
XML IDNameModelTypeStatus
choose_delivery_carrier_view_form choose.delivery.carrier.form choose.delivery.carrier xpath Inherits delivery.choose_delivery_carrier_view_form
choose_delivery_package_view_form choose.delivery.package.form choose.delivery.package form New
delivery_stock_report_delivery_no_package_section_line delivery_stock_report_delivery_no_package_section_line ir.ui.view qweb Inherits stock.stock_report_delivery_no_package_section_line
delivery_tracking_url_warning_form delivery.carrier.warning.url.form stock.picking form New
label_package_template_view_delivery label_package_template_view_delivery ir.ui.view qweb Inherits stock.label_package_template_view
product_template_hs_code product.template.form.hs_code product.template xpath Inherits product.product_template_form_view
report_delivery_document2 report_delivery_document2 ir.ui.view qweb Inherits stock.report_delivery_document
report_package_barcode_delivery report_package_barcode_delivery ir.ui.view qweb Inherits stock.report_package_barcode
report_package_barcode_small_delivery report_package_barcode_small_delivery ir.ui.view qweb Inherits stock.report_package_barcode_small
report_shipping2 report_shipping2 ir.ui.view qweb Inherits stock.report_picking
sale_order_portal_content_inherit_sale_stock_inherit_website_sale Shipping tracking on orders followup ir.ui.view qweb Inherits sale_stock.sale_order_portal_content_inherit_sale_stock
stock_location_route_view_form_inherit_stock_delivery stock.route.form stock.route xpath Inherits stock.stock_location_route_form_view
stock_move_line_view_search_delivery stock.move.line.search.delivery stock.move.line xpath Inherits stock.stock_move_line_view_search
stock_package_type_form_delivery stock.package.type.form.delivery stock.package.type xpath Inherits stock.stock_package_type_form
stock_package_type_tree_delivery stock.package.type.tree.delivery stock.package.type xpath Inherits stock.stock_package_type_tree
stock_report_delivery_aggregated_move_lines_inherit_delivery stock_report_delivery_aggregated_move_lines_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_aggregated_move_lines
stock_report_delivery_has_serial_move_line_inherit_delivery stock_report_delivery_has_serial_move_line_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_has_serial_move_line
stock_report_delivery_package_section_line_inherit_delivery stock_report_delivery_package_section_line_inherit_delivery ir.ui.view qweb Inherits stock.stock_report_delivery_package_section_line
view_delivery_carrier_form_inherit_stock_delivery delivery.carrier.form delivery.carrier xpath Inherits delivery.view_delivery_carrier_form
view_move_line_tree_detailed_delivery stock.move.line.tree.detailed stock.move.line xpath Inherits stock.view_move_line_tree_detailed
view_picking_type_form_delivery stock.picking.type.tree.delivery stock.picking.type xpath Inherits stock.view_picking_type_form
view_picking_withcarrier_out_form delivery.stock.picking_withcarrier.form.view stock.picking data Inherits stock.view_picking_form
view_picking_withweight_internal_move_form stock.picking_withweight.internal.move.form.view stock.move xpath Inherits stock.view_move_form
view_quant_package_weight_form stock.quant.package.weight.form stock.quant.package field Inherits stock.view_quant_package_form
view_stock_rule_form_delivery stock.rule.tree.delivery stock.rule xpath Inherits stock.view_stock_rule_form
vpicktree_view_tree stock.picking.delivery.tree.inherit.delivery stock.picking xpath Inherits stock.vpicktree
Models touched (13)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (5)
  • company_id Many2one
    related='picking_id.company_id'
  • delivery_package_type_id Many2one → stock.package.type
    check_company=True args: 'stock.package.type', 'Delivery Package Type'
  • picking_id Many2one → stock.picking
    args: 'stock.picking', 'Picking'
  • shipping_weight Float
    compute='_compute_shipping_weight' readonly=False store=True args: 'Shipping Weight'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' string='Weight unit of measure label'
Public methods (1)
  • action_put_in_pack(self)

New fields (2)
  • invoice_policy Selection
    help='Estimated Cost: the customer will be invoiced the estimated cost of the shipping.\nReal Cost: the customer will be invoiced the real cost of the shipping, the cost of theshipping will be updated on the SO after the delivery.' ondelete={'real': 'set default'} selection_add=[('real', 'Real cost')]
  • route_ids Many2many → stock.route
    domain=[('shipping_selectable', '=', True)] args: 'stock.route', 'stock_route_shipping', 'shipping_id', 'route_id', 'Routes'
Public methods (11)
  • base_on_rule_cancel_shipment(self, pickings)
  • base_on_rule_get_tracking_link(self, picking)
  • base_on_rule_send_shipping(self, pickings)
  • cancel_shipment(self, pickings)
    Cancel a shipment :param pickings: A recordset of pickings
  • fixed_cancel_shipment(self, pickings)
  • fixed_get_tracking_link(self, picking)
  • fixed_send_shipping(self, pickings)
  • get_return_label(self, pickings, tracking_number=None, origin_date=None)
  • get_return_label_prefix(self)
  • get_tracking_link(self, picking)
    Ask the tracking link to the service provider :param picking: record of stock.picking :return str: an URL containing the tracking link or False
  • send_shipping(self, pickings)
    Send the package to the service provider :param pickings: A recordset of pickings :return list: A list of dictionaries (one per picking) containing of the form:: { 'exact_price': price, 'tracking_number': number } # TODO missing labels per package # TODO missing currency # TODO missing success, error, warnings

New fields (2)
  • country_of_origin Many2one → res.country
    help="Rules of origin determine where goods originate, i.e. not where they have been shipped from, but where they have been produced or manufactured.\nAs such, the ‘origin’ is the 'economic nationality' of goods traded in commerce." args: 'res.country', 'Origin of Goods'
  • hs_code Char
    help='Standardized code for international shipping and goods declaration. At the moment, only used for FedEx and USPS shipping providers.' string='HS Code'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • set_delivery_line(self, carrier, amount)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • weight Float
    compute='_cal_move_weight' compute_sudo=True digits='Stock Weight' store=True
Public methods (0)

No public methods.

New fields (3)
  • carrier_id Many2one
    related='picking_id.carrier_id' store=True
  • destination_country_code Char
    related='picking_id.destination_country_code'
  • sale_price Float
    compute='_compute_sale_price'
Public methods (0)

No public methods.

New fields (2)
  • package_carrier_type Selection
    default='none' string='Carrier' args: [('none', 'No carrier integration')]
  • shipper_package_code Char
    args: 'Carrier Code'
Public methods (0)

No public methods.

New fields (13)
  • carrier_id Many2one → delivery.carrier
    check_company=True string='Carrier' args: 'delivery.carrier'
  • carrier_price Float
    string='Shipping Cost'
  • carrier_tracking_ref Char
    copy=False string='Tracking Reference'
  • carrier_tracking_url Char
    compute='_compute_carrier_tracking_url' string='Tracking URL'
  • delivery_type Selection
    readonly=True related='carrier_id.delivery_type'
  • destination_country_code Char
    related='partner_id.country_id.code' string='Destination Country'
  • is_return_picking Boolean
    compute='_compute_return_picking'
  • package_ids Many2many → stock.quant.package
    compute='_compute_packages' string='Packages' args: 'stock.quant.package'
  • return_label_ids One2many → ir.attachment
    compute='_compute_return_label' args: 'ir.attachment'
  • shipping_weight Float
    compute='_compute_shipping_weight' help="Total weight of packages and products not in a package. Packages with no shipping weight specified will default to their products' total weight. This is the weight used to compute the cost of the shipping." args: 'Weight for Shipping'
  • weight Float
    compute='_cal_weight' compute_sudo=True digits='Stock Weight' help='Total weight of the products in the picking.' store=True
  • weight_bulk Float
    compute='_compute_bulk_weight' help='Total weight of products which are not in a package.' args: 'Bulk Weight'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' default=_get_default_weight_uom readonly=True string='Weight unit of measure label'
Public methods (5)
  • cancel_shipment(self)
  • get_multiple_carrier_tracking(self)
  • open_website_url(self)
  • print_return_label(self)
  • send_to_shipper(self)

New fields (5)
  • shipping_weight Float
    help='Total weight of the package.' string='Shipping Weight'
  • weight Float
    compute='_compute_weight' digits='Stock Weight' help='Total weight of all the products contained in the package.'
  • weight_is_kg Boolean
    compute='_compute_weight_is_kg' args: 'Technical field indicating whether weight uom is kg or not (i.e. lb)'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' default=_get_default_weight_uom readonly=True string='Weight unit of measure label'
  • weight_uom_rounding Float
    compute='_compute_weight_is_kg' args: "Technical field indicating weight's number of decimal places"
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • shipping_selectable Boolean
    args: 'Applicable on Shipping Methods'
Public methods (0)

No public methods.