summaryrefslogtreecommitdiff
path: root/addons/fetchmail
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2011-10-01 22:02:47 +0200
committerFabien Pinckaers <fp@tinyerp.com>2011-10-01 22:02:47 +0200
commite70a409af1febb0005b2d3348e4996c19781e29c (patch)
treee57f6aa61ecabb62de0e53f20ee831aa112837bf /addons/fetchmail
parentc8a29501e41c3d0d43d2d6c9aad2b8b951a87fe0 (diff)
[IMP] useability views
bzr revid: fp@tinyerp.com-20111001200247-tqyw0w8zomrq0jil
Diffstat (limited to 'addons/fetchmail')
-rw-r--r--addons/fetchmail/fetchmail.py4
-rw-r--r--addons/fetchmail/fetchmail_installer_view.xml25
-rw-r--r--addons/fetchmail/fetchmail_view.xml12
3 files changed, 20 insertions, 21 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index f45b5e955a0..e7f7250458b 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -60,10 +60,9 @@ class fetchmail_server(osv.osv):
'date': fields.datetime('Last Fetch Date', readonly=True),
'user' : fields.char('Username', size=256, required=True, readonly=True, states={'draft':[('readonly', False)]}),
'password' : fields.char('Password', size=1024, required=True, readonly=True, states={'draft':[('readonly', False)]}),
- 'note': fields.text('Description'),
'action_id':fields.many2one('ir.actions.server', 'Server Action', help="Optional custom server action to trigger for each incoming mail, "
"on the record that was created or updated by this mail"),
- 'object_id': fields.many2one('ir.model', "Target document type", required=True, help="Process each incoming mail as part of a conversation "
+ 'object_id': fields.many2one('ir.model', "Create a New Record", required=True, help="Process each incoming mail as part of a conversation "
"corresponding to this document type. This will create "
"new documents for new conversations, or attach follow-up "
"emails to the existing conversations (documents)."),
@@ -73,6 +72,7 @@ class fetchmail_server(osv.osv):
}
_defaults = {
'state': "draft",
+ 'type': "pop",
'active': True,
'priority': 5,
'attach': True,
diff --git a/addons/fetchmail/fetchmail_installer_view.xml b/addons/fetchmail/fetchmail_installer_view.xml
index 911ad8101da..b5bd7df80ca 100644
--- a/addons/fetchmail/fetchmail_installer_view.xml
+++ b/addons/fetchmail/fetchmail_installer_view.xml
@@ -1,18 +1,19 @@
<openerp>
<data>
- <record model="ir.actions.act_window" id="view_email_server_form_installer">
- <field name="name">Setup Incoming Mail Server (fetchmail)</field>
- <field name="type">ir.actions.act_window</field>
- <field name="res_model">fetchmail.server</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="view_id" ref="fetchmail.view_email_server_form"/>
- </record>
+ <record model="ir.actions.act_window" id="view_email_server_form_installer">
+ <field name="name">Setup Incoming Mail Servers</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">fetchmail.server</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" eval="False"/>
+ <field name="help">You can connect OpenERP to your incoming mail server so that documents (leads, tasks, issues, etc) are synchronized automatically with your incoming emails.</field>
+ </record>
- <record id="view_email_server_form_installer_todo" model="ir.actions.todo">
- <field name="action_id" ref="view_email_server_form_installer"/>
- <field name="category_id" ref="base.category_sales_management_config"/>
- <field name="sequence">4</field>
+ <record id="view_email_server_form_installer_todo" model="ir.actions.todo">
+ <field name="action_id" ref="view_email_server_form_installer"/>
+ <field name="category_id" ref="base.category_sales_management_config"/>
+ <field name="sequence">4</field>
</record>
</data>
</openerp>
diff --git a/addons/fetchmail/fetchmail_view.xml b/addons/fetchmail/fetchmail_view.xml
index b322fc40d5c..84bcb5778c4 100644
--- a/addons/fetchmail/fetchmail_view.xml
+++ b/addons/fetchmail/fetchmail_view.xml
@@ -26,7 +26,7 @@
<field name="arch" type="xml">
<form string="Incoming Mail Server">
<group col="6" colspan="4">
- <field name="name" select="1" colspan="4"/>
+ <field name="name" select="1"/>
<field name="type" select="1" on_change="onchange_server_type(type, is_ssl)"/>
<field name="date" select="1"/>
</group>
@@ -44,14 +44,12 @@
<field name="password" password="True" />
</group>
<group col="2" colspan="2">
- <separator string="Automated Processing" colspan="2"/>
+ <separator string="Actions to Perform on Incoming Mails" colspan="2"/>
<field name="object_id"/>
- <field name="action_id"/>
+ <field name="action_id" groups="base.group_extended"/>
</group>
- <separator string="Description" colspan="4"/>
- <field name="note" colspan="4" nolabel="1"/>
</page>
- <page string="Advanced">
+ <page string="Advanced" groups="base.group_extended">
<group colspan="2" col="2">
<separator string="Advanced options" colspan="2"/>
<field name="priority" groups="base.group_extended"/>
@@ -62,7 +60,7 @@
</page>
</notebook>
<group col="6" colspan="4">
- <field name="state" select="1"/>
+ <field name="state"/>
<button string="Reset Confirmation" type="object" name="set_draft" icon="gtk-convert" states="done"/>
<button string="Test &amp; Confirm" type="object" name="button_confirm_login" states="draft" icon="gtk-apply"/>
<button string="Fetch Now" type="object" name="fetch_mail" states="done" icon="gtk-network"/>