Skip to main content
Odoo Community Association

Product packaging calculator

Beta License: LGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

Basic module providing an helper method to calculate the quantity of product by packaging.

Table of contents

Usage

Imagine you have the following packagings:

  • Pallet: 1000 Units

  • Big box: 500 Units

  • Box: 50 Units

and you have to pick from your warehouse 2860 Units.

Then you can do:

>>> product.product_qty_by_packaging(2860)

[
    {"id": 1, "qty": 2, "name": "Pallet"},
    {"id": 2, "qty": 1, "name": "Big box"},
    {"id": 3, "qty": 7, "name": "Box"},
    {"id": 100, "qty": 10, "name": "Units"},
]

With this you can show a proper message to warehouse operators to quickly pick the quantity they need.

Optionally you can get contained packaging by passing with_contained flag:

>>> product.product_qty_by_packaging(2860, with_contained=True)

[
    {"id": 1, "qty": 2, "name": "Pallet", "contained": [{"id": 2, "qty": 2, "name": "Big box"}]},
    {"id": 2, "qty": 1, "name": "Big box", "contained": [{"id": 3, "qty": 10, "name": "Box"}]},
    {"id": 3, "qty": 7, "name": "Box", "contained": [{"id": 100, "qty": 50, "name": "Units"}]},
    {"id": 100, "qty": 10, "name": "Units", "contained": []},},
]

Known issues / Roadmap

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Camptocamp

Contributors

Other credits

The migration of this module from 17.0 to 18.0 was financially supported by Camptocamp.

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

This module is part of the OCA/product-attribute project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Release files for odoo-addon-product-packaging-calculator 18.0.1.0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-product-packaging-calculator 18.0.1.0.1.2
File Interpreter ABI Platform
odoo_addon_product_packaging_calculator-18.0.1.0.1.2-py3-none-any.whl Python 3 none any Details

Release files / odoo_addon_product_packaging_calculator-18.0.1.0.1.2-py3-none-any.whl

Download URL odoo_addon_product_packaging_calculator-18.0.1.0.1.2-py3-none-any.whl
Size 34.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7df8b016e1e764f20fa8ffb80956095af35f3da1c4d6ef65c744b8b71f45c37
BLAKE2b-256 checksum
How to use checksums
866cb92fb8abec8ec41f2eeb3c30d5df270b14f0f54174582c6d2f9e48d9a04e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

18.0.1.0.1.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page