Repository
OCA/delivery-carrier · module folder · Try on Runboat
Module version
1.0.0
Category
Uncategorized
Folder size
0.06 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
ACSONE SA/NV, Odoo Community Association (OCA)
Maintainers
ACSONE SA/NV, Odoo Community Association (OCA)
Committers
OCA-git-bot, oca-ci, Bhavesh Heliconia
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
This module computes the amount of packages a picking out should have
depending on the weight of the products and the limit fixed by the
carrier. It's fully independent of the delivery_package_number module.

A warning is given if the number of packages for the picking out is
above what is considered as the theoretical number of packages for this
picking and the chosen carrier. The goal is to minimize the number of
packages billed by the carrier.

The chosen strategy for the theoretical number of packages is as follow:  
- Split the product_weights into as many items as we have
- Try to fit the heaviest product with the lightest. If it does not work
  then the heaviest should have a box for itself
- While the weight of products does not exceed the limit, continue
  adding products in the same package

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
delivery_carrier_form_view delivery.carrier.form (in delivery_number_package_theoretical) delivery.carrier form Inherits delivery.view_delivery_carrier_form
delivery_carrier_tree_view delivery.carrier.tree (in delivery_number_package_theoretical) delivery.carrier tree Inherits delivery.view_delivery_carrier_tree
stock_picking_form_view stock.picking.form (in delivery_number_package_theoretical) stock.picking form Inherits stock.view_picking_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (2)
  • maximum_weight_per_package Float
    string='Maximum weight per package'
  • weight_uom_name Char
    compute='_compute_weight_uom_name' string='Weight unit of measure label'
Public methods (0)

No public methods.

New fields (4)
  • is_number_of_packages_outranged Boolean
    compute='_compute_is_number_of_packages_outranged' args: 'Too many packages compared to the theoretical number'
  • is_number_of_packages_visible Boolean
    compute='_compute_is_number_of_packages_visible' args: 'Number of packages visible'
  • number_of_packages_done Integer
    compute='_compute_number_of_packages_done' args: 'Number of packages in a picking out'
  • theoretical_number_of_packages Integer
    compute='_compute_theoretical_number_of_packages' args: 'Theoretical number of packages in a picking out'
Public methods (0)

No public methods.

Loading…

Loading…

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