Contributors mailing list archives
contributors@odoo-community.org
Browse archives
product.ul and packaging in v9/v10+
by
Alexinux, Alexis de Lattre
Dear OCA friends,
In odoo v8, there was an object "product.ul" that was used to define packaging (box, pallet, etc...) :
https://github.com/odoo/odoo/blob/8.0/addons/product/product.py#L222
There was a many2one "ul_id" field on stock.quant.package that pointed to product.ul :
https://github.com/odoo/odoo/blob/8.0/addons/stock/stock.py#L3961
And I had develop a small OCA module to make it easy to select a product.ul when doing the packaging on a picking :
https://github.com/OCA/stock-logistics-tracking/tree/8.0/stock_packaging_usability_ul
--
In odoo v8, there was an object "product.ul" that was used to define packaging (box, pallet, etc...) :
https://github.com/odoo/odoo/blob/8.0/addons/product/product.py#L222
There was a many2one "ul_id" field on stock.quant.package that pointed to product.ul :
https://github.com/odoo/odoo/blob/8.0/addons/stock/stock.py#L3961
With that, when computing the theorical weight of a package, you could sum the weight of the quants inside the quant package and the weight of the product.ul. You could also display detailed packing reports that would show the packaging of each pack and it's content.
And I had develop a small OCA module to make it easy to select a product.ul when doing the packaging on a picking :
https://github.com/OCA/stock-logistics-tracking/tree/8.0/stock_packaging_usability_ul
But this object product.ul was dropped in v9 ! So, how should be handle packaging in v9/10+ ? I see two options :
1) restore the object product.ul in an OCA module.
Advantage : easy migration from v8, should be easy to implement in v9/v10+, easy datamodel on stock.quant.package.
Drawback : like in v8, you cannot handle the stock level of your packaging, you cannot order your packaging, etc..
2) use a new approach where each type of package (box 50x50x40, box 20x20x15, pallet 120x120) is a product.product. Then, when doing the packaging on the picking, we would "insert" on the fly a new stock move for the selected packaging that would fit inside the stock.quant.package.
Advantage :
- we can have a stock level for packaging, we can order a package.
Drawback :
- we need to add a fied on product.product to flag packages (this field doesn't exist yet)
- need to add stock moves and stock pack operations on the fly when handling packaging on the picking. By default, these items are displayed on the picking list.
- if you want to have a detailed packing report that displays the details of each package with the related packaging, the datamodel is a bit weired : you have to locate the packaging inside the quant package (hoping that there is only 1), take it as the packaging of the quant package, then skip it when you display the content of the package, etc...
Which option do you prefer ? If you already handle packaging in Odoo v9/v10+, which option did you choose ?
I plan to do the development next week for v10.
--
Alexis de Lattre
Akretion France - 35B rue Montgolfier - 69100 Villeurbanne - France
Mail : alexis.delattre@akretion.com
Mobile : +33 6 99 08 92 45
Akretion France - 35B rue Montgolfier - 69100 Villeurbanne - France
Mail : alexis.delattre@akretion.com
Mobile : +33 6 99 08 92 45
Follow-Ups
-
Re: product.ul and packaging in v9/v10+
byTecnativa. S. L., Pedro M. Baeza