Browse Source

[IMP] api.one is deprecated

pull/153/head
Invitu 8 years ago
parent
commit
8209162469
  1. 3
      pos_default_empty_image/product.py

3
pos_default_empty_image/product.py

@ -8,8 +8,9 @@ from openerp import models, fields, api
class ProductTemplate(models.Model):
_inherit = ['product.template']
@api.one
@api.multi
def _get_has_image(self):
self.ensure_one()
self.has_image = self.image is not False
has_image = fields.Boolean(compute='_get_has_image', string='Has Image')
Loading…
Cancel
Save