Fix traceback when creating a new contact by checking the id list is not empty Filter default reporting by name rather then by campaign (as campaign is an option) Group by Campaign only if the option is checked to enforce coherency. > This is unblocked with a group. Hide the 'replied' status from sms reports as it is not relevant for sms. Remove the preview message for sms as it is not relevant elsewhere then the object of mails. Warn the user if he's trying to send a sms with only white-space characters. > this causes an error because the plaintext-html conversion in mail_thread.py > consider a white-spaces-only text as empty. Mobile placeholder added for a better understanding of the field by the user. Task ID : 2302578 closes odoo/odoo#61461 X-original-commit: e6496af1ea31b2c699de9e41196a9ae3a07efb7f Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
79 lines
4.9 KiB
XML
79 lines
4.9 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="comment_single_recipient" 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="recipient_single_valid" invisible="1"/>
|
|
<field name="recipient_single_number" invisible="1"/>
|
|
<field name="number_field_name" invisible="1"/>
|
|
<field name="numbers" invisible="1"/>
|
|
<field name="sanitized_numbers" invisible="1"/>
|
|
|
|
<!-- Single mode information (invalid number) -->
|
|
<div colspan="2" class="alert alert-danger text-center mb-3" role="alert"
|
|
attrs="{'invisible': ['|', ('comment_single_recipient', '=', False), ('recipient_single_valid', '=', True)]}">
|
|
<p class="my-0">Invalid phone number</p>
|
|
</div>
|
|
|
|
<!-- Mass mode information (res_ids versus active domain) -->
|
|
<div colspan="2" class="alert alert-info text-center mb-3" role="alert"
|
|
attrs="{'invisible': [('comment_single_recipient', '=', True)]}">
|
|
<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_valid_count"/> recipients are valid
|
|
and <field class="oe_inline font-weight-bold" name="recipient_invalid_count"/> are invalid.
|
|
</p>
|
|
</div>
|
|
|
|
<label for="recipient_single_description" string="Recipient"
|
|
class="font-weight-bold"
|
|
attrs="{'invisible': [('comment_single_recipient', '=', False)]}"/>
|
|
<div attrs="{'invisible': [('comment_single_recipient', '=', False)]}">
|
|
<field name="recipient_single_description" class="oe_inline"/>
|
|
<field name="recipient_single_number_itf" class="oe_inline" nolabel="1" options="{'onchange_on_keydown': True}" placeholder="e.g. +1 415 555 0100"/>
|
|
</div>
|
|
|
|
<field name="body" widget="sms_widget"/>
|
|
<field name="mass_keep_log" invisible="1"/>
|
|
</group>
|
|
</sheet>
|
|
<footer>
|
|
<!-- attrs doesn't work for 'disabled'-->
|
|
<button string="Send SMS" type="object" class="oe_highlight" name="action_send_sms"
|
|
attrs="{'invisible': ['|',('composition_mode', 'not in', ('comment', 'numbers')),('recipient_single_valid', '=', False)]}"/>
|
|
<button string="Send SMS" type="object" class="oe_highlight" name="action_send_sms"
|
|
attrs="{'invisible': ['|',('composition_mode', 'not in', ('comment', 'numbers')),('recipient_single_valid', '=', True)]}" disabled='1'/>
|
|
<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>
|