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:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
8463
Tampilan
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
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Apr 18
|
33211 | ||
|
3
Nov 24
|
1556 | ||
|
4
Jun 24
|
17218 | ||
Can't Update Quantity on Hand Odoo 13 EE
Diselesaikan
|
|
3
Jan 21
|
5246 | |
|
4
Apr 20
|
9047 |