diff options
| author | Tejas Tank <tta@openerp.com> | 2012-11-27 15:16:23 +0530 |
|---|---|---|
| committer | Tejas Tank <tta@openerp.com> | 2012-11-27 15:16:23 +0530 |
| commit | 2a490dbb68f16d9372d3ebcff41ddd1ff2fff8d8 (patch) | |
| tree | 82603d54df406cf694bbc4f4e571952a6f15aa4b | |
| parent | 45993b0e14aa423650368a15340a744dec63e3f8 (diff) | |
| parent | 3457eb9784d222b93017f35847bc44294a451367 (diff) | |
[MERGE]: Merged lp:~openerp-dev/openobject-addons/trunk-crm-shp
bzr revid: tta@openerp.com-20121127094623-pu104k6uobuwgtvn
| -rw-r--r-- | addons/base_setup/res_config.py | 1 | ||||
| -rw-r--r-- | addons/base_setup/res_config_view.xml | 7 | ||||
| -rw-r--r-- | addons/crm/crm.py | 8 | ||||
| -rw-r--r-- | addons/crm/crm_lead_view.xml | 8 |
4 files changed, 15 insertions, 9 deletions
diff --git a/addons/base_setup/res_config.py b/addons/base_setup/res_config.py index e7898395d62..27cc35d1308 100644 --- a/addons/base_setup/res_config.py +++ b/addons/base_setup/res_config.py @@ -60,6 +60,7 @@ class sale_config_settings(osv.osv_memory): 'module_web_linkedin': fields.boolean('Get contacts automatically from linkedIn', help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""), 'module_crm': fields.boolean('CRM'), + 'module_sale' : fields.boolean('SALE'), 'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plug-in', help="""The plugin allows you archive email and its attachments to the selected OpenERP objects. You can select a partner, or a lead and diff --git a/addons/base_setup/res_config_view.xml b/addons/base_setup/res_config_view.xml index c06ff6534d7..fc41c0c2e59 100644 --- a/addons/base_setup/res_config_view.xml +++ b/addons/base_setup/res_config_view.xml @@ -106,13 +106,14 @@ </group> </div> <div name="customer feature"> - <separator string="Quotations and Sales Orders"/> + <field name="module_sale" invisible="1"/> + <separator string="Quotations and Sales Orders" attrs="{'invisible': [('module_sale','=',False)]}"/> <group name="Customer"> - <label for="id" string="Customer Features"/> + <label for="id" string="Customer Features" attrs="{'invisible': [('module_sale','=',False)]}"/> <div name="Customer Features"/> </group> <group name="Sale"> - <label for="id" string="Sale Features"/> + <label for="id" string="Sale Features" attrs="{'invisible': [('module_sale','=',False)]}"/> <div name="Sale Features"/> </group> </div> diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 368656224ac..522c0c2cda8 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -194,7 +194,13 @@ class crm_case_categ(osv.osv): 'section_id': fields.many2one('crm.case.section', 'Sales Team'), 'object_id': fields.many2one('ir.model', 'Object Name'), } - + + def default_get(self, cr, uid, fields, context=None): + res = {} + model_id = self.pool.get('ir.model').search(cr, uid, [('model', '=', context.get('object_name'))]) + res['object_id'] = model_id + return res + def _find_object_id(self, cr, uid, context=None): """Finds id for case object""" object_id = context and context.get('object_id', False) or False diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 88b2edcd665..8b977cfe293 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -137,7 +137,7 @@ <button name="case_cancel" string="Cancel" type="object" states="draft,open,pending"/> <field name="stage_id" widget="statusbar" - on_change="onchange_stage_id(stage_id)"/> + on_change="onchange_stage_id(stage_id)" clickable="True"/> </header> <sheet> <div class="oe_right oe_button_box" name="buttons"> @@ -460,6 +460,7 @@ <group> <field name="categ_ids" string="Categories" widget="many2many_tags" + context = "{'object_name': 'crm.lead'}" domain="[('object_id.model', '=', 'crm.lead')]"/> </group> @@ -568,7 +569,7 @@ <field name="model">crm.lead</field> <field name="arch" type="xml"> <search string="Search Opportunities"> - <field name="name" string="Opportunity / Customer" + <field name="name" string="Opportunity" filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/> <field name="categ_ids" string="Category" filter_domain="[('categ_ids','ilike', self)]"/> <filter icon="terp-mail-message-new" string="Unread Messages" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/> @@ -595,9 +596,6 @@ <filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" groups="base.group_no_one"/> <filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}"/> </group> - <group string="Display"> - <filter string="Show Sales Team" icon="terp-personal+" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/> - </group> </search> </field> </record> |
