コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
8548 ビュー


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


アバター
破棄
最善の回答

Hello Mostafa,

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


Thanks

アバター
破棄
著作者

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

関連投稿 返信 ビュー 活動
0
4月 18
33372
3
11月 24
1642
4
6月 24
17378
3
1月 21
5339
4
4月 20
9130