From 09f2db7238c42a9e6f94a1d9f19d4620079acdc6 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Tue, 11 May 2010 17:22:25 +0530 Subject: [PATCH] [IMP]: crm: Improvement in crm installer view and usability bzr revid: rpa@tinyerp.com-20100511115225-yyagcgamuux3vpxv --- addons/crm/crm_installer.py | 21 ++++++++++++++++++--- addons/crm/crm_installer_view.xml | 30 ++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/addons/crm/crm_installer.py b/addons/crm/crm_installer.py index 953dc9f3403..d14b060cde7 100644 --- a/addons/crm/crm_installer.py +++ b/addons/crm/crm_installer.py @@ -19,6 +19,7 @@ # ############################################################################## +from lxml import etree from operator import itemgetter from osv import fields, osv import netsvc @@ -26,7 +27,6 @@ import os import pooler import tools - class crm_installer(osv.osv_memory): _name = 'crm.installer' _inherit = 'res.config.installer' @@ -34,11 +34,26 @@ class crm_installer(osv.osv_memory): _columns = { 'name': fields.char('Name', size=64), 'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."), - 'crm_fundraising': fields.boolean('Fund Raising Operations', help="This may help associations in their fund raising process and tracking."), + 'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fund raising process and tracking."), 'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."), 'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."), - 'sale_crm': fields.boolean('Sale CRM Stuff', help="This module relates sale to opportunity cases in the CRM. We suggest you to install this module if you installed both the sale and the crm modules"), + 'sale_crm': fields.boolean('Opportunity to Quotation', help="This module relates sale to opportunity cases in the CRM."), + 'fetchmail': fields.boolean('Fetch Emails', help="Fetchmail Server."), + 'thunderbird': fields.boolean('Thunderbird', help="Thunderbird Interface."), } + + def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): + res = super(crm_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False) + #Checking sale module is installed or not + cr.execute("SELECT * from ir_module_module where state='installed' and name = 'sale'") + count = cr.fetchall() + if count: + doc = etree.XML(res['arch']) + nodes = doc.xpath("//field[@name='sale_crm']") + for node in nodes: + node.set('invisible', '0') + res['arch'] = etree.tostring(doc) + return res crm_installer() diff --git a/addons/crm/crm_installer_view.xml b/addons/crm/crm_installer_view.xml index 0bf21cb97d6..370285352d1 100644 --- a/addons/crm/crm_installer_view.xml +++ b/addons/crm/crm_installer_view.xml @@ -12,21 +12,31 @@ - Configure Your CRM System + Configure Your CRM System You can enhance OpenERP's basic CRM support with a few additional OpenERP applications - - - - - - - - + + + + + + + + + + + + + + + + +