How to get selected product variant object in product page (website)?
I have overriden the product.packagings table to move from product.template to product.product where it should be (check \Github issue #8237).
Now I want to display packaging info on the website for each variant (aka product.product).
I insert a very crude qweb to test:
<t t-foreach="product.product_variant_ids.packaging_ids" t-as="packaging_id">
It works but (as expected) fetches values for the first variant found. I want the table to change according to the variant selected from the combination of variant values.
Is there a way to get the variant_id (product_id in website_sale.js) exposed as a variable in qweb so that I can use:
<t t-foreach="variant_id.packaging_ids" t-as="packaging_id">
How can I auto-update the table when the variant changes?
Using Odoo Community V8 on OpenSuse 42.2