Skip to Content
Menú
This question has been flagged
1 Respondre
8455 Vistes


class ProductTemplate(models.Model):
_inherit = 'product.template'

qty = fields.Float(compute='_calculate',store=True)
@api.multi
@api.depends('qty_available')
def _calculate(self):

for rec in self:

if rec.qty_available:

rec.qty = rec.qty_available


Avatar
Descartar
Best Answer

Hello Mostafa,

Check these answers: https://stackoverflow.com/questions/31945069/odoo-computed-fields-works-without-store-true-doesnt-work-with-store-true


Thanks

Avatar
Descartar
Autor

i found it the problem with qty_available which field shoud i use in @api.depends(' ') when quantity on hand change

Related Posts Respostes Vistes Activitat
0
d’abr. 18
33202
3
de nov. 24
1547
4
de juny 24
17215
3
de gen. 21
5231
4
d’abr. 20
9035