Add multi-company record rule on leads

Small view improvement in crm_usability
This commit is contained in:
Alexis de Lattre
2017-05-09 12:09:39 +02:00
parent d4fcaa7d14
commit 4509b2631a
3 changed files with 35 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
{ {
'name': 'CRM Usability', 'name': 'CRM Usability',
'version': '8.0.1.0.0', 'version': '8.0.1.0.1',
'category': 'Customer Relationship Management', 'category': 'Customer Relationship Management',
'license': 'AGPL-3', 'license': 'AGPL-3',
'summary': 'CRM usability enhancements', 'summary': 'CRM usability enhancements',
@@ -13,8 +13,10 @@
CRM Usability CRM Usability
============= =============
Some enhancements in the *Merge Partners* wizard: The usability improvements include :
* Adds multi-company record rules on crm.lead.
* Some enhancements in the *Merge Partners* wizard:
* take into account the unaccent option of the server config file * take into account the unaccent option of the server config file
* add optional group by on 'customer' and 'supplier' (active by default) * add optional group by on 'customer' and 'supplier' (active by default)
@@ -27,6 +29,7 @@ This module has been written by Alexis de Lattre from Akretion
'data': [ 'data': [
'crm_view.xml', 'crm_view.xml',
'wizard/base_partner_merge_view.xml', 'wizard/base_partner_merge_view.xml',
'security/rule.xml',
], ],
'installable': True, 'installable': True,
} }

View File

@@ -8,6 +8,19 @@
<openerp> <openerp>
<data> <data>
<record id="crm_case_form_view_oppor" model="ir.ui.view">
<field name="name">usability.crm.opportunity.form</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/>
<field name="arch" type="xml">
<field name="active" position="before">
<field name="company_id" groups="base.group_multi_company"
widget="selection"/>
</field>
</field>
</record>
<record id="crm_case_inbound_phone_tree_view" model="ir.ui.view"> <record id="crm_case_inbound_phone_tree_view" model="ir.ui.view">
<field name="name">crm_usability.crm.phonecall.tree.inbound</field> <field name="name">crm_usability.crm.phonecall.tree.inbound</field>
<field name="model">crm.phonecall</field> <field name="model">crm.phonecall</field>
@@ -19,5 +32,6 @@
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="crm_lead_company_rule" model="ir.rule">
<field name="name">Lead/opportunity multi-company rule</field>
<field name="model_id" ref="crm.model_crm_lead"/>
<field name="domain_force">['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
</data>
</openerp>