Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
8463 Tampilan


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
Buang
Jawaban Terbai

Hello Mostafa,

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


Thanks

Avatar
Buang
Penulis

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

Post Terkait Replies Tampilan Aktivitas
0
Apr 18
33211
3
Nov 24
1556
4
Jun 24
17218
3
Jan 21
5246
4
Apr 20
9047