[FIX] product: keep attribute on a variant with only one attribute
authorChristophe Matthieu <chm@odoo.com>
Mon, 17 Nov 2014 13:24:03 +0000 (14:24 +0100)
committerMartin Trigaux <mat@odoo.com>
Wed, 26 Nov 2014 13:35:08 +0000 (14:35 +0100)
commitd3c562d4e8c9696338777935d5f593cc7b8793db
treee9c658b272511a827a2f5ffd33625531cc415db8
parentf317fedc4b2f0563e8a5faf27fa9c94a58704bb1
[FIX] product: keep attribute on a variant with only one attribute

When adding informational attribute, with only one possible value, it used to be skipped.
Instead keep it and add it on every variant.

To avoid dropping and recreating product (and lose eventual customisations), the attributes with only one possible value are set on every product.
This makes sure that in following test, these are not considered in variants_inactive variable.

Fixes #3204
addons/product/product.py
addons/website_sale/controllers/main.py