Repository
OCA/delivery-carrier · module folder · Try on Runboat
Module version
1.1.0
Category
Delivery
Folder size
1.47 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/delivery-carrier
Last tracking update
2026-08-07 08:22:58
Authors
Camptocamp, Akretion, Odoo Community Association (OCA)
Maintainers
Camptocamp
Committers
Alexandre Fayolle, Maksym Yankin, sygel, Weblate, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
delivery_carrier_global_manifest, delivery_cbl, delivery_roulier
Description
This module adds some function and generic stuff to help for carrier
label generation. For example it adds the concept of option on carriers
that can differ depending on the picking or class to store carrier
accounts This module doesn't do anything by itself, it serves as a base
module for other carrier-specific modules.

Code Analysis

Views touched (12)
XML IDNameModelTypeStatus
delivery_carrier_option_view_form delivery_base.delivery_carrier_option.view_form delivery.carrier.option form New
delivery_carrier_option_view_tree delivery_base.delivery_carrier_option.view_tree delivery.carrier.option tree New
delivery_carrier_template_option_view_form delivery_base.delivery_carrier_option.view_form delivery.carrier.template.option form New
delivery_carrier_template_option_view_tree delivery_base.delivery_carrier_template_option.view_tree delivery.carrier.template.option tree New
manifest_wizard_form manifest.wizard.form manifest.wizard form New
quant_package_search_view stock.quant.package search Inherits stock.quant_package_search_view
res_config_settings_view_form_inherit_delivery_carrier_label res.config.settings.view.form.inherit.delivery.carrier.label res.config.settings form Inherits stock.res_config_settings_view_form
view_delivery_carrier_form delivery_base.delivery.carrier.view_form delivery.carrier form Inherits delivery.view_delivery_carrier_form
view_picking_withcarrier_out_form stock.picking form Inherits stock_delivery.view_picking_withcarrier_out_form
view_quant_package_form stock.quant.package form Inherits stock.view_quant_package_form
view_quant_package_tree stock.quant.package tree Inherits stock.view_quant_package_tree
vpicktree stock.picking tree Inherits stock_delivery.vpicktree_view_tree
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (10)

New fields (1)
  • available_option_ids One2many → delivery.carrier.option
    comodel_name='delivery.carrier.option' context={'active_test': False} inverse_name='carrier_id' string='Option'
Public methods (3)
  • alternative_send_shipping(self, pickings)
  • default_options(self)
    Returns default and available options for a carrier
  • send_shipping(self, pickings)
    Handle labels and if we have them. Expected format is {'labels': [{}, ...]} The dicts are input for stock.picking#attach_label

New fields (7)
  • active Boolean
    default=True
  • by_default Boolean
    help='By check, user can choose to apply this option to each Delivery Order\n using this delivery method' string='Applied by Default'
  • carrier_id Many2one → delivery.carrier
    comodel_name='delivery.carrier' string='Carrier'
  • color Integer
    compute='_compute_color' help='Orange if the option is mandatory, otherwise no color'
  • mandatory Boolean
    help='If checked, this option is necessarily applied to the delivery order. Mandatory options show up in orange in the option widget on the picking.'
  • readonly_flag Boolean
    help='When True, help to prevent the user to modify some fields option (if attribute is defined in the view)'
  • tmpl_option_id Many2one → delivery.carrier.template.option
    comodel_name='delivery.carrier.template.option' ondelete='cascade' required=True string='Option'
Public methods (0)

No public methods.

New fields (4)
  • code Char
  • description Char
    help='Allow to define a more complete description than in the name field.'
  • name Char
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Partner Carrier'
Public methods (0)

No public methods.

New fields (7)
  • carrier_id Many2one → delivery.carrier
    comodel_name='delivery.carrier' required=True string='Carrier'
  • file_out Binary
    args: 'Manifest'
  • filename Char
    args: 'File Name'
  • from_date Datetime
    required=True
  • notes Text
    args: 'Result'
  • state Selection
    default='init' args: [('init', 'Init'), ('file', 'File'), ('end', 'END')]
  • to_date Datetime
Public methods (1)
  • get_manifest_file(self)

New fields (1)
  • delivery_set_default_package Boolean
    default=True string='Default Packages'
Public methods (0)

No public methods.

New fields (1)
  • delivery_set_default_package Boolean
    readonly=False related='company_id.delivery_set_default_package'
Public methods (0)

No public methods.

New fields (3)
  • attachment_id Many2one → ir.attachment
    comodel_name='ir.attachment' ondelete='cascade' required=True string='Attachement'
  • file_type Char
    default='pdf' string='File type'
  • package_id Many2one → stock.quant.package
    comodel_name='stock.quant.package' string='Pack'
Public methods (0)

No public methods.

New fields (1)
  • weight Float
    digits='Stock Weight' help='Weight of the pack_operation'
Public methods (1)
  • get_weight(self)
    Calc and save weight of pack.operations. Warning: Type conversion not implemented it will return False if at least one uom or uos not in kg return: the sum of the weight of [self]

New fields (3)
  • carrier_code Char
    readonly=True related='carrier_id.code'
  • carrier_id Many2one → delivery.carrier
    comodel_name='delivery.carrier' string='Carrier'
  • option_ids Many2many → delivery.carrier.option
    comodel_name='delivery.carrier.option' string='Options'
Public methods (7)
  • attach_shipping_label(self, label)
    Attach a label returned by generate_shipping_labels to a picking
  • create(self, vals_list)
    @api.model_create_multi
    Trigger onchange_carrier_id on create To ensure options are setted on the basis of carrier_id copied from Sale order or defined by default.
  • get_shipping_label_values(self, label)
  • onchange_carrier_id(self)
    @api.onchange('carrier_id')
    Inherit this method in your module
  • onchange_option_ids(self)
    @api.onchange('option_ids')
  • send_to_shipper(self)
  • write(self, vals)
    Set the default options when the delivery method is changed. So we are sure that the options are always in line with the current delivery method.

New fields (2)
  • parcel_tracking Char
  • parcel_tracking_uri Char
    help="Link to the carrier's tracking page for this package."
Public methods (1)
  • open_website_url(self)
    Implement you own action in your module

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…