PURPOSE
Sending SMS is sometimes required as an immediate marketing tool.
Using delayed crons is not always the best user choice. Implement a
Send Now mechanism in batch SMS.
SPECIFICATIONS
Allow to send directly SMS when doing SMS marketing
SMS Application
* in sms composer, in mass mode: rename Send SMS to Put in queue and
add a Send Now button by-passing the queue;
* set Put in queue as primary, Send Now as secondary;
SMS Marketing Application
* in mailing view for SMS: rename Send SMS to Put in queue and
add a Send Now button by-passing the queue;
* set Put in queue as primary, Send Now as secondary;
Tests of SMS marketing with 400 contacts to SMS indicates it takes about
10 seconds to be completed which is considered as ok.
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
62 lines
3.5 KiB
XML
62 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="sms_composer_view_form" model="ir.ui.view">
|
|
<field name="name">sms.composer.view.form</field>
|
|
<field name="model">sms.composer</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Send an SMS">
|
|
<sheet>
|
|
<group>
|
|
<field name="composition_mode" invisible="1"/>
|
|
<field name="res_id" invisible="1"/>
|
|
<field name="res_ids" invisible="1"/>
|
|
<field name="active_domain" invisible="1"/>
|
|
<field name="res_model" invisible="1"/>
|
|
<field name="mass_force_send" invisible="1"/>
|
|
<field name="number_field_name" invisible="1"/>
|
|
<field name="partner_ids" invisible="1"/>
|
|
<field name="numbers" invisible="1"/>
|
|
<field name="sanitized_numbers" invisible="1"/>
|
|
|
|
<!-- Mass mode information (res_ids versus active domain) -->
|
|
<div colspan="2" class="alert alert-info text-center mb-3" role="alert"
|
|
attrs="{'invisible': [('composition_mode', '=', 'comment')]}">
|
|
<p class="my-0">
|
|
<span attrs="{'invisible': [('use_active_domain', '=', 'True')]}">
|
|
<field class="oe_inline font-weight-bold" name="res_ids_count"/> records selected.
|
|
</span>
|
|
Check <field class="oe_inline ml-2" name="use_active_domain"/> to send to all
|
|
<field class="oe_inline font-weight-bold ml-2" name="active_domain_count"/> records instead. <br/>
|
|
<field class="oe_inline font-weight-bold" name="recipient_count"/> recipients are valid
|
|
and <field class="oe_inline font-weight-bold" name="recipient_invalid_count"/> are invalid.
|
|
</p>
|
|
</div>
|
|
<field name="recipient_description" string="Recipients"
|
|
readonly="1"
|
|
attrs="{'invisible': [('composition_mode', '!=', 'comment')]}"/>
|
|
<field name="body" widget="sms_widget"/>
|
|
<field name="mass_keep_log" invisible="1"/>
|
|
</group>
|
|
</sheet>
|
|
<footer>
|
|
<button string="Send SMS" type="object" class="oe_highlight" name="action_send_sms"
|
|
attrs="{'invisible': [('composition_mode', 'not in', ('comment', 'numbers'))]}"/>
|
|
<button string="Put in queue" type="object" class="oe_highlight" name="action_send_sms"
|
|
attrs="{'invisible': [('composition_mode', '!=', 'mass')]}"/>
|
|
<button string="Send Now" type="object" name="action_send_sms_mass_now"
|
|
attrs="{'invisible': [('composition_mode', '!=', 'mass')]}"/>
|
|
<button string="Close" class="btn btn-secondary" special="cancel"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="sms_composer_action_form" 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>
|
|
</record>
|
|
|
|
</odoo>
|