Repository
OCA/delivery-carrier · module folder · Try on Runboat
Module version
1.0.0
Category
Delivery
Folder size
0.15 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/delivery-carrier
Last tracking update
2026-08-07 08:42:52
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
OCA-git-bot, oca-ci, Angel Rivas, eugenio
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
CTT Express Iberic Web Services API intration with Odoo. Valid for
Portugal and Spain.

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
delivery_manifest_wizard_form cttexpress.manifest.wizard form New
delivery_pickup_wizard_form cttexpress.pickup.wizard form New
view_delivery_carrier_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
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (6)
  • attachment_ids Many2many → ir.attachment
    comodel_name='ir.attachment' readonly=True string='Manifests'
  • carrier_ids Many2many → delivery.carrier
    comodel_name='delivery.carrier' domain=[('delivery_type', '=', 'cttexpress')] help='Leave empty to gather all the CTT account manifests' string='Filter accounts'
  • document_type Selection
    default='XLSX' required=True selection=[('XLSX', 'Excel'), ('PDF', 'PDF')] string='Format'
  • from_date Date
    default=fields.Date.context_today required=True
  • state Selection
    default='new' readonly=True selection=[('new', 'new'), ('done', 'done')]
  • to_date Date
    default=fields.Date.context_today required=True
Public methods (1)
  • get_manifest(self)
    List of shippings for the given dates as CTT provides them

New fields (6)
  • carrier_id Many2one → delivery.carrier
    comodel_name='delivery.carrier' domain=[('delivery_type', '=', 'cttexpress')]
  • code Char
    readonly=True
  • delivery_date Date
    default=fields.Date.context_today required=True
  • max_hour Float
    default=23.99 required=True
  • min_hour Float
    required=True
  • state Selection
    default='new' readonly=True selection=[('new', 'new'), ('done', 'done')]
Public methods (1)
  • create_pickup_request(self)
    Get the pickup code

New fields (10)
  • cttexpress_agency Char
    string='Agency code'
  • cttexpress_contract Char
    string='Contract code'
  • cttexpress_customer Char
    string='Customer code'
  • cttexpress_document_format Selection
    default='PDF' selection=[('PDF', 'PDF'), ('PNG', 'PNG'), ('BMP', 'BMP')] string='Document format'
  • cttexpress_document_model_code Selection
    default='SINGLE' selection=[('SINGLE', 'Single'), ('MULTI1', 'Multi 1'), ('MULTI3', 'Multi 3'), ('MULTI4', 'Multi 4')] string='Document model'
  • cttexpress_document_offset Integer
    string='Document Offset'
  • cttexpress_password Char
    string='Password'
  • cttexpress_shipping_type Selection
    selection=CTTEXPRESS_SERVICES string='Shipping type'
  • cttexpress_user Char
    string='CTT Express User'
  • delivery_type Selection
    ondelete={'cttexpress': 'set default'} selection_add=[('cttexpress', 'CTT Express')]
Public methods (6)
  • action_ctt_validate_user(self)
    Maps to API's ValidateUser method :raises UserError: If the user credentials aren't valid
  • cttexpress_cancel_shipment(self, pickings)
    Cancel the expedition :param recordset: pickings `stock.picking` recordset :returns boolean: True if success
  • cttexpress_get_label(self, reference)
    Generate label for picking :param str reference: shipping reference :returns tuple: (file_content, file_name)
  • cttexpress_get_tracking_link(self, picking)
    Wildcard method for CTT Express tracking link. :param record picking: `stock.picking` record :return str: tracking url
  • cttexpress_send_shipping(self, pickings)
    CTT Express wildcard method called when a picking is confirmed :param record pickings: `stock.picking` recordset :raises UserError: On any API error :return dict: With tracking number and delivery price (always 0)
  • cttexpress_tracking_state_update(self, picking)
    Wildcard method for CTT Express tracking followup :param recod picking: `stock.picking` record

New fields (0)

No new fields.

Public methods (1)
  • cttexpress_get_label(self)
    Get label for current picking :return tuple: (filename, filecontent)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
135 days ago
Last activity
3 days ago
Repository
OCA/delivery-carrier
Pull request
[19.0][MIG] delivery_cttexpress: Migration to 19.0 (#1157)