Some of the feature of the "My Activities" list view of the crm app were not
available on the regular crm tree view.
This commit aligns the 2 views by sharing these features, notably:
- You can "snooze" your next activity if there is one
- You can contact the lead by email with a direct button on the row/list header
- You can contact the lead by sms with a direct button on the row/list header
The "team_id" column is now optional="hide" since not required most of the time
when you go to check your own leads (and can be activated in a few clicks if
needed).
Finally, the "Email" action at the end of the tree row is now in "single" mode
to allow adding contacts on the fly. This implied re-introducing an action that
was recently removed in 8c65d7c5f7
Further demonstrating that R&D is just an eternal loop.
UPG PR odoo/upgrade#2064
Task-2390500
closes odoo/odoo#62289
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
45 lines
2.0 KiB
XML
45 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Add action entry in the Action Menu for Leads -->
|
|
<record id="crm_lead_act_window_sms_composer_single" model="ir.actions.act_window">
|
|
<field name="name">Send SMS Text Message</field>
|
|
<field name="res_model">sms.composer</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
<field name="context">{
|
|
'default_composition_mode': 'mass',
|
|
'default_mass_keep_log': True,
|
|
'default_res_ids': active_ids
|
|
}</field>
|
|
<field name="binding_model_id" ref="model_crm_lead"/>
|
|
<field name="binding_view_types">list</field>
|
|
</record>
|
|
<record id="crm_lead_act_window_sms_composer_multi" model="ir.actions.act_window">
|
|
<field name="name">Send SMS Text Message</field>
|
|
<field name="res_model">sms.composer</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">new</field>
|
|
<field name="context">{
|
|
'default_composition_mode': 'comment',
|
|
'default_res_id': active_id,
|
|
}</field>
|
|
<field name="binding_model_id" ref="model_crm_lead"/>
|
|
<field name="binding_view_types">form</field>
|
|
</record>
|
|
|
|
<record id="crm_case_tree_view_oppor" model="ir.ui.view">
|
|
<field name="name">crm.lead.tree.opportunity.inherit.sms</field>
|
|
<field name="model">crm.lead</field>
|
|
<field name="inherit_id" ref="crm.crm_case_tree_view_oppor"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//header" position="inside">
|
|
<button name="%(crm_sms.crm_lead_act_window_sms_composer_single)d" type="action" string="SMS" />
|
|
</xpath>
|
|
<xpath expr="//button[@name='%(crm.action_lead_mail_compose)d']" position="after">
|
|
<button name="%(crm_sms.crm_lead_act_window_sms_composer_multi)d" type="action" string="SMS" icon="fa-comments" />
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|