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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
1
Responder
8456
Vistas
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
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
abr 18
|
33203 | ||
|
3
nov 24
|
1547 | ||
|
4
jun 24
|
17216 | ||
|
3
ene 21
|
5231 | ||
|
4
abr 20
|
9037 |