odoo-shopinvader
odoo-shopinvader copied to clipboard
[16.0] shopinvader_product_sale_packaging: fix empty barcode
Never fail when a packaging has no barcode. No matter where the data is coming from or how the object is initialized.
This PR has the approved
label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
@simahawk Why not adding
or None
when building theSimpleProductPackaging
here:https://github.com/shopinvader/odoo-shopinvader/blob/5552357a8a34ff4814a9cbf1cd2af75e91adfd6c/shopinvader_product_sale_packaging/schemas/product_packaging.py#L24
I think it was forgotten there.
It's on purpose. That was my first fix but it won't work in all the cases.
That's why I added the comment "Ensure barcode
is set to None when empty, no matter if we use from_packaging
.".
@simahawk I'm sorry but I'm not really into the code anymore 😅
Can you give an example where we don't use from_packaging
?