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
43 lines
2.1 KiB
XML
43 lines
2.1 KiB
XML
<?xml version="1.0"?>
|
|
<odoo><data>
|
|
|
|
<record id="event_type_view_form" model="ir.ui.view">
|
|
<field name="name">event.type.view.form.inherit.sms</field>
|
|
<field name="model">event.type</field>
|
|
<field name="inherit_id" ref="event.view_event_type_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_event_view_form_inherit_sms" model="ir.ui.view">
|
|
<field name="name">event.event.view.form</field>
|
|
<field name="model">event.event</field>
|
|
<field name="inherit_id" ref="event.view_event_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>
|
|
|
|
</data></odoo>
|