<commit_before>.. _pricing-functional:

Pricing
-------

***********
Computation
***********

Computing prices for configurable products is done differently from the legacy method.

**Legacy method**

In order to compute prices for standard variants Odoo does the following:

1. Uses the product template price as a starting / base price.

2. Loops through all attribute values of the product variant

3. **Adds the template base price + sum of all price_extra fields on each attribute value.**


**Product configurator method**

Everything until step 2 remains the same. What is different is that we do not use the price_extra field
from the product.attribute.value.

Instead we use the price of the product linked to the product.attribute.value.

**Base price (product.template) + sum of all products related to the attribute.values on the variant.**

As such if you want to compute an extra price for a certain attribute, create a regular product, set a prince and link the product to the attribute value in the form view.

.. note::

   In order for live pricing updates in the website configurator to work the same setup must be made

For a technical explanation on how this is implemented please check the :ref:`Pricing Technical <pricing-technical>`.

******
Format
******
<commit_msg>[FIX] typo<commit_after>.. _pricing-functional:

Pricing
-------

***********
Computation
***********

Computing prices for configurable products is done differently from the legacy method.

**Legacy method**

In order to compute prices for standard variants Odoo does the following:

1. Uses the product template price as a starting / base price.

2. Loops through all attribute values of the product variant

3. **Adds the template base price + sum of all price_extra fields on each attribute value.**


**Product configurator method**

Everything until step 2 remains the same. What is different is that we do not use the price_extra field
from the product.attribute.value.

Instead we use the price of the product linked to the product.attribute.value.

**Base price (product.template) + sum of all products related to the attribute.values on the variant.**

As such if you want to compute an extra price for a certain attribute, create a regular product, set a price and link the product to the attribute value in the form view.

.. note::

   In order for live pricing updates in the website configurator to work the same setup must be made

For a technical explanation on how this is implemented please check the :ref:`Pricing Technical <pricing-technical>`.

******
Format
******

{'fraction_non_alphanumeric': 0.07906976744186046, 'fraction_numerical': 0.0031007751937984496, 'mean_word_length': 4.203629032258065, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1521897', 'n_tokens_mistral': 651, 'n_tokens_neox': 633, 'n_words': 371}