Hello,
I would like to increment the value of the field "temperature" in all records in my tree view.
So which instruction i should write inside my function ?
Thank you
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I would like to increment the value of the field "temperature" in all records in my tree view.
So which instruction i should write inside my function ?
Thank you
Hi Zak,
In the buttons action, you can write a code like this,
all_rec = self.env['model_name'].search([])
#here you will get all records of the model
for rec in all_rec:
#here increment value by one
rec.temperature = rec.temperature + 1
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Thank you Niyas :)