I have many computed fields in my database that calculate the days until they are due. However I have trigger the field to compute every day, is there a way for Odoo to automatically run my computed fields every morning?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
To run certain job with stated periodicity, you can use scheduled jobs (cron jobs). Have a look at:
the official documentation (the section 'Automation Actions')
Take into account that computed fields are not obliged to be stored into a database. It is possible to trigger re-computing on a fly (when a form with that field is opened or when a field is used in a code). Thus, if you added store=False to your computed field, it would not be required to re-compute it, since the field would be computed when it is needed.
To sum up: at the moment you have a stored field which depend on other fields + depends on dynamic date ('today'). Hence, you might either trigger recomputing by scheduled jobs or make a field not stored.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up