diff --git a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js index 0e467206a73..46a7683a60b 100644 --- a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js +++ b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js @@ -195,8 +195,12 @@ var ProductComparison = publicWidget.Widget.extend(VariantMixin, { var self = this; this.$('.o_comparelist_products .o_product_row').remove(); _.each(this.comparelist_product_ids, function (res) { - var $template = self.product_data[res].render; - self.$('.o_comparelist_products').append($template); + if (self.product_data.hasOwnProperty(res)) { + // It is possible that we do not have the required product_data for all IDs in + // comparelist_product_ids + var $template = self.product_data[res].render; + self.$('.o_comparelist_products').append($template); + } }); if (force !== 'hide' && (this.comparelist_product_ids.length > 1 || force === 'show')) { $('#comparelist .o_product_panel_header').popover('show'); diff --git a/doc/cla/individual/AndrewChau.md b/doc/cla/individual/AndrewChau.md new file mode 100644 index 00000000000..19414c0c802 --- /dev/null +++ b/doc/cla/individual/AndrewChau.md @@ -0,0 +1,11 @@ +Australia, 2022-01-15 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Andrew Chau ky@andrewchau.com https://github.com/AndrewChau