콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
8820 화면


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
33959
3
11월 24
2003
4
6월 24
17892
3
1월 21
5658
4
4월 20
9519