[IMP] improved code
bzr revid: tpa@tinyerp.com-20120315072108-s8izumxkicedrunl
This commit is contained in:
@@ -24,21 +24,23 @@ from osv import fields, osv
|
||||
class project_claim_mail_configuration(osv.osv_memory):
|
||||
_inherit = 'project.config.settings'
|
||||
_columns = {
|
||||
'project_issue': fields.boolean("Create issue from an email account",
|
||||
help="""Allows you to configure your incoming mail server. And creates issue for your mails."""),
|
||||
'issue_server' : fields.char('Server Name', size=256),
|
||||
'issue_port' : fields.integer('Port'),
|
||||
'issue_type': fields.selection([
|
||||
'project_claim': fields.boolean("Create claims from an email account",
|
||||
help="""Allows you to configure your incoming mail server. And creates claims for your mails.
|
||||
"""),
|
||||
'claim_server' : fields.char('Server Name', size=256),
|
||||
'claim_port' : fields.integer('Port'),
|
||||
'claim_type': fields.selection([
|
||||
('pop', 'POP Server'),
|
||||
('imap', 'IMAP Server'),
|
||||
('local', 'Local Server'),
|
||||
], 'Server Type'),
|
||||
'issue_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
|
||||
'issue_user' : fields.char('Username', size=256),
|
||||
'issue_password' : fields.char('Password', size=1024),
|
||||
'claim_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
|
||||
'claim_user' : fields.char('Username', size=256),
|
||||
'claim_password' : fields.char('Password', size=1024),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'issue_type': 'pop',
|
||||
'claim_type': 'pop',
|
||||
}
|
||||
|
||||
def get_default_claim_server(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -24,26 +24,26 @@ from osv import fields, osv
|
||||
class project_issue_mail_configuration(osv.osv_memory):
|
||||
_inherit = 'project.config.settings'
|
||||
_columns = {
|
||||
'project_claim': fields.boolean("Create claims from an email account",
|
||||
help="""Allows you to configure your incoming mail server. And creates claims for your mails.
|
||||
"""),
|
||||
'claim_server' : fields.char('Server Name', size=256),
|
||||
'claim_port' : fields.integer('Port'),
|
||||
'claim_type': fields.selection([
|
||||
'project_issue': fields.boolean("Create issue from an email account",
|
||||
help="""Allows you to configure your incoming mail server. And creates issue for your mails."""),
|
||||
'issue_server' : fields.char('Server Name', size=256),
|
||||
'issue_port' : fields.integer('Port'),
|
||||
'issue_type': fields.selection([
|
||||
('pop', 'POP Server'),
|
||||
('imap', 'IMAP Server'),
|
||||
('local', 'Local Server'),
|
||||
], 'Server Type'),
|
||||
'claim_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
|
||||
'claim_user' : fields.char('Username', size=256),
|
||||
'claim_password' : fields.char('Password', size=1024),
|
||||
'issue_is_ssl': fields.boolean('SSL/TLS', help="Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP=995)"),
|
||||
'issue_user' : fields.char('Username', size=256),
|
||||
'issue_password' : fields.char('Password', size=1024),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'claim_type': 'pop',
|
||||
'issue_type': 'pop',
|
||||
}
|
||||
|
||||
def get_default_issue_server(self, cr, uid, ids, context=None):
|
||||
context = {'type':'claim'}
|
||||
context = {'type':'issue'}
|
||||
res = self.get_default_email_configurations(cr, uid, ids, context)
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user