Contributors mailing list archives
Re: product.ul and packaging in v9/v10+by
Tecnativa. S. L., Pedro M. Baeza
I would go for option 1 with an extra field in product.ul for linking to a product.product. Stock consumption can be an extra module that uses this field for adding the proper stock moves and so on. You can take the module for v9 https://github.com/odoomrp/odoomrp-utils/tree/9.0/product_packaging_views as base for this OCA module, as it was a quick adaptation I made of the data model for working in v9.Regards.
2018-04-01 8:17 GMT+02:00 Eric Caudal <firstname.lastname@example.org>:
thanks for the proposal!
Option 1 is probably easier and allows compatibility if we need to port modules from v8 (similar structure).
Option 2 is a heavy change which might suit some businesses but not all.
I prefer option 1--
Eric Caudal [Founder and CEO]
Skype: elico.corp. Phone: + 86 186 2136 1670 (Cell), + 86 21 6211 8017/27/37 (Office)
Elico Shanghai (Hong Kong/Shenzhen/Singapore)
Odoo Gold Partner // Best Odoo Partner APAC 2014 and 2016On 03/30/2018 06:17 PM, Alexis de Lattre wrote:Dear OCA friends,
In odoo v8, there was an object "product.ul" that was used to define packaging (box, pallet, etc...) :
There was a many2one "ul_id" field on stock.quant.package that pointed to product.ul :
blob/8.0/addons/stock/stock. py#L3961With 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 :
logistics-tracking/tree/8.0/ stock_packaging_usability_ulBut 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.