Community mailing list archives

Re: how to prevent odoo from sending emails when a backup is restored?

Adrian Merrall
- 06/11/2016 22:01:04

Best is to deactivate the cron workers as Dominique mentioned or deactivate the crons as Graeme suggested.

That is exactly what this query does...

update ir_cron set active = false;

It is also very important to run the other query to set the smtp port to a nonsense value as some code, even core code, does a force send immediate instead of queuing it, which I will get around to doing a pull request one day as this is a bug IMNSHO.

We also script this so on a customers machine we run a script which grabs the backup of production, restores it into test and runs the query to stop emails.