diff --git a/pos_default_empty_image/__init__.py b/pos_default_empty_image/__init__.py index e69de29b..9649db77 100644 --- a/pos_default_empty_image/__init__.py +++ b/pos_default_empty_image/__init__.py @@ -0,0 +1 @@ +from . import product diff --git a/pos_default_empty_image/product.py b/pos_default_empty_image/product.py index 44c1d09c..4515795a 100644 --- a/pos_default_empty_image/product.py +++ b/pos_default_empty_image/product.py @@ -5,16 +5,13 @@ from openerp import models, fields, api -class ProductTemplate(models.Model): - _inherit = ['product.template'] +class ProductProduct(models.Model): + _inherit = 'product.product' @api.multi - @api.depends('field.image') - def _has_image(self): + @api.depends('image') + def _compute_has_image(self): for record in self: record.has_image = bool(record.image) - has_image = fields.Boolean( - compute='_has_image', - store=True, - readonly=True) + has_image = fields.Boolean(compute='_compute_has_image', store=True)