diff --git a/ext/custom-addons/dp_custom/models/res_partner.py b/ext/custom-addons/dp_custom/models/res_partner.py index 431c0dc3..86b442f6 100644 --- a/ext/custom-addons/dp_custom/models/res_partner.py +++ b/ext/custom-addons/dp_custom/models/res_partner.py @@ -313,7 +313,7 @@ class Partner(models.Model): if item.applied_on == '2_product_category': code = item.categ_id.code if item.applied_on == '0_product_variant': - code = item.product_tmpl_id.default_code + code = item.product_id.product_tmpl_id.default_code data.append({ 'customer_id': partner_id.commercial_partner_id.portal_id, 'code': code,