Files
odoo_source/addons/event_sms/views/event_mail_views.xml
T
Thibault Delavallée 62ac23f0b9 [ADD] event_sms: allow to schedule SMS in event communication
PURPOSE

Allow the user to schedule SMS communication on events

SPECIFICATION

In event.event form view:
  * rename tab 'Email Schedule' to 'Communication'
  * add a selection field at the beginning of event_mail_ids with label 'Send'
    and values 'Email' and 'SMS Text Message' (required with default value
    'Email');
  * add support of SMS template and SMS sending in event communication;

When sending SMS on event registrations, keep a log of what has been sent.
Use mobile or phone field of event registration as both may contain valid
values, like partner model.

Add SMS template data
  * Name: Event: Registration (see data)
  * Name: Event: Reminder (see data)

Improve registration model
  * add a mobile field to the attendees form view: https://nimb.ws/p0VvyS

Technically this task uses the newly-introduced API methods allowing to
send and schedule SMS.

LINKS

Task 1922187
Part of PR #34705
2019-07-25 11:47:20 +00:00

42 lines
2.1 KiB
XML

<?xml version="1.0"?>
<odoo><data>
<record id="event_mail_view_form" model="ir.ui.view">
<field name="name">event.mail.view.form.inherit.sms</field>
<field name="model">event.mail</field>
<field name="inherit_id" ref="event.view_event_mail_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='notification_type']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
<xpath expr="//field[@name='template_id']" position="attributes">
<attribute name="attrs">{'readonly': [('notification_type', '!=', 'mail')], 'required': [('notification_type', '=', 'mail')]}</attribute>
</xpath>
<xpath expr="//field[@name='template_id']" position="after">
<field name="sms_template_id"
attrs="{'readonly': [('notification_type', '!=', 'sms')], 'required': [('notification_type', '=', 'sms')]}"
context="{'default_model': 'event.registration'}"/>
</xpath>
</field>
</record>
<record id="event_mail_view_tree" model="ir.ui.view">
<field name="name">event.mail.view.tree.inherit.sms</field>
<field name="model">event.mail</field>
<field name="inherit_id" ref="event.view_event_mail_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='notification_type']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
<xpath expr="//field[@name='template_id']" position="attributes">
<attribute name="attrs">{'readonly': [('notification_type', '!=', 'mail')], 'required': [('notification_type', '=', 'mail')]}</attribute>
</xpath>
<xpath expr="//field[@name='template_id']" position="after">
<field name="sms_template_id"
attrs="{'readonly': [('notification_type', '!=', 'sms')], 'required': [('notification_type', '=', 'sms')]}"
context="{'default_model': 'event.registration'}"/>
</xpath>
</field>
</record>
</data></odoo>