Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Sale Order packaging without specify products

by
Francesco Ballerini
- 22/12/2023 16:13:19

I think I found a good solution for this.


In very short worlds: 


  • Added a Smart Button on Sale Order that allows to directly create Delivery Packages (product.packaging without product ID).


  • When creating Delivery Packages from this Smart Button Odoo will perform two automatism: create a PACK and link the PACK to the Sale Order Delivery Package


  • extended some functions, e.g. StockPicking._compute_packages() in order to merge Sale Order Delivery Packages related PACKS to packages defined by Picking Stock Move Lines. In case of multiple pickings, Sale Order Delivery Packages are only linked to the picking having “customer location” as destination location


This way when a provider loops through pickings to get PACKS/Delivery Packages dimension and weight it will also take info by PACKS defined by Sale Order Smart Button, even if they are not related to any product. You still can define products ID/PACK relation on the picking, if needed. Of course the use case is a bit specific (when it's not?), but it looks decent on paper.


I might be able to propose this as an OCA module in the future, in case someone has similar interests.


Best regards


Francesco Ballerini

Reference