summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNasreddin (bon) <bon@odoo.com>2020-06-26 14:51:52 +0000
committerNasreddin (bon) <bon@odoo.com>2020-06-29 15:37:29 +0000
commit499a649b162995ad2bf54f2bb1a50951653ed5ad (patch)
treec6e5f95066c9707c83a03ee3cbabb537cf17a38f
parent9b2c05742db839cfaf5bd5813a3ba1f6ca96e78e (diff)
[FIX] sale: Duplicating a Sales Order with Custom Attributes
Issue - Turn on Sales Product Configurator - Create a product template with an attribute and an attribute value defined as "is custom". - Create a new quote, add the template, and configure the product, entering a custom value. - Save. - Duplicate the Quote Custom value missing. Cause Custom value (field product_custom_attribute_value_ids) not duplicated. Solution Add attribute 'copy=True' to field product_custom_attribute_value_ids. opw-2279933 closes odoo/odoo#53827 X-original-commit: 0ca092361819bb198c87ca6772ec0e93a2158018 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com> Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
-rw-r--r--addons/sale/models/sale.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py
index baca5d02acb..f471d60b898 100644
--- a/addons/sale/models/sale.py
+++ b/addons/sale/models/sale.py
@@ -1296,7 +1296,7 @@ class SaleOrderLine(models.Model):
product_uom = fields.Many2one('uom.uom', string='Unit of Measure', domain="[('category_id', '=', product_uom_category_id)]")
product_uom_category_id = fields.Many2one(related='product_id.uom_id.category_id', readonly=True)
product_uom_readonly = fields.Boolean(compute='_compute_product_uom_readonly')
- product_custom_attribute_value_ids = fields.One2many('product.attribute.custom.value', 'sale_order_line_id', string="Custom Values")
+ product_custom_attribute_value_ids = fields.One2many('product.attribute.custom.value', 'sale_order_line_id', string="Custom Values", copy=True)
# M2M holding the values of product.attribute with create_variant field set to 'no_variant'
# It allows keeping track of the extra_price associated to those attribute values and add them to the SO line description