summaryrefslogtreecommitdiff
path: root/addons/fetchmail
diff options
context:
space:
mode:
authorNimesh (Open ERP) <nco@tinyerp.com>2012-12-10 12:38:25 +0530
committerNimesh (Open ERP) <nco@tinyerp.com>2012-12-10 12:38:25 +0530
commit504f10c220cffa9d19caa4846b261ae7c8dbc1ce (patch)
tree7d391f9f23543c827ba97e41a1297a5ebc3969d2 /addons/fetchmail
parent3defbc23a130b411997dea30f52d0c78e9cfff07 (diff)
parent7f1d5daf2f7a137a470a4a72779408edf7995910 (diff)
[MERGE] with trunk
bzr revid: nco@tinyerp.com-20121210070825-5rgigvkb1nb3hu30
Diffstat (limited to 'addons/fetchmail')
-rw-r--r--addons/fetchmail/__openerp__.py2
-rw-r--r--addons/fetchmail/fetchmail.py8
-rw-r--r--addons/fetchmail/fetchmail_view.xml16
3 files changed, 20 insertions, 6 deletions
diff --git a/addons/fetchmail/__openerp__.py b/addons/fetchmail/__openerp__.py
index 8d46bcb225c..84a26d5ec40 100644
--- a/addons/fetchmail/__openerp__.py
+++ b/addons/fetchmail/__openerp__.py
@@ -63,7 +63,7 @@ For more specific needs, you may also assign custom-defined actions
],
'demo': [],
'installable': True,
- 'auto_install': False,
+ 'auto_install': True,
'images': ['images/1_email_servers.jpeg'],
}
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index 68f05dfeee2..e5cd70948cd 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -195,12 +195,12 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
strip_attachments=(not server.attach),
context=context)
if res_id and server.action_id:
- action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", False)})
+ action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", server.object_id.model)})
imap_server.store(num, '+FLAGS', '\\Seen')
cr.commit()
count += 1
_logger.info("fetched/processed %s email(s) on %s server %s", count, server.type, server.name)
- except Exception, e:
+ except Exception:
_logger.exception("Failed to fetch mail from %s server %s.", server.type, server.name)
finally:
if imap_server:
@@ -220,11 +220,11 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
strip_attachments=(not server.attach),
context=context)
if res_id and server.action_id:
- action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", False)})
+ action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", server.object_id.model)})
pop_server.dele(num)
cr.commit()
_logger.info("fetched/processed %s email(s) on %s server %s", numMsgs, server.type, server.name)
- except Exception, e:
+ except Exception:
_logger.exception("Failed to fetch mail from %s server %s.", server.type, server.name)
finally:
if pop_server:
diff --git a/addons/fetchmail/fetchmail_view.xml b/addons/fetchmail/fetchmail_view.xml
index 66c7e5a7f5c..8bbdeb26f6d 100644
--- a/addons/fetchmail/fetchmail_view.xml
+++ b/addons/fetchmail/fetchmail_view.xml
@@ -93,6 +93,20 @@
<field name="view_id" ref="view_email_server_tree"/>
<field name="search_view_id" ref="view_email_server_search"/>
</record>
+
+ <record id="inherit_view_general_configuration" model="ir.ui.view">
+ <field name="name">General Settings</field>
+ <field name="model">base.config.settings</field>
+ <field name="inherit_id" ref="base_setup.view_general_configuration"/>
+ <field name="arch" type="xml">
+ <div name="email" position="inside">
+ <button type="action"
+ name="%(action_email_server_tree)d"
+ string="Configure the incoming email gateway" class="oe_link"/>
+ </div>
+ </field>
+ </record>
+
<menuitem
parent="base.menu_email"
@@ -117,7 +131,7 @@
<act_window
context="{'search_default_server_id': active_id, 'default_fetchmail_server_id': active_id}"
id="act_server_history" name="Messages" domain="[('email_from', '!=', False), ('fetchmail_server_id', '=', active_id)]"
- res_model="mail.message" src_model="fetchmail.server"/>
+ res_model="mail.mail" src_model="fetchmail.server"/>
</data>
</openerp>