Skip to content

Commit

Permalink
[FIX] fix product.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Invitu committed Feb 26, 2017
1 parent 68e602f commit 8eee14f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions pos_default_empty_image/product.py
Expand Up @@ -8,13 +8,8 @@
class ProductTemplate(models.Model):
_inherit = ['product.template']

@api.multi
@api.depends('field.image')
def _has_image(self):
for record in self:
record.has_image = bool(record.image)
@api.one
def _get_has_image(self):
self.has_image = self.image is not False

has_image = fields.Boolean(
compute='_has_image',
store=True,
readonly=True)
has_image = fields.Boolean(compute='_get_has_image', string='Has Image')

0 comments on commit 8eee14f

Please sign in to comment.