[IMP]: crm: Improvement in crm installer view and usability

bzr revid: rpa@tinyerp.com-20100511115225-yyagcgamuux3vpxv
This commit is contained in:
rpa (Open ERP) 2010-05-11 17:22:25 +05:30
parent b3fbffbcfb
commit 09f2db7238
2 changed files with 38 additions and 13 deletions

View File

@ -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()

View File

@ -12,21 +12,31 @@
</form>
<separator string="title" position="attributes">
<attribute name="string"
>Configure Your CRM System</attribute>
<attribute name="string">Configure Your CRM System</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">You can enhance OpenERP's basic CRM support with a few additional OpenERP applications</attribute>
</xpath>
<group colspan="8">
<separator string="Intall Extended modules for CRM" colspan="4"/>
<field name="crm_claim"/>
<field name="crm_helpdesk"/>
<field name="crm_fundraising"/>
<field name="crm_caldav"/>
<field name="sale_crm"/>
<group colspan="8">
<group colspan="2" col="2">
<separator string="Synchronization" colspan="4" />
<field name="crm_caldav" />
<field name="fetchmail" />
</group>
<group colspan="2" col="2">
<separator string="Plugins" colspan="4" />
<field name="thunderbird" />
<label string="*Outlook*" />
<!-- TODO <field name="outlook" />-->
</group>
<group colspan="4" col="4" groups="base.group_extended" name="other">
<separator string="Additional features" colspan="4" />
<field name="crm_claim" />
<field name="crm_helpdesk" />
<field name="crm_fundraising" />
<field name="sale_crm" invisible="1"/>
</group>
</group>
</data>
</field>