[FIX] product: use same default picture than product.template
Before this commit, the default picture (when no picture is set to a product) has been
changed for `product.template` but not for `product.product` in commit 0625434
This commit also applies the changes in `product.product` to have the same default
picture than `product.template` when there is no picture set on the product.
task-3484150
closes odoo/odoo#145831
X-original-commit: 40ee98e7b96bbd7d92f1bc085389e98fb43fd8d1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
committed by
Xavier Bol (xbo)
parent
3947fb81fa
commit
c2d92ecfc5
@@ -187,7 +187,7 @@ class ProductProduct(models.Model):
|
||||
def _get_placeholder_filename(self, field):
|
||||
image_fields = ['image_%s' % size for size in [1920, 1024, 512, 256, 128]]
|
||||
if field in image_fields:
|
||||
return 'product/static/img/placeholder.png'
|
||||
return 'product/static/img/placeholder_thumbnail.png'
|
||||
return super()._get_placeholder_filename(field)
|
||||
|
||||
def init(self):
|
||||
|
||||
Reference in New Issue
Block a user