Base module for carrier labels
base_delivery_carrier_label · OCA/delivery-carrier
-
Security25/25No findings
-
Activity12/25Last human commit 19 months ago
-
Required by20/253 modules depend on it
-
Maturity25/25In 11 Odoo series since 7.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
delivery_carrier_template_option_view_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). (2 occurrences in this file) migration-view-tree-tag · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
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.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- delivery_carrier_global_manifest, delivery_cbl, delivery_roulier
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 12
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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
-
available_option_idsOne2many → delivery.carrier.optioncomodel_name='delivery.carrier.option'context={'active_test': False}inverse_name='carrier_id'string='Option'
-
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
-
activeBooleandefault=True -
by_defaultBooleanhelp='By check, user can choose to apply this option to each Delivery Order\n using this delivery method'string='Applied by Default' -
carrier_idMany2one → delivery.carriercomodel_name='delivery.carrier'string='Carrier' -
colorIntegercompute='_compute_color'help='Orange if the option is mandatory, otherwise no color' -
mandatoryBooleanhelp='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_flagBooleanhelp='When True, help to prevent the user to modify some fields option (if attribute is defined in the view)' -
tmpl_option_idMany2one → delivery.carrier.template.optioncomodel_name='delivery.carrier.template.option'ondelete='cascade'required=Truestring='Option'
No public methods.
-
codeChar -
descriptionCharhelp='Allow to define a more complete description than in the name field.' -
nameChar -
partner_idMany2one → res.partnercomodel_name='res.partner'string='Partner Carrier'
No public methods.
-
carrier_idMany2one → delivery.carriercomodel_name='delivery.carrier'required=Truestring='Carrier' -
file_outBinaryargs: 'Manifest' -
filenameCharargs: 'File Name' -
from_dateDatetimerequired=True -
notesTextargs: 'Result' -
stateSelectiondefault='init' args: [('init', 'Init'), ('file', 'File'), ('end', 'END')] -
to_dateDatetime
-
get_manifest_file(self)
-
delivery_set_default_packageBooleandefault=Truestring='Default Packages'
No public methods.
-
delivery_set_default_packageBooleanreadonly=Falserelated='company_id.delivery_set_default_package'
No public methods.
-
attachment_idMany2one → ir.attachmentcomodel_name='ir.attachment'ondelete='cascade'required=Truestring='Attachement' -
file_typeChardefault='pdf'string='File type' -
package_idMany2one → stock.quant.packagecomodel_name='stock.quant.package'string='Pack'
No public methods.
-
weightFloatdigits='Stock Weight'help='Weight of the pack_operation'
-
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]
-
carrier_codeCharreadonly=Truerelated='carrier_id.code' -
carrier_idMany2one → delivery.carriercomodel_name='delivery.carrier'string='Carrier' -
option_idsMany2many → delivery.carrier.optioncomodel_name='delivery.carrier.option'string='Options'
-
attach_shipping_label(self, label)Attach a label returned by generate_shipping_labels to a picking -
create(self, vals_list)@api.model_create_multiTrigger 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.
-
parcel_trackingChar -
parcel_tracking_uriCharhelp="Link to the carrier's tracking page for this package."
-
open_website_url(self)Implement you own action in your module
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…