Community mailing list archives

community@mail.odoo.com

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

by
Skillteam, Houssine BAKKALI
- 06/13/2016 07:16:19
just not that some mail are not put in the mail queue but sent directly. So you need also to deactivate your outgoing mail server.

you can also configure your outgoing mail server to localhost and have a mail catcher installed on your laptop.

2016-06-12 17:21 GMT+02:00 David Arnold <dar@devco.co>:

Nice, I think among the options proposed best practice so far to me looks like:

echo "update ir_mail_server set smtp_port =25999;
update ir_cron set active = false;" >> nomail.sql

Simple. Elegant. Efficient.

Do you pack that into a module and then install it on your testing instances after copy? Or do you run it directly against your database?

I would argue that the former is to be recomended (odoo modules can load sql files) as for copying your database you might usually use the corresponding function of odoo's db service. So you only need to interact with the odoo api in any kind of external script (for example via erppeek).

However, I was able once to corrupt a production database temporally (until restart) after such a copy. Are there any known ceaveats about this method of copying?

Best, David


Luca Carabelli <luca.carabelli@politecnici.com> schrieb am So., 12. Juni 2016 um 04:34:


Luca Carabelli

Politecnici S.r.l.
Via dell'Artigiano, 20
37010 Albaré di Costermano (VR)
Tel: +390456201295 (r.a.)
Fax: +390456201877
Cell: +393401555695
Email: luca.carabelli@politecnici.com 
Web: www politecnici.com
 

update ir_mail_server set smtp_port =25999 ;
update ir_cron set active = false;  .    

We also have a couple of values on res_company that print things such as

lp -d {printer} {file_name} that we change to rm {file_name} or cp {file_name} /tmp depending on what we are working on.

Cheers,

Adrian

On 12 June 2016 at 00:16, Ruchir Shukla <ruchiryshukla@gmail.com> wrote:
module ..
on production it will be no mode and in local/test system .. make it default Test or Develop mode. 
it will restrict to send/receive any mail .

----------------------------
Kind regards
 
Ruchir Shukla
BizzAppDev (Forming Technology with Ideas)
BizzAppDev (Business Application Development)

On 11 June 2016 at 17:27, Graeme Gellatly <gdgellatly@gmail.com> wrote:

I just have a simple script to update mail server credentials to a mailtrap server.


On Sat, 11 Jun 2016 7:07 PM Dominique Chabord <dominique.chabord@sisalp.org> wrote:
I use to do the following :
- not restore the database on a production service and set an other
service for this
- start the other service with a number of crontab threads = 0 in the config

So all background activity is disabled on the other service.
Never had bad feedback about this.

2016-06-11 5:12 GMT+02:00 Moises Lopez <moylop260@vauxoo.com>:

> Try the following options:
>
>  - Set the `notification` field from `res.partner` to `None`
>  - Set the `active` field from `ir.cron` to `False`
>  - Disable the `ir.mail.server` too
>
>
> 2016-06-10 22:07 GMT-05:00 Hardik Goswami <hardikgiri.goswami@gmail.com>:
>
> Hi Arjan,
>
> I don't know the exact functionality of this module
> (https://www.odoo.com/apps/modules/8.0/open_email_blocker/) .I haven't tried
> yet.
> It is blocking the email by adding some putting some parameters in config
> file (As I can see in the in the module description )
> So when ever you start server with backup database, you can configure a
> separate odoo config file.
> I am not sure if it will solve your problem.
>
>
>
> On Sat, Jun 11, 2016 at 12:17 AM Arjan Duijs <arjanduijs@gmail.com
> wrote:
>
> Hi All,
> Regular i make a backup of my Odoo production server and sometimes i used
> that backup to test things on my development environment which in my case is
> my own laptop.
>
> But each time whenever i load a backup on my laptop it sends out various
> emails about "employee directory installed", "timesheet validation
> application installed", "Project managements application installed" as well
> as other addons, as wel as timesheets.
>
> for me that isnt a big deal, but it sends the emails to ALL odoo users!!
>
> Normally i use disconnecting my laptop from internet as a work arround, but
> sometimes i forget and get a bunch of phonecalls with questions about the
> emails.
>
> How can i prevent Odoo from sending out those emails whenever i restore a
> backup on my local laptop?
>
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59

> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe

>
>
>
>
> --
> Moisés López Calderón
> Vauxoo - OpenERP's Gold Partner
> Mobile: (+521) 477-752-22-30
> Office: (+52) 477-773-33-46
> web: http://www.vauxoo.com

> twitter: @vauxoo
>            @moylop260
> hangout: moylop260@vauxoo.com

>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59

-- 
Dominique Chabord - SISalp
Logiciel libre pour l'entreprise Tryton et open-source Odoo, OpenERP
18 avenue Beauregard 74960 Cran Gevrier
145A rue Alexandre Borrely 83000 Toulon
tel(repondeur) +33(0)950274960 fax +33(0)955274960 mob +33(0)622616438
http://sisalp.fr
http://openerp-online.fr

_______________________________________________

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe