42f9a2c2da703ef01eaa7d4815e25083d5301f4d
Stpes to reproduce the bug:
- Install delivery_ups
- Go to shipping method > UPS BE > Package type
- Set the max weight to 10 kg
- Create a product “P1”:
- Go to inventory tab > weight: 10 kg
- Create a SO:
- Add the product “P1”
- Add shipping
- Select UPS Be
- Click on get rate
Problem:
Traceback is triggered, because we devise a number by an empty list:
https://github.com/odoo/odoo/blob/6b0ab28791f4a29254d294f8a116545d4c124e8b/addons/delivery/models/delivery_carrier.py#L301
The `last_package_weight` is the result of the modulo of the weight of
all the products by the maximum weight of a package, in this case it is:
0 -> 10% 10
We then use this result to calculate the weight of the package,
but parenthesis have been forgotten and therefore an empty list is
returned in the case where `last_package_weight` is 0
https://github.com/odoo/odoo/blob/6b0ab28791f4a29254d294f8a116545d4c124e8b/addons/delivery/models/delivery_carrier.py#L298-L300
opw-3075295
closes odoo/odoo#106863
X-original-commit: f173300f4f24d600693ab54c8db0995723a304e9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
…
…
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%