diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/event_sms/views | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/event_sms/views')
| -rw-r--r-- | addons/event_sms/views/event_mail_views.xml | 41 | ||||
| -rw-r--r-- | addons/event_sms/views/event_views.xml | 42 |
2 files changed, 83 insertions, 0 deletions
diff --git a/addons/event_sms/views/event_mail_views.xml b/addons/event_sms/views/event_mail_views.xml new file mode 100644 index 00000000..430eef7d --- /dev/null +++ b/addons/event_sms/views/event_mail_views.xml @@ -0,0 +1,41 @@ +<?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> diff --git a/addons/event_sms/views/event_views.xml b/addons/event_sms/views/event_views.xml new file mode 100644 index 00000000..fb49147c --- /dev/null +++ b/addons/event_sms/views/event_views.xml @@ -0,0 +1,42 @@ +<?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> |
