Files
odoo_source/addons/crm/data/crm_data.xml
T
Thibault Delavallée ff0053b416 [FIX] crm: fix behavior of 'Emails' checkbox in settings
Currently there are several issues with this configuration box

 * default_<field> does not generate automatically ir.values anymore.
   Defining default_model does not work since it is not linked to an
   existing <field> in current model sale.config.settings. Checkbox
   value is therefore not saved and lost at reload;
 * box label is not clear as user may understand unchecking it drops
   all aliases or email support. This is not the case as it is only used
   to define an alias creating unassigned leads. This is a rare use case
   where leads assignation is done manually;
 * checking / unchecking the 'Emails' box does not have any effect on
   default info alias. This is counter-intuitive as user asks to remove
   the feature but it still works in background;

This commit fixes those issues by

 * correctly setting the checkbox value in an ir.config_parameter so that
   it is not lost anymore at reload;
 * inactivating info alias by default;
 * adding onchanges so that values are reset when unchecking checkboxes;
 * updating string and displayed label and helps for the 'Emails' section;
 * putting that Emails checkbox in advanced mode as it is a rare use case;
2017-03-21 17:20:50 +01:00

43 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="sales_team.team_sales_department" model="crm.team">
<field name="use_opportunities">True</field>
<field name="use_leads">True</field>
<field name="alias_name">sales</field>
<field name="dashboard_graph_model">pipeline</field>
</record>
<!--default alias for leads-->
<record id="mail_alias_lead_info" model="mail.alias">
<field name="alias_name"></field>
<field name="alias_model_id" ref="model_crm_lead"/>
<field name="alias_user_id" ref="base.user_root"/>
<field name="alias_parent_model_id" ref="model_crm_team"/>
</record>
<!-- notify all employees of module installation -->
<record id="module_install_notification" model="mail.message">
<field name="model">mail.channel</field>
<field name="res_id" ref="mail.channel_all_employees"/>
<field name="message_type">email</field>
<field name="subtype_id" ref="mail.mt_comment"/>
<field name="subject">CRM application installed!</field>
<field name="body"><![CDATA[<p>From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings, get realtime statistics and efficiently organize the communication with your prospects.</p>
<p>To manage quotations and sales orders, install the "Sales Management" application.</p>]]></field>
</record>
<!-- opportunities' lost causes -->
<record id="lost_reason_1" model="crm.lost.reason">
<field name="name">Too expensive</field>
</record>
<record id="lost_reason_2" model="crm.lost.reason">
<field name="name">We don't have people/skills</field>
</record>
<record id="lost_reason_3" model="crm.lost.reason">
<field name="name">Not enough stock</field>
</record>
</data>
</odoo>