OdooWiki OCA HUB

Sale By Packaging

sale_by_packaging folder_open OCA/sale-workflow open_in_new
Warehouse Management License: AGPL-3

This module provides different configuration option to manage packagings on sale orders.

The creation/update of sale order line will be blocked (by constraints) if the data on the sale.order.line does not fit with the configuration of the product's packagings.

It's also possible to force the quantity to sell during creation/modification of the sale order line if the "Force sale quantity" is ticked on the packaging.

For example, if your packaging is set to sell by 5 units and the employee fill the quantity with 3, the quantity will be automatically replaced by 5 (it always rounds up).

auto_awesome What this module does

AI-generated from the code · Odoo 14.0

Control how products are sold by packaging on sale orders: mark packagings as sellable, force quantities to round up to a packaging multiple, and require a packaging for products flagged 'Only sell by packaging'.

This module adds packaging rules to sales. On each packaging you can tick 'Can be sold' and 'Force sale quantity'. On the product (or product template) you can tick 'Only sell by packaging', which means the product cannot be sold on a sale order line without a packaging and a packaging quantity.

  • On sale order lines, only packagings marked 'Can be sold' can be selected; others are blocked with an error or warning.
  • If 'Force sale quantity' is ticked on the packaging, entering a quantity that is not a multiple of the packaging quantity is automatically rounded up to the next multiple (e.g. 3 becomes 5 for a packaging of 5).
  • When a product is set to 'Only sell by packaging', Odoo automatically assigns a matching packaging on the sale order line if the entered quantity is a multiple of an available sellable packaging.
  • A computed 'Minimum sellable quantity' is shown on products and templates, based on the smallest sellable packaging.

Business checks prevent inconsistent setups: a product cannot be 'Only sell by packaging' if it is not sellable or has no sellable packaging, and a packaging type cannot be set as not sellable while products using it still require selling by packaging. Archiving a packaging also removes its 'Can be sold' flag. The module touches product.packaging, product.packaging.type, product.product, product.template and sale.order.line, and adds fields to the product and sale order forms and lists.

Required by other modules

Models and fields (5)
  • product.product · extends an existing modelmin_sellable_qty
  • sale.order.line · extends an existing modelproduct_packaging
  • product.template · extends an existing modelmin_sellable_qty, sell_only_by_packaging (Only sell by packaging)
  • product.packaging · extends an existing modelactive, can_be_sold (Can be sold), force_sale_qty (Force sale quantity)
  • product.packaging.type · extends an existing modelcan_be_sold (Can be sold), packaging_ids

Text generated by AI (DeepSeek) from reading the Odoo 14.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 13.0

Confirmed on 2026-11-03 in branch 13.0 of OCA/sale-workflow.

terminal Installation and usage

OCA documentation · Odoo 14.0

Following options are available to define which packaging type can be sold and which product can only be sold by packaging.

  • Can be sold: On product packaging type model, this checkbox defines if product packagings from this particular type are available to be selected on sale order line.
  • Sell only by packaging: On product template model, this checkbox restricts sales of these products if no packaging is selected on the sale order line. If no packaging is selected, it will either be auto-assigned if the quantity on the sale order line matches a packaging quantity or an error will be raised.
  • Force sale quantity (on the packaging): force rounds up the quantity during creation/modification of the sale order line with the factor set on the packaging.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.