Achraf 0801d1a92e [FIX] delivery: Fix ZeroDivisionError in shipping cost calculation
A `ZeroDivisionError` traceback  that occurs in `delivery/DeliveryCarrier:_get_packages_from_order` was caught by Sentry

Because in this part of the function

https://github.com/odoo/odoo/blob/c18064d717312287f5acba2fabeb77b2e1c01fb9/addons/delivery/models/delivery_carrier.py#L326-L335

if `total_weight === 0.0` then `total_full_packages` and `last_package_weight` will be null too.
And that will cause a `ZeroDivisionError` because of `total / len([])`

opw-3086602

closes odoo/odoo#107820

X-original-commit: a362e14ee62a5d9d2bcb08c4431994a96796ce1e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-12-14 11:41:57 +01:00
2022-12-13 17:03:17 +01:00
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%