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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
8486
查看
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
|
33257 | ||
|
3
11月 24
|
1586 | ||
|
4
6月 24
|
17272 | ||
|
3
1月 21
|
5270 | ||
|
4
4月 20
|
9079 |