PostLogistics Shipping - “Barcode” web service

delivery_postlogistics
REPOSITORY
REPOSITORYOCA/delivery-carrier
GIT
GIThttps://github.com/OCA/delivery-carrier.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/delivery-carrier/tree/18.0/delivery_postlogistics
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYDelivery
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSGuewen Baconnier, Akim Juillerat, Weblate, OCA-git-bot, Simone Orsi, oca-ci, Maksym Yankin, Mmequignon, Camille Morand, Bhavesh Heliconia, Hadrien Huvelle
WEBSITE
WEBSITEhttps://github.com/OCA/delivery-carrier
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:16
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/delivery-carrier:
    - delivery_carrier_info
    - delivery_carrier_option
    - delivery_carrier_shipping_label
odoo/odoo:
    - stock_delivery
    - 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 openupgradelib
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module uses [PostLogistics BarCodes
WebService](https://www.post.ch/en/business/a-z-of-subjects/dropping-off-mail-items/business-sending-letters/sending-consignments-web-service-barcode)
to generate labels for your Delivery Orders.

It adds a Create label button on Delivery Orders. A generated label will
be an attachement of your Delivery Order.

To see it, please install documents module.

You can create multiple delivery method to match your diffent package
types.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
delivery_carrier_postlogistics_inherit_view delivery.carrier page Inherits delivery.view_delivery_carrier_form
postlogistics_license_view_list postlogistics.license.list.view postlogistics.license list New
stock_package_type_form_delivery stock.package.type field Inherits stock_delivery.stock_package_type_form_delivery
view_partner_property_form res.partner field Inherits delivery.view_partner_property_form
view_picking_withcarrier_out_form stock.picking field Inherits stock_delivery.view_picking_withcarrier_out_form
view_quant_package_form stock.quant.package field Inherits stock.view_quant_package_form
Models touched (9)

New fields (14)
  • delivery_type Selection
    ondelete={'postlogistics': 'set default'} selection_add=[('postlogistics', 'PostLogistics')]
  • postlogistics_client_id Char
    groups='base.group_system' string='Client ID'
  • postlogistics_client_secret Char
    groups='base.group_system' string='Client Secret'
  • postlogistics_default_package_type_id Many2one → stock.package.type
    default=<expr> domain=[('package_carrier_type', '=', 'postlogistics')] args: 'stock.package.type'
  • postlogistics_endpoint_url Char
    required=False string='Endpoint URL'
  • postlogistics_label_layout Many2one → delivery.carrier.template.option
    comodel_name='delivery.carrier.template.option' domain=[('type', '=', 'label_layout')] string='Label layout'
  • postlogistics_license_id Many2one → postlogistics.license
    comodel_name='postlogistics.license' string='Franking License'
  • postlogistics_logo Binary
    help='Optional company logo to show on label.\nIf using an image / logo, please note the following:\n– Image width: 47 mm\n– Image height: 25 mm\n– File size: max. 30 kb\n– File format: GIF or PNG\n– Colour table: indexed colours, max. 200 colours\n– The logo will be printed rotated counter-clockwise by 90°\nWe recommend using a black and white logo for printing in the ZPL2 format.' string='Company Logo on Post labels'
  • postlogistics_office Char
    help='Post office which will receive the shipped goods' string='Domicile Post office'
  • postlogistics_output_format Many2one → delivery.carrier.template.option
    comodel_name='delivery.carrier.template.option' domain=[('type', '=', 'output_format')] string='Output format'
  • postlogistics_proclima_logo Boolean
    help='The “pro clima” logo indicates an item for which the surcharge for carbon-neutral shipping has been paid and a contract to that effect has been signed. For Letters with barcode (BMB) domestic, the ProClima logo is printed automatically (at no additional charge)' args: 'Print ProClima logo'
  • postlogistics_resolution Many2one → delivery.carrier.template.option
    comodel_name='delivery.carrier.template.option' domain=[('type', '=', 'resolution')] string='Resolution'
  • postlogistics_tracking_format Selection
    default='postlogistics' help='Allows you to define how the ItemNumber (the last 8 digits) of the tracking number will be generated:\n- Default postlogistics numbers: The webservice generates it for you.\n- Picking number with pack counter: Generate it using the digits of picking name and add the pack number. 2 digits forpack number and 6 digits for picking number. (eg. 07000042 for picking 42 and 7th pack' string='Tracking number format' args: [('postlogistics', 'Use default postlogistics tracking numbers'), ('picking_num', 'Use picking number with pack counter')]
  • zpl_patch_string Char
    default='^XA^CW0,E:TT0003M_.TTF^XZ^XA^CI28' string='ZPL Patch String'
Public methods (6)
  • postlogistics_cancel_shipment(self, pickings)
  • postlogistics_get_return_label(self, picking, tracking_number=None, origin_date=None)
  • postlogistics_get_tracking_link(self, picking)
  • postlogistics_rate_shipment(self, order)
  • postlogistics_send_shipping(self, pickings)
    It will generate the labels for all the packages of the picking. Packages are mandatory in this case
  • verify_credentials(self)

New fields (1)
  • type Selection
    ondelete={'label_layout': 'set default', 'output_format': 'set default', 'resolution': 'set default'} selection_add=['basic', ('label_layout', 'Label Layout'), ('output_format', 'Output Format'), ('resolution', 'Output Resolution')]
Public methods (0)

No public methods.

New fields (4)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True string='Company'
  • name Char
    required=True translate=True
  • number Char
    required=True
  • sequence Integer
    help='Gives the sequence on company to define priority on license when multiple licenses are available for the same group of service.'
Public methods (0)

No public methods.

New fields (2)
  • delivery_carrier_template_option_ids Many2many → delivery.carrier.template.option
    column1='partner_id' column2='option_id' relation='delivery_carrier_template_options_res_partners_rel' string='Postlogistics Options' args: 'delivery.carrier.template.option'
  • postlogistics_notification Selection
    default='disabled' args: [('disabled', 'Disabled'), ('email', 'Email'), ('sms', 'Mobile SMS'), ('phone', 'Phone Call')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • package_carrier_type Selection
    ondelete={'postlogistics': 'set default'} selection_add=[('postlogistics', 'PostLogistics')]
Public methods (0)

No public methods.

New fields (4)
  • delivery_fixed_date Date
    help='Specific delivery date (ZAW3217)' args: 'Fixed delivery date'
  • delivery_mobile Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Mobile'
  • delivery_phone Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Phone'
  • delivery_place Char
    help='For Deposit item service (ZAW3219)'
Public methods (13)
  • action_generate_carrier_label(self)
  • attach_shipping_label(self, label)
    Attach a label returned by generate_shipping_labels to a picking
  • generate_postlogistics_shipping_labels(self, packages=None)
    Add label generation for PostLogistics
  • get_package_number_hook(self, package)
    Hook method to customize the package number retrieval
  • get_recipient_partner_hook(self)
    Hook method to customize the partner retrieval
  • info_from_label(self, label, zpl_patch_string=False, package_id=False)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a picking If the picking delivers the whole sales order, we use the total amount of the sales order. Otherwise, we don't know the value of each picking so we raise an error. The user has to create packages with the cash on delivery price on each package.
  • postlogistics_label_cash_on_delivery(self, package=None)
  • postlogistics_label_get_item_additional_data(self, package=None)
  • postlogistics_label_prepare_attributes(self, pack=None, pack_num=None, pack_total=None, pack_weight=None)
    This method aims to prepare a dictionary of attributes to be sent to the PostLogistics API
  • postlogistics_label_prepare_customer(self)
    Create a ns0:Customer as a dict from picking This is the PostLogistics Customer, thus the sender :param picking: picking browse record :return a dict containing data for ns0:Customer
  • postlogistics_label_prepare_recipient(self, sanitize_mapping=None)
    Create a ns0:Recipient as a dict from a partner :param partner: partner browse record :return a dict containing data for ns0:Recipient
  • write_tracking_number_label(self, label_result, packages)
    If there are no pack defined, write tracking_number on picking otherwise, write it on parcel_tracking field of each pack. Note we can receive multiple labels for a same package

New fields (3)
  • package_carrier_type Selection
    related='package_type_id.package_carrier_type' string="Packaging's Carrier"
  • parcel_tracking Char
  • postlogistics_manual_cod_amount Float
    help='If the cash on delivery amount for this package is different than the total of the sales order, write the amount there.' args: 'PostLogistics Cash On Delivery Amount'
Public methods (1)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a package If we have only 1 package which delivers the whole sales order we use the total amount of the sales order. Otherwise we don't know the value of each package so we raise an error and the user has to write the prices on the packages. When a price is manually set on a package, it's always used as the cash on delivery amount.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/delivery-carrier
GIT
GIThttps://github.com/OCA/delivery-carrier.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/delivery-carrier/tree/16.0/delivery_postlogistics
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYDelivery
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSAkim Juillerat, Sébastien Alix, Weblate, OCA-git-bot, Rodrigo, Anna Janiszewska, oca-ci, duongtq, Henry Backman, ilo, sonhd91, JL, lehoangan1988
WEBSITE
WEBSITEhttps://github.com/OCA/delivery-carrier
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:53
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - delivery
    - sale_stock
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
    - stock_account
    - stock
    - barcodes_gs1_nomenclature
    - barcodes
    - sale_management
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
delivery_carrier_postlogistics_inherit_view delivery.carrier.postlogistics.inherit.view delivery.carrier page Inherits delivery.view_delivery_carrier_form
postlogistics_license_view_list postlogistics.license.view_list postlogistics.license tree New
postlogistics_res_partner_inherit_form postlogistics.res.partner.inherit.form res.partner field Inherits delivery.view_partner_property_form
stock_package_type_form_delivery stock.package.type.form.inherit stock.package.type field Inherits delivery.stock_package_type_form_delivery
stock_quant_package_postlogistics_inherit_form stock.quant.package.postlogistics.inherit.form stock.quant.package field Inherits stock.view_quant_package_form
view_picking_withcarrier_out_form stock.picking field Inherits delivery.view_picking_withcarrier_out_form
Models touched (10)

New fields (14)
  • delivery_type Selection
    ondelete={'postlogistics': 'set default'} selection_add=[('postlogistics', 'PostLogistics')]
  • postlogistics_client_id Char
    groups='base.group_system' string='Client ID'
  • postlogistics_client_secret Char
    groups='base.group_system' string='Client Secret'
  • postlogistics_default_package_type_id Many2one → stock.package.type
    domain=[('package_carrier_type', '=', 'postlogistics')] args: 'stock.package.type'
  • postlogistics_endpoint_url Char
    default='https://wedecint.post.ch/' required=True string='Endpoint URL'
  • postlogistics_label_layout Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'label_layout')] string='Label layout'
  • postlogistics_license_id Many2one → postlogistics.license
    comodel_name='postlogistics.license' string='Franking License'
  • postlogistics_logo Binary
    help='Optional company logo to show on label.\nIf using an image / logo, please note the following:\n– Image width: 47 mm\n– Image height: 25 mm\n– File size: max. 30 kb\n– File format: GIF or PNG\n– Colour table: indexed colours, max. 200 colours\n– The logo will be printed rotated counter-clockwise by 90°\nWe recommend using a black and white logo for printing in the ZPL2 format.' string='Company Logo on Post labels'
  • postlogistics_office Char
    help='Post office which will receive the shipped goods' string='Domicile Post office'
  • postlogistics_output_format Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'output_format')] string='Output format'
  • postlogistics_proclima_logo Boolean
    help='The “pro clima” logo indicates an item for which the surcharge for carbon-neutral shipping has been paid and a contract to that effect has been signed. For Letters with barcode (BMB) domestic, the ProClima logo is printed automatically (at no additional charge)' args: 'Print ProClima logo'
  • postlogistics_resolution Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'resolution')] string='Resolution'
  • postlogistics_tracking_format Selection
    default='postlogistics' help='Allows you to define how the ItemNumber (the last 8 digits) of the tracking number will be generated:\n- Default postlogistics numbers: The webservice generates it for you.\n- Picking number with pack counter: Generate it using the digits of picking name and add the pack number. 2 digits forpack number and 6 digits for picking number. (eg. 07000042 for picking 42 and 7th pack' string='Tracking number format' args: [('postlogistics', 'Use default postlogistics tracking numbers'), ('picking_num', 'Use picking number with pack counter')]
  • zpl_patch_string Char
    default='^XA^CW0,E:TT0003M_.TTF^XZ^XA^CI28' string='ZPL Patch String'
Public methods (7)
  • onchange_prod_environment(self)
    @api.onchange('prod_environment')
    Auto change the end point url following the environment - Test: https://wedecint.post.ch/ - Prod: https://wedec.post.ch/
  • postlogistics_cancel_shipment(self, pickings)
  • postlogistics_get_return_label(self, picking, tracking_number=None, origin_date=None)
  • postlogistics_get_tracking_link(self, picking)
  • postlogistics_rate_shipment(self, order)
  • postlogistics_send_shipping(self, pickings)
    It will generate the labels for all the packages of the picking. Packages are mandatory in this case
  • verify_credentials(self)

New fields (5)
  • code Char
  • description Char
    help='Allow to define a more complete description than in the name field.'
  • name Char
    translate=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Carrier'
  • postlogistics_type Selection
    selection=POSTLOGISTICS_TYPES string='PostLogistics option type'
Public methods (0)

No public methods.

New fields (4)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True string='Company'
  • name Char
    required=True translate=True
  • number Char
    required=True
  • sequence Integer
    help='Gives the sequence on company to define priority on license when multiple licenses are available for the same group of service.'
Public methods (0)

No public methods.

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

No public methods.

New fields (2)
  • postlogistics_notification Selection
    default='disabled' args: [('disabled', 'Disabled'), ('email', 'Email'), ('sms', 'Mobile SMS'), ('phone', 'Phone Call')]
  • postlogistics_option_ids Many2many → postlogistics.delivery.carrier.template.option
    column1='partner_id' column2='option_id' relation='postlogistics_options_partner_rel' string='PostLogistics Options' args: 'postlogistics.delivery.carrier.template.option'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • package_carrier_type Selection
    selection_add=[('postlogistics', 'PostLogistics')]
Public methods (0)

No public methods.

New fields (4)
  • delivery_fixed_date Date
    help='Specific delivery date (ZAW3217)' args: 'Fixed delivery date'
  • delivery_mobile Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Mobile'
  • delivery_phone Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Phone'
  • delivery_place Char
    help='For Deposit item service (ZAW3219)'
Public methods (7)
  • action_generate_carrier_label(self)
  • attach_shipping_label(self, label)
    Attach a label returned by generate_shipping_labels to a picking
  • generate_postlogistics_shipping_labels(self, package_ids=None)
    Add label generation for PostLogistics
  • get_shipping_label_values(self, label)
  • info_from_label(self, label, zpl_patch_string=False)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a picking If the picking delivers the whole sales order, we use the total amount of the sales order. Otherwise, we don't know the value of each picking so we raise an error. The user has to create packages with the cash on delivery price on each package.
  • write_tracking_number_label(self, label_result, packages)
    If there are no pack defined, write tracking_number on picking otherwise, write it on parcel_tracking field of each pack. Note we can receive multiple labels for a same package

New fields (3)
  • package_carrier_type Selection
    related='package_type_id.package_carrier_type' string="Packaging's Carrier"
  • parcel_tracking Char
  • postlogistics_manual_cod_amount Float
    help='If the cash on delivery amount for this package is different than the total of the sales order, write the amount there.' args: 'PostLogistics Cash On Delivery Amount'
Public methods (1)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a package If we have only 1 package which delivers the whole sales order we use the total amount of the sales order. Otherwise we don't know the value of each package so we raise an error and the user has to write the prices on the packages. When a price is manually set on a package, it's always used as the cash on delivery amount.

New fields (0)

No new fields.

Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/delivery-carrier
GIT
GIThttps://github.com/OCA/delivery-carrier.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/delivery-carrier/tree/14.0/delivery_postlogistics
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYDelivery
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSGuewen Baconnier, Sébastien Alix, oca-travis, Weblate, OCA-git-bot, Simone Orsi, oca-ci, Matthieu Méquignon, Hai Lang, oca-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/delivery-carrier
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - delivery
    - sale_stock
    - 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
    - stock_account
    - stock
    - barcodes
    - sale_management
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
delivery_carrier_postlogistics_inherit_view delivery.carrier.postlogistics.inherit.view delivery.carrier page Inherits delivery.view_delivery_carrier_form
postlogistics_license_view_list postlogistics.license.view_list postlogistics.license tree New
postlogistics_res_partner_inherit_form postlogistics.res.partner.inherit.form res.partner field Inherits delivery.view_partner_property_form
product_packaging_delivery_form product.packaging.form.inherit product.packaging field Inherits delivery.product_packaging_delivery_form
stock_quant_package_postlogistics_inherit_form stock.quant.package.postlogistics.inherit.form stock.quant.package field Inherits stock.view_quant_package_form
view_picking_withcarrier_out_form stock.picking xpath Inherits delivery.view_picking_withcarrier_out_form
Models touched (9)

New fields (14)
  • delivery_type Selection
    ondelete={'postlogistics': 'set default'} selection_add=[('postlogistics', 'PostLogistics')]
  • postlogistics_client_id Char
    groups='base.group_system' string='Client ID'
  • postlogistics_client_secret Char
    groups='base.group_system' string='Client Secret'
  • postlogistics_default_packaging_id Many2one → product.packaging
    domain=[('package_carrier_type', '=', 'postlogistics')] args: 'product.packaging'
  • postlogistics_endpoint_url Char
    default='https://wedecint.post.ch/' required=True string='Endpoint URL'
  • postlogistics_label_layout Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'label_layout')] string='Label layout'
  • postlogistics_license_id Many2one → postlogistics.license
    comodel_name='postlogistics.license' string='Franking License'
  • postlogistics_logo Binary
    help='Optional company logo to show on label.\nIf using an image / logo, please note the following:\n– Image width: 47 mm\n– Image height: 25 mm\n– File size: max. 30 kb\n– File format: GIF or PNG\n– Colour table: indexed colours, max. 200 colours\n– The logo will be printed rotated counter-clockwise by 90°\nWe recommend using a black and white logo for printing in the ZPL2 format.' string='Company Logo on Post labels'
  • postlogistics_office Char
    help='Post office which will receive the shipped goods' string='Domicile Post office'
  • postlogistics_output_format Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'output_format')] string='Output format'
  • postlogistics_proclima_logo Boolean
    help='The “pro clima” logo indicates an item for which the surcharge for carbon-neutral shipping has been paid and a contract to that effect has been signed. For Letters with barcode (BMB) domestic, the ProClima logo is printed automatically (at no additional charge)' args: 'Print ProClima logo'
  • postlogistics_resolution Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'resolution')] string='Resolution'
  • postlogistics_tracking_format Selection
    default='postlogistics' help='Allows you to define how the ItemNumber (the last 8 digits) of the tracking number will be generated:\n- Default postlogistics numbers: The webservice generates it for you.\n- Picking number with pack counter: Generate it using the digits of picking name and add the pack number. 2 digits forpack number and 6 digits for picking number. (eg. 07000042 for picking 42 and 7th pack' string='Tracking number format' args: [('postlogistics', 'Use default postlogistics tracking numbers'), ('picking_num', 'Use picking number with pack counter')]
  • zpl_patch_string Char
    default='^XA^CW0,E:TT0003M_.TTF^XZ^XA^CI28' string='ZPL Patch String'
Public methods (6)
  • onchange_prod_environment(self)
    @api.onchange('prod_environment')
    Auto change the end point url following the environment - Test: https://wedecint.post.ch/ - Prod: https://wedec.post.ch/
  • postlogistics_cancel_shipment(self, pickings)
  • postlogistics_get_tracking_link(self, picking)
  • postlogistics_rate_shipment(self, order)
  • postlogistics_send_shipping(self, pickings)
    It will generate the labels for all the packages of the picking. Packages are mandatory in this case
  • verify_credentials(self)

New fields (5)
  • code Char
  • description Char
    help='Allow to define a more complete description than in the name field.'
  • name Char
    translate=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Carrier'
  • postlogistics_type Selection
    selection=POSTLOGISTICS_TYPES string='PostLogistics option type'
Public methods (0)

No public methods.

New fields (4)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True string='Company'
  • name Char
    required=True string='Description' translate=True
  • number Char
    required=True string='Number'
  • sequence Integer
    help='Gives the sequence on company to define priority on license when multiple licenses are available for the same group of service.' string='Sequence'
Public methods (0)

No public methods.

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

No public methods.

New fields (1)
  • package_carrier_type Selection
    selection_add=[('postlogistics', 'PostLogistics')]
Public methods (0)

No public methods.

New fields (2)
  • postlogistics_notification Selection
    default='disabled' args: [('disabled', 'Disabled'), ('email', 'Email'), ('sms', 'Mobile SMS'), ('phone', 'Phone Call')]
  • postlogistics_option_ids Many2many → postlogistics.delivery.carrier.template.option
    column1='partner_id' column2='option_id' relation='postlogistics_options_partner_rel' string='PostLogistics Options' args: 'postlogistics.delivery.carrier.template.option'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • delivery_fixed_date Date
    help='Specific delivery date (ZAW3217)' args: 'Fixed delivery date'
  • delivery_mobile Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Mobile'
  • delivery_phone Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Phone'
  • delivery_place Char
    help='For Deposit item service (ZAW3219)' args: 'Delivery Place'
Public methods (6)
  • attach_shipping_label(self, label)
    Attach a label returned by generate_shipping_labels to a picking
  • generate_postlogistics_shipping_labels(self, package_ids=None)
    Add label generation for PostLogistics
  • get_shipping_label_values(self, label)
  • info_from_label(self, label, zpl_patch_string=False)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a picking If the picking delivers the whole sales order, we use the total amount of the sales order. Otherwise, we don't know the value of each picking so we raise an error. The user has to create packages with the cash on delivery price on each package.
  • write_tracking_number_label(self, label_result, packages)
    If there are no pack defined, write tracking_number on picking otherwise, write it on parcel_tracking field of each pack. Note we can receive multiple labels for a same package

New fields (3)
  • package_carrier_type Selection
    related='packaging_id.package_carrier_type' string="Packaging's Carrier"
  • parcel_tracking Char
    args: 'Parcel Tracking'
  • postlogistics_manual_cod_amount Float
    help='If the cash on delivery amount for this package is different than the total of the sales order, write the amount there.' string='PostLogistics Cash On Delivery Amount'
Public methods (1)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a package If we have only 1 package which delivers the whole sales order we use the total amount of the sales order. Otherwise we don't know the value of each package so we raise an error and the user has to write the prices on the packages. When a price is manually set on a package, it's always used as the cash on delivery amount.
REPOSITORY
REPOSITORYOCA/delivery-carrier
GIT
GIThttps://github.com/OCA/delivery-carrier.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/delivery-carrier/tree/13.0/delivery_postlogistics
VERSION
VERSION 1.2.1
CATEGORY
CATEGORYDelivery
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONYes
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSSébastien Alix, João Marques, oca-travis, OCA-git-bot, Telmo Santos, Matthieu Méquignon, Tran Thanh Phuc
WEBSITE
WEBSITEhttps://github.com/OCA/delivery-carrier
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:16
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - delivery
    - sale_stock
    - 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
    - stock_account
    - stock
    - barcodes
    - sale_management
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
delivery_carrier_postlogistics_inherit_view delivery.carrier.postlogistics.inherit.view delivery.carrier page Inherits delivery.view_delivery_carrier_form
postlogistics_license_view_list postlogistics.license.view_list postlogistics.license tree New
postlogistics_res_partner_inherit_form postlogistics.res.partner.inherit.form res.partner field Inherits delivery.view_partner_property_form
product_packaging_delivery_form product.packaging.form.inherit product.packaging field Inherits delivery.product_packaging_delivery_form
stock_quant_package_postlogistics_inherit_form stock.quant.package.postlogistics.inherit.form stock.quant.package field Inherits stock.view_quant_package_form
view_picking_withcarrier_out_form stock.picking xpath Inherits delivery.view_picking_withcarrier_out_form
Models touched (9)

New fields (14)
  • delivery_type Selection
    selection_add=[('postlogistics', 'PostLogistics')]
  • postlogistics_client_id Char
    groups='base.group_system' string='Client ID'
  • postlogistics_client_secret Char
    groups='base.group_system' string='Client Secret'
  • postlogistics_default_packaging_id Many2one → product.packaging
    domain=[('package_carrier_type', '=', 'postlogistics')] args: 'product.packaging'
  • postlogistics_endpoint_url Char
    default='https://wedecint.post.ch/' required=True string='Endpoint URL'
  • postlogistics_label_layout Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'label_layout')] string='Label layout'
  • postlogistics_license_id Many2one → postlogistics.license
    comodel_name='postlogistics.license' string='Franking License'
  • postlogistics_logo Binary
    help='Optional company logo to show on label.\nIf using an image / logo, please note the following:\n– Image width: 47 mm\n– Image height: 25 mm\n– File size: max. 30 kb\n– File format: GIF or PNG\n– Colour table: indexed colours, max. 200 colours\n– The logo will be printed rotated counter-clockwise by 90°\nWe recommend using a black and white logo for printing in the ZPL2 format.' string='Company Logo on Post labels'
  • postlogistics_office Char
    help='Post office which will receive the shipped goods' string='Domicile Post office'
  • postlogistics_output_format Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'output_format')] string='Output format'
  • postlogistics_proclima_logo Boolean
    help='The “pro clima” logo indicates an item for which the surcharge for carbon-neutral shipping has been paid and a contract to that effect has been signed. For Letters with barcode (BMB) domestic, the ProClima logo is printed automatically (at no additional charge)' args: 'Print ProClima logo'
  • postlogistics_resolution Many2one → postlogistics.delivery.carrier.template.option
    comodel_name='postlogistics.delivery.carrier.template.option' domain=[('postlogistics_type', '=', 'resolution')] string='Resolution'
  • postlogistics_tracking_format Selection
    default='postlogistics' help='Allows you to define how the ItemNumber (the last 8 digits) of the tracking number will be generated:\n- Default postlogistics numbers: The webservice generates it for you.\n- Picking number with pack counter: Generate it using the digits of picking name and add the pack number. 2 digits forpack number and 6 digits for picking number. (eg. 07000042 for picking 42 and 7th pack' string='Tracking number format' args: [('postlogistics', 'Use default postlogistics tracking numbers'), ('picking_num', 'Use picking number with pack counter')]
  • zpl_patch_string Char
    default='^XA^CW0,E:TT0003M_.TTF^XZ^XA^CI28' string='ZPL Patch String'
Public methods (5)
  • onchange_prod_environment(self)
    @api.onchange('prod_environment')
    Auto change the end point url following the environment - Test: https://wedecint.post.ch/ - Prod: https://wedec.post.ch/
  • postlogistics_cancel_shipment(self, pickings)
  • postlogistics_get_tracking_link(self, picking)
  • postlogistics_rate_shipment(self, order)
  • postlogistics_send_shipping(self, pickings)
    It will generate the labels for all the packages of the picking. Packages are mandatory in this case

New fields (5)
  • code Char
  • description Char
    help='Allow to define a more complete description than in the name field.'
  • name Char
    translate=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Carrier'
  • postlogistics_type Selection
    selection=POSTLOGISTICS_TYPES string='PostLogistics option type'
Public methods (0)

No public methods.

New fields (4)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> required=True string='Company'
  • name Char
    required=True string='Description' translate=True
  • number Char
    required=True string='Number'
  • sequence Integer
    help='Gives the sequence on company to define priority on license when multiple licenses are available for the same group of service.' string='Sequence'
Public methods (0)

No public methods.

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

No public methods.

New fields (1)
  • package_carrier_type Selection
    selection_add=[('postlogistics', 'PostLogistics')]
Public methods (0)

No public methods.

New fields (2)
  • postlogistics_notification Selection
    default='disabled' args: [('disabled', 'Disabled'), ('email', 'Email'), ('sms', 'Mobile SMS'), ('phone', 'Phone Call')]
  • postlogistics_option_ids Many2many → postlogistics.delivery.carrier.template.option
    column1='partner_id' column2='option_id' relation='postlogistics_options_partner_rel' string='PostLogistics Options' args: 'postlogistics.delivery.carrier.template.option'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • delivery_fixed_date Date
    help='Specific delivery date (ZAW3217)' args: 'Fixed delivery date'
  • delivery_mobile Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Mobile'
  • delivery_phone Char
    help='For notify delivery by telephone (ZAW3213)' args: 'Phone'
  • delivery_place Char
    help='For Deposit item service (ZAW3219)' args: 'Delivery Place'
Public methods (6)
  • attach_shipping_label(self, label)
    Attach a label returned by generate_shipping_labels to a picking
  • generate_postlogistics_shipping_labels(self, package_ids=None)
    Add label generation for PostLogistics
  • get_shipping_label_values(self, label)
  • info_from_label(self, label, zpl_patch_string=False)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a picking If the picking delivers the whole sales order, we use the total amount of the sales order. Otherwise, we don't know the value of each picking so we raise an error. The user has to create packages with the cash on delivery price on each package.
  • write_tracking_number_label(self, label_result, packages)
    If there are no pack defined, write tracking_number on picking otherwise, write it on parcel_tracking field of each pack. Note we can receive multiple labels for a same package

New fields (3)
  • package_carrier_type Selection
    related='packaging_id.package_carrier_type'
  • parcel_tracking Char
    args: 'Parcel Tracking'
  • postlogistics_manual_cod_amount Float
    help='If the cash on delivery amount for this package is different than the total of the sales order, write the amount there.' string='PostLogistics Cash On Delivery Amount'
Public methods (1)
  • postlogistics_cod_amount(self)
    Return the PostLogistics Cash on Delivery amount of a package If we have only 1 package which delivers the whole sales order we use the total amount of the sales order. Otherwise we don't know the value of each package so we raise an error and the user has to write the prices on the packages. When a price is manually set on a package, it's always used as the cash on delivery amount.