diff options
| author | Anh Thao Pham (pta) <pta@odoo.com> | 2020-09-02 11:45:15 +0000 |
|---|---|---|
| committer | Anh Thao Pham (pta) <pta@odoo.com> | 2020-09-07 14:06:40 +0000 |
| commit | fd3bc2def4e0c5e9f6e91dda24787230a75c00cb (patch) | |
| tree | 1f0c027b86123017b127d6b87e6336ff680064f4 | |
| parent | 0e13ad22267e928a50fdc7d4f045f03b49385aa9 (diff) | |
[FIX] sale_management: missing variant in SO line name with quotation template
- Go to Sales > Configuration > Settings and activate "Product Configurator"
- Go to Sales > Configuration > Attributes and create an Attribute:
* Attribute Name: Attribute X
* Variants Creation Mode: Never (create_variant='no_variant')
* Attribute Values:
- Value 1
- Value 2
- Go to Sales > Products > Products and create a Product:
* Product Name: Product X
* Variants: Attribute X (Value 1, Value 2)
- Go to Sales > Configuration > Quotation Templates and create a Template:
* Quotation Template: Template X
* Lines:
- Product: Product X - Description: XXX
- Go to Sales > Orders > Quotations and create a Quotation
- Select Template X as Quotation Template
- Add Product X in Order Lines and validate Product Configurator
The Product is added to the SO line but the selected Attribute value is not displayed
in the SO line description, as it usually does.
It comes from the fact that when using a Quotation Template, if an added Product is
defined in the Template, the description from the Template (i.e. XXX) is used instead of
the default generated description.
This is not practical as it is not possible to differentiate several Product X with
different values for Attribute X, because of its Variants Creation Mode set to Never.
opw-2322827
closes odoo/odoo#57190
X-original-commit: b4cc0f0bd4ff9b6b537041a174d5283bbd18dfbd
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
| -rw-r--r-- | addons/sale_management/models/sale_order.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_management/models/sale_order.py b/addons/sale_management/models/sale_order.py index 4677c49ab36..e1276542a29 100644 --- a/addons/sale_management/models/sale_order.py +++ b/addons/sale_management/models/sale_order.py @@ -183,7 +183,7 @@ class SaleOrderLine(models.Model): if self.product_id and self.order_id.sale_order_template_id: for line in self.order_id.sale_order_template_id.sale_order_template_line_ids: if line.product_id == self.product_id: - self.name = line.with_context(lang=self.order_id.partner_id.lang).name + self.name = line.with_context(lang=self.order_id.partner_id.lang).name + self._get_sale_order_line_multiline_description_variants() break return domain |
