This commit is contained in:
2026-11-08 20:08:53 +08:00
parent 7526a5fe4d
commit 9b924747c5
2692 changed files with 394867 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
from odoo import models
class ProductImage(models.Model):
_inherit = 'product.image'
def _ai_read(self, fnames=None, files_parts=None, files_checksums=None):
if fnames:
return super()._ai_read(fnames, files_checksums)
if files_checksums is None:
files_checksums = set()
__, files_parts, files_checksums = super()._ai_read(fnames, files_parts, files_checksums)
product_tmpl_id = self.product_tmpl_id if self.product_tmpl_id else self.product_variant_id.product_tmpl_id
tmpl_vals_list, files_parts, __ = product_tmpl_id._ai_read(['display_name', 'type', 'description', 'description_sale'], files_parts, files_checksums)
return tmpl_vals_list, files_parts