From 905f24a2df654b76fd7a528a465680315bb2f272 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Thu, 15 Mar 2012 12:51:08 +0530 Subject: [PATCH] [IMP] improved code bzr revid: tpa@tinyerp.com-20120315072108-s8izumxkicedrunl --- addons/crm_claim/res_config.py | 20 +++++++++++--------- addons/project_issue/res_config.py | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/addons/crm_claim/res_config.py b/addons/crm_claim/res_config.py index 619479a6d3a..c9e89536ab9 100644 --- a/addons/crm_claim/res_config.py +++ b/addons/crm_claim/res_config.py @@ -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): diff --git a/addons/project_issue/res_config.py b/addons/project_issue/res_config.py index 4cd5510ab11..4214c91fe5d 100644 --- a/addons/project_issue/res_config.py +++ b/addons/project_issue/res_config.py @@ -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