diff --git a/addons/crm_claim/__openerp__.py b/addons/crm_claim/__openerp__.py index cd1053137b6..2423bdcea7a 100644 --- a/addons/crm_claim/__openerp__.py +++ b/addons/crm_claim/__openerp__.py @@ -44,6 +44,7 @@ automatically new claims based on incoming emails. 'crm_claim_menu.xml', 'security/ir.model.access.csv', 'report/crm_claim_report_view.xml', + 'res_config_view.xml', ], 'demo_xml': [ 'crm_claim_demo.xml', diff --git a/addons/crm_claim/res_config.py b/addons/crm_claim/res_config.py index 48f95d4b7ee..619479a6d3a 100644 --- a/addons/crm_claim/res_config.py +++ b/addons/crm_claim/res_config.py @@ -23,15 +23,32 @@ 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([ + ('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), + } + _defaults = { + 'issue_type': 'pop', + } def get_default_claim_server(self, cr, uid, ids, context=None): - context = {'type':'issue'} + context.update({'type':'claim'}) res = self.get_default_email_configurations(cr, uid, ids, context) return res def set_default_claim_server(self, cr, uid, ids, context=None): - context = {'type':'claim','obj':'crm.claim'} + context.update({'type':'claim','obj':'crm.claim'}) res = self.set_email_configurations(cr, uid, ids, context) project_claim_mail_configuration() \ No newline at end of file diff --git a/addons/fetchmail_crm_claim/res_config_view.xml b/addons/crm_claim/res_config_view.xml similarity index 100% rename from addons/fetchmail_crm_claim/res_config_view.xml rename to addons/crm_claim/res_config_view.xml diff --git a/addons/fetchmail_crm_claim/__openerp__.py b/addons/fetchmail_crm_claim/__openerp__.py index b5f9473ff96..2a515205f9e 100644 --- a/addons/fetchmail_crm_claim/__openerp__.py +++ b/addons/fetchmail_crm_claim/__openerp__.py @@ -31,7 +31,6 @@ 'init_xml': [], 'update_xml': [ "installer.xml", - "res_config_view.xml", ], 'demo_xml': [ ], diff --git a/addons/project/res_config.py b/addons/project/res_config.py index 1706acb5334..67e4a5e1a57 100644 --- a/addons/project/res_config.py +++ b/addons/project/res_config.py @@ -57,39 +57,8 @@ class project_configuration(osv.osv_memory): 'module_project_issue_sheet': fields.boolean("Track and invoice working time", help="""Allows to the timesheet support for the Issues/Bugs Management in Project. It installs the project_issue_sheet module."""), - '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'), - '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), - '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'), - '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 onchange_server_type(self, cr, uid, ids, server_type=False, ssl=False , type=[]): port = 0 values = {} diff --git a/addons/project_issue/res_config.py b/addons/project_issue/res_config.py index 2fe7cb0a387..4cd5510ab11 100644 --- a/addons/project_issue/res_config.py +++ b/addons/project_issue/res_config.py @@ -23,6 +23,24 @@ 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([ + ('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), + } + _defaults = { + 'claim_type': 'pop', + } def get_default_issue_server(self, cr, uid, ids, context=None): context = {'type':'claim'}