Skip to Content

Contributors

Sale Order packaging without specify products

Hello, 

TLTR 

I am searching (for Odoo v14) a module which add a one2many on sale order, linking SO with multiple product packaging objects.

More details

Long time ago I've been asked to make implementations for a workflow when we need to define product packaging objects in a Sale Order so that we can store packaging dimensions, compute the proper rate and send some info to the carrier. 

We don't want to define any package on sale order line, or link specific products to a packaging: we just need to define an X number of packaging objects related to the sale order. 
Also, we want to do it from sale order because we adjust product lines accordingly to the "on hand quantity" directly on sale order, before picking generation, plus we don't manage backorder in the classic Odoo way, so picking is basically only "validate" for us.

I already have developed the workflow, but it's not properly integrated with some Odoo modules/models so I want to make some refactors and possibly integrate it with some OCA modules like product_packaging_dimension to use already implemented features when possible.

But I did not find anything covering this, possibly did I miss it?

Thanks

Francesco Ballerini

Privo di virus.www.avast.com

by Francesco Ballerini - 12:24 - 11 Dec 2023

Follow-Ups

  • Re: Sale Order packaging without specify products

    Thanks for reporting Daniel, it's always good to know!


    --

    Francesco


    Privo di virus.www.avast.com

    Il giorno ven 22 dic 2023 alle ore 17:02 Daniel Reis <notifications@odoo-community.org> ha scritto:
    Probably they don't address your particular use case, but for information there are a few PRs now trying to solve problems around moving Packages:

    - https://github.com/OCA/stock-logistics-workflow/pull/1422
    - https://github.com/OCA/stock-logistics-workflow/pull/1463

    Thanks
    Daniel

    On 22/12/2023 15:17, Francesco Ballerini wrote:

    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

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    --
    DANIEL REIS
    MANAGING PARTNER

    M: +351 919 991 307
    E: dreis@OpenSourceIntegrators.com
    A: Avenida da República 3000, Estoril Office B, 3º Escr.34, 2649-517 Cascais

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Francesco Ballerini - 02:22 - 23 Dec 2023
  • Re: Sale Order packaging without specify products
    Probably they don't address your particular use case, but for information there are a few PRs now trying to solve problems around moving Packages:

    - https://github.com/OCA/stock-logistics-workflow/pull/1422
    - https://github.com/OCA/stock-logistics-workflow/pull/1463

    Thanks
    Daniel

    On 22/12/2023 15:17, Francesco Ballerini wrote:

    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

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    --
    DANIEL REIS
    MANAGING PARTNER

    M: +351 919 991 307
    E: dreis@OpenSourceIntegrators.com
    A: Avenida da República 3000, Estoril Office B, 3º Escr.34, 2649-517 Cascais


    by Daniel Reis - 05:00 - 22 Dec 2023
  • Re: Sale Order packaging without specify products

    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


    by Francesco Ballerini - 04:16 - 22 Dec 2023
  • Re: Sale Order packaging without specify products
    Update 2

    From what I can understand the management of carrier deliveries with packages is super complex either from a functional and developing point of view as the delivery package definition is a bit clunky by itself.

    I finally understood that you still need to you need to define a "delivery package" associated with carrier, because dimension and weight data cannot be not taken from package directly. They are taken instead from each "delivery package" linked with a picking "package".. but you still have to define both package and delivery package to access packaging data because picking structure will be like 

    picking > multiple packages (stock.quant.packages) > every package has packaging_id (product.packaging) (which is designed to be product specific unless you define it as a "delivery packages", aka a "product.packaging" object without product id 😵‍💫 )

    If this is correct and someone has taken the trouble to read until this point, maybe you could also confirm that it is possible to speed up (a lot) the whole process by generating multiple "packaging" objects from a sale order and automatically recreate the structure

    > picking > packages > delivery packages 

    by automatically generating 

    - 1 package containing all products and 
    - n° fake packages (containing no products, or a dummy product..) 
    -  link every package to one of previously defined delivery packages (this workflow can be activated, for example, by clicking put in pack if a custom option is selected on picking.. to avoid conflicts with normal workflows)

    Of course this is possible only if you manage the whole delivery in a single picking, like we do.
    Seems like it's going to be more challenging than I thought but it seems like it can be done, unfortunately I don't think that we already have designed a workflow for this situation.

    Francesco Ballerini

    Il giorno mar 12 dic 2023 alle ore 20:29 Francesco Ballerini <francescobl.lavoro@gmail.com> ha scritto:
    Update: 

    Forgive me I have mistaken "packaging" and "package" business logic.

    I think that if I want to provide this feature and keep a decent level of scalability/extensibility I need to:

    1 - make possible for backend user to generate n° stock.quant.package objects from a sale order (simply adding a one2many relation with stock.quant.package, in Sale Order)

    2 - use stock_quant_package_dimension to allow setting dimensions and automatic volume calculation from the Sale Order as well

    3 - when the outgoing picking is generated by confirming order (as I previously said we have a really simplified picking process but this part will still probably be a bit tricky in case of picking and/or order cancel)
       3a) all sale order packages will be automatically attached to the outgoing picking by setting them on "picking.package_ids"
       3b) all the products will automatically be put in a single pack, the other packs will be "fake packs" in the sense that they will not store any products but still has dimensions

    This will not provide huge advantages by itself, but definitely better than having separate model to manage "shipping packs" delivery rate and tracking. Tracking will not be really accurate as it doesn't target products, but the rate we need to get is always based on taxable weight, so it should be a decent solution. I'm still not sure if it's worth to manage "package_id" on stock.quant.package, if I am not wrong that's needed in order to print shipping label.

    If you have any kind of suggestions that comes from experience in developing similar workflows (TLDR generating packages from sale order without having to specify the pack content) it will be helpful for sure.

    Thanks,

    Francesco Ballerini


    Privo di virus.www.avast.com

    Il giorno dom 10 dic 2023 alle ore 23:27 Francesco Ballerini <francescobl.lavoro@gmail.com> ha scritto:
    Hello, 

    TLTR 

    I am searching (for Odoo v14) a module which add a one2many on sale order, linking SO with multiple product packaging objects.

    More details

    Long time ago I've been asked to make implementations for a workflow when we need to define product packaging objects in a Sale Order so that we can store packaging dimensions, compute the proper rate and send some info to the carrier. 

    We don't want to define any package on sale order line, or link specific products to a packaging: we just need to define an X number of packaging objects related to the sale order. 
    Also, we want to do it from sale order because we adjust product lines accordingly to the "on hand quantity" directly on sale order, before picking generation, plus we don't manage backorder in the classic Odoo way, so picking is basically only "validate" for us.

    I already have developed the workflow, but it's not properly integrated with some Odoo modules/models so I want to make some refactors and possibly integrate it with some OCA modules like product_packaging_dimension to use already implemented features when possible.

    But I did not find anything covering this, possibly did I miss it?

    Thanks

    Francesco Ballerini

    Privo di virus.www.avast.com

    by Francesco Ballerini - 12:28 - 13 Dec 2023
  • Re: Sale Order packaging without specify products
    Update: 

    Forgive me I have mistaken "packaging" and "package" business logic.

    I think that if I want to provide this feature and keep a decent level of scalability/extensibility I need to:

    1 - make possible for backend user to generate n° stock.quant.package objects from a sale order (simply adding a one2many relation with stock.quant.package, in Sale Order)

    2 - use stock_quant_package_dimension to allow setting dimensions and automatic volume calculation from the Sale Order as well

    3 - when the outgoing picking is generated by confirming order (as I previously said we have a really simplified picking process but this part will still probably be a bit tricky in case of picking and/or order cancel)
       3a) all sale order packages will be automatically attached to the outgoing picking by setting them on "picking.package_ids"
       3b) all the products will automatically be put in a single pack, the other packs will be "fake packs" in the sense that they will not store any products but still has dimensions

    This will not provide huge advantages by itself, but definitely better than having separate model to manage "shipping packs" delivery rate and tracking. Tracking will not be really accurate as it doesn't target products, but the rate we need to get is always based on taxable weight, so it should be a decent solution. I'm still not sure if it's worth to manage "package_id" on stock.quant.package, if I am not wrong that's needed in order to print shipping label.

    If you have any kind of suggestions that comes from experience in developing similar workflows (TLDR generating packages from sale order without having to specify the pack content) it will be helpful for sure.

    Thanks,

    Francesco Ballerini


    Privo di virus.www.avast.com

    Il giorno dom 10 dic 2023 alle ore 23:27 Francesco Ballerini <francescobl.lavoro@gmail.com> ha scritto:
    Hello, 

    TLTR 

    I am searching (for Odoo v14) a module which add a one2many on sale order, linking SO with multiple product packaging objects.

    More details

    Long time ago I've been asked to make implementations for a workflow when we need to define product packaging objects in a Sale Order so that we can store packaging dimensions, compute the proper rate and send some info to the carrier. 

    We don't want to define any package on sale order line, or link specific products to a packaging: we just need to define an X number of packaging objects related to the sale order. 
    Also, we want to do it from sale order because we adjust product lines accordingly to the "on hand quantity" directly on sale order, before picking generation, plus we don't manage backorder in the classic Odoo way, so picking is basically only "validate" for us.

    I already have developed the workflow, but it's not properly integrated with some Odoo modules/models so I want to make some refactors and possibly integrate it with some OCA modules like product_packaging_dimension to use already implemented features when possible.

    But I did not find anything covering this, possibly did I miss it?

    Thanks

    Francesco Ballerini

    Privo di virus.www.avast.com

    by Francesco Ballerini - 09:04 - 12 Dec 2023