Files
odoo_source/addons/calendar_sms/views/calendar_views.xml
T
Barad Mahendra d5c1cec0b1 [FIX] calendar_sms: Fix traceback on 'send SMS to attendee'
Currently, when go to calendar > list view > action > send sms
to attendees, it will generate the the traceback because default
composition_mode is comment while when you process through the
list then sms_composition mode should be 'mass'.

So in this commit, pass the sms_composition_mode as 'guess' so
it will automatically check the record and take the correct
composition mode and also pass the active_ids as res_ids.

closes odoo/odoo#61909

Taskid: 2344284
X-original-commit: 200ab9fdaeb9cf6f8afcf572c013e2b6cc1e70df
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-17 23:40:30 +00:00

32 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<!-- Add action entry in the Action Menu for Events -->
<record id="calendar_event_act_window_sms_composer_single" model="ir.actions.act_window">
<field name="name">Send SMS to attendees</field>
<field name="res_model">sms.composer</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="context">{
'sms_composition_mode': 'guess',
'default_res_id': active_id,
'default_res_ids': active_ids,
}</field>
</record>
<record id="view_calendar_event_tree_inherited" model="ir.ui.view">
<field name="name">calendar.event.tree.calendar_sms</field>
<field name="model">calendar.event</field>
<field name="inherit_id" ref="calendar.view_calendar_event_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<header>
<button name="%(calendar_event_act_window_sms_composer_single)d" type="action"
string="Send SMS to attendees"/>
</header>
</xpath>
</field>
</record>
</odoo>