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
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
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.
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden