Skip to Content
Menu
This question has been flagged
1 Atsakyti
8589 Rodiniai


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


Portretas
Atmesti
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

Portretas
Atmesti
Autorius

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

Related Posts Replies Rodiniai Veikla
0
bal. 18
33432
3
lapkr. 24
1681
4
birž. 24
17421
3
saus. 21
5379
4
bal. 20
9156