[REVIEW]: improvement smtpclient view

bzr revid: mga@tinyerp.com-20100417210609-7mdkiubcztu3g2jj
This commit is contained in:
Mantavya Gajjar
2010-04-18 02:36:09 +05:30
parent e6f77ed2fe
commit 64ea0e8b38
2 changed files with 31 additions and 33 deletions
+9 -5
View File
@@ -52,12 +52,14 @@ from osv import fields
from osv import osv
from tools.translate import _
error_msg = {'not_active' : "Please activate Email Server, without activating you can not send Email(s).",
'server_stop' : 'Please start Email Server, without starting you can not send Email(s).',
'server_not_confirm' : 'Please Verify Email Server, without verifying you can not send Email(s).'}
error_msg = {
'not_active' : "Please activate Email Server, without activating you can not send Email(s).",
'server_stop' : 'Please start Email Server, without starting you can not send Email(s).',
'server_not_confirm' : 'Please Verify Email Server, without verifying you can not send Email(s).'
}
logger = netsvc.Logger()
class smtpclient(osv.osv):
_name = 'email.smtpclient'
@@ -123,6 +125,7 @@ class smtpclient(osv.osv):
'users_id': _get_users,
'verify_email': lambda *a: _("Verification Message. This is the code\n\n__code__\n\nyou must copy in the OpenERP Email Server (Verify Server wizard).\n\nCreated by user __user__"),
}
server = {}
smtpServer = {}
@@ -555,7 +558,8 @@ class smtpclient(osv.osv):
'interval_number':1,
'interval_type':'minutes',
'user_id':uid,
'numbercall':-1
'numbercall':-1,
'doall':False
}
id = self.pool.get('ir.cron').create(cr, uid, res)
self.write(cr, uid, ids, {'process_id':id})
+22 -28
View File
@@ -81,31 +81,30 @@
</group>
<notebook colspan="4">
<page string="Configuration">
<separator string="Server Information"
colspan="4" />
<field name="auth_type" on_change="change_servertype(auth_type)"/>
<field name="server" select="2" />
<field name="ssl" select="2" />
<field name="port" select="2" />
<group col="2" colspan="2">
<separator string="Server Configuration" colspan="2" />
<field name="auth_type" on_change="change_servertype(auth_type)"/>
<field name="server" select="2" />
<field name="port" select="2" />
<field name="ssl" select="2" />
</group>
<group col="2" colspan="2">
<separator string="User Configuration" colspan="2" />
<field name="email" select="1" on_change="change_email(email)"/>
<field name="from_email" select="1"/>
<field name="auth" select="2"/>
<field name="user" select="1" attrs="{'required': [('auth_type','in',['gmail','yahoo'])]}"/>
<field name="password" password="True" attrs="{'required': [('auth_type','in',['gmail','yahoo'])]}"/>
</group>
<separator string="User Information"
colspan="4" />
<field name="email" select="1"
on_change="change_email(email)"/>
<field name="from_email" select="1"/>
<field name="auth" select="2"/>
<group col="2" colspan="2">
<separator string="Message Queue Configuration" colspan="2" />
<field name="type" select="1" />
<field name="active" select="2" />
<field name="delete_queue" select="2" />
<field name="delete_queue_period" select="2" attrs="{'readonly':[('delete_queue','not in',['content','all'])]}"/>
</group>
<newline/>
<field name="user" select="1" attrs="{'required': [('auth_type','in',['gmail','yahoo'])]}"/>
<field name="password" password="True" attrs="{'required': [('auth_type','in',['gmail','yahoo'])]}"/>
<newline />
<separator string="Other Information"
colspan="4" />
<field name="type" select="1" />
<field name="active" select="2" />
<field name="delete_queue" select="2" />
<field name="delete_queue_period" select="2" attrs="{'readonly':[('delete_queue','not in',['content','all'])]}"/>
<separator string="Server Information" colspan="4"/>
<group col="3" colspan="4">
<field name="state" select="1"/>
@@ -135,11 +134,6 @@
<label string="__code__ for Verification Code" />
<separator string="Test Message" colspan="4" />
<field name="test_email" select="2" colspan="4" nolabel="1" />
<separator string="Message" colspan="4" />
<field name="body" select="2" colspan="4" nolabel="1" />
<label string="__name__ for Customer Name" />
<label string="__number__ for Invoice / Sales Number" />
<label string="__user__ for User Name" />
</page>
<page string="Disclaimers">
<separator string="Disclaimers Message" colspan="4" />