<h1>Enterprise Support Ticket Reference:</h1>
<h3>762743</h3>

<h1>Impacted Versions:</h1>

- 10.0
- Master

<h1>Steps to Reproduce:</h1>

1. Create an attribute with create_variant boolean un-ticked (ie. don't create variants from these attributes). For example 'Test Attribute'
2. Create attribute values related to the above attribute. For example 'Test 1', 'Test 2', etc
3. Create a product (product.template) and assign some attributes and attribute values that will create variants (eg. in runbot try color, and memory)
4. Assign a default_code and barcode to each of those variants
5. On one of the product variants, add one of the attribute values for the attribute we've created in step 2 to the attribute_value_ids field to allow for filtering by product attributes that do not create variants (for example these attributes will provide a specification that is not necessarily configurable).
6. Create a purchase order for this product variant and receive the product into inventory (eg. purchase one unit).
7. Go back to product template and add another attribute value to an attribute where create_variant == True
8. Our value from attribute_value_ids is gone, and the inventory is no longer visible on the product variant in question.

<h1>Current Behaviour:</h1>

- Product variant is not retaining additional attribute_value_id's for attribute values with an attribute where create_variant == False
- In this scenario a product seemingly vanishes from inventory (from the user's perspective at least)
- Filters are lost on those attributes and attribute values where create_variant == False

<h1>Expected Behaviour:</h1>

- Product variants should retain their attribute_value_ids for attribute values with an attribute where create_variant == False even after additional variants are created by adding attribute values to attributes where create_variant == True
- In the same way, the product variants where these attribute_value_ids with create_variant == False are assigned should stay visible in inventory as the attribute_value_ids should retain those attribute values where create_variant == False
- Filters for attributes where create_variant == False should remain in place on the e-commerce website

<h1>Video/Screenshot link (optional):</h1>
Please see the following youtube video for reference:
<a href="https://youtu.be/JNqpYKxZkPo">https://youtu.be/JNqpYKxZkPo</a>

The example scenario, and video has been tested on the latest version 10.0c runbot as of 6:00PM HKT (Hong Kong Time)
if not uom and self._context.get('uom'):
            uom = self.env['product.uom'].browse(self._context['uom'])
        if not currency and self._context.get('currency'):
            currency = self.env['res.currency'].browse(self._context['currency'])
        templates = self
        if price_type == 'standard_price':
            
            
            
            templates = self.with_context(force_company=company and company.id or self._context.get('force_company', self.env.user.company_id.id)).sudo()
        prices = dict.fromkeys(self.ids, 0.0)
        for template in templates:
            prices[template.id] = template[price_type] or 0.0
            if uom:
                prices[template.id] = template.uom_id._compute_price(prices[template.id], uom)
            
            
            if currency:
                prices[template.id] = template.currency_id.compute(prices[template.id], currency)
        return prices
    
    @api.model
    def _price_get(self, products, ptype='list_price'):