From f895d6718c6ff02fc98c455011f5af4484913ddc Mon Sep 17 00:00:00 2001 From: "Niels(Red15)" <> Date: Thu, 8 Oct 2009 19:10:36 +0530 Subject: [PATCH] [FIX] CRM : Mailgate script has host as parameter now onwards lp bug: https://launchpad.net/bugs/446205 fixed bzr revid: jvo@tinyerp.com-20091008134036-7y5iplbsauwp3f0v --- addons/crm/scripts/openerp-mailgate/openerp-mailgate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py b/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py index 6901fde..f363d6f 100755 --- a/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py +++ b/addons/crm/scripts/openerp-mailgate/openerp-mailgate.py @@ -62,8 +62,8 @@ class rpc_proxy(object): return self.rpc.execute(self.dbname, self.user_id, self.passwd, *request) class email_parser(object): - def __init__(self, uid, password, section, email, email_default, dbname): - self.rpc = rpc_proxy(uid, password, dbname=dbname) + def __init__(self, uid, password, section, email, email_default, dbname, host): + self.rpc = rpc_proxy(uid, password, host=host, dbname=dbname) try: self.section_id = int(section) except: @@ -315,9 +315,11 @@ if __name__ == '__main__': parser.add_option("-s", "--section", dest="section", help="ID or code of the case section", default="support") parser.add_option("-m", "--default", dest="default", help="Default eMail in case of any trouble.", default=None) parser.add_option("-d", "--dbname", dest="dbname", help="Database name (default: terp)", default='terp') + parser.add_option("-h", "--host", dest="host", help="Hostname of the Open ERP Server", default="localhost") + (options, args) = parser.parse_args() - parser = email_parser(options.userid, options.password, options.section, options.email, options.default, dbname=options.dbname) + parser = email_parser(options.userid, options.password, options.section, options.email, options.default, dbname=options.dbname, host=options.host) msg_txt = email.message_from_file(sys.stdin) -- 1.7.10.4