summaryrefslogtreecommitdiff
path: root/addons/sms/views
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-07-02 15:07:09 +0000
committerThibault Delavallée <tde@odoo.com>2019-07-18 09:57:47 +0000
commit16b3bf78a05425cc1f5f267fcbfe90fea26fafb7 (patch)
treed4705d6d786f7e222ba1550dd328762973f3c34e /addons/sms/views
parented4c67adb2dc1eb821a72f5286452b8c5889f4fe (diff)
[IMP] sms: allow to send SMS from server (and automated) actions
PURPOSE Send SMS from server/automated actions. Indeed we can already send emails from server actions. The goal is to have the same thing for the sms. SPECIFICATION Purpose of this commit is to add support of sending batch SMS through server actions. This means sending SMS will be available also for automated (base automation) and scheduled actions (cron). A new type of server action is added: sms. User choose an sms.template to use to send SMS in batch. An option allow to choose to keep archive on selected records. If no archive is kept, a batch of sms is created. With archive a _message_sms is performed with note subtype, allowing to have a discuss messages with only sms customer being notified. Linked to task 1935280 Part of PR #34864
Diffstat (limited to 'addons/sms/views')
-rw-r--r--addons/sms/views/ir_actions_views.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/sms/views/ir_actions_views.xml b/addons/sms/views/ir_actions_views.xml
new file mode 100644
index 00000000000..8c6e3b72c5c
--- /dev/null
+++ b/addons/sms/views/ir_actions_views.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo><data>
+
+ <record id="ir_actions_server_view_form" model="ir.ui.view">
+ <field name="name">ir.actions.server.view.form.inherit.sms</field>
+ <field name="model">ir.actions.server</field>
+ <field name="inherit_id" ref="base.view_server_action_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='link_field_id']" position="after">
+ <field name="sms_template_id"
+ attrs="{'invisible': [('state', '!=', 'sms')],
+ 'required': [('state', '=', 'sms')]}"/>
+ <field name="sms_mass_keep_log"
+ attrs="{'invisible': [('state', '!=', 'sms')]}"/>
+ </xpath>
+ </field>
+ </record>
+
+</data></odoo>