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
This question has been flagged
1
Reply
8460
Views
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
अप्रैल 18
|
33207 | ||
|
3
नव॰ 24
|
1554 | ||
|
4
जून 24
|
17218 | ||
|
3
जन॰ 21
|
5245 | ||
|
4
अप्रैल 20
|
9045 |