You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
5.6 KiB
104 lines
5.6 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- WhatsApp Message XML Definition. This XML file defines the Odoo
|
|
views and actions for WhatsApp messages.-->
|
|
<record id="view_whatsapp_message_form" model="ir.ui.view">
|
|
<field name="name">whatsapp.message.view.form</field>
|
|
<field name="model">whatsapp.message</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Send WhatsApp Message ">
|
|
<group>
|
|
<field name="partner_name" string="Name" readonly="1"/>
|
|
<field name="partner_mobile" string="Whatsapp Number"
|
|
readonly="1"/>
|
|
</group>
|
|
<group/>
|
|
<group>
|
|
<field name="message_type" widget="radio"
|
|
options="{'horizontal': true}"/>
|
|
</group>
|
|
<group/>
|
|
<group/>
|
|
<group>
|
|
<field name="text_message"
|
|
attrs="{'invisible': [('message_type', 'in', ('contact','location'))]}"/>
|
|
<field name="text"
|
|
attrs="{'invisible': [('message_type', 'not in', ('button','list'))]}"/>
|
|
<field name="footer_text"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
<field name="section_title"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
<field name="yes_text"
|
|
attrs="{'invisible': [('message_type', '!=', 'button')]}"/>
|
|
<field name="no_text"
|
|
attrs="{'invisible': [('message_type', '!=', 'button')]}"/>
|
|
<field name="later_text"
|
|
attrs="{'invisible': [('message_type', '!=', 'button')]}"/>
|
|
<field name="partner_ids"
|
|
attrs="{'invisible': [('message_type', 'not in', ('contact','location'))]}"
|
|
widget="many2many_tags"/>
|
|
</group>
|
|
<group attrs="{'invisible': [('message_type', '!=', 'list')]}">
|
|
<group string="Option 1 Details">
|
|
<field name="section1_title"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
<field name="section1_description"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
</group>
|
|
<group string="Option 2 Details">
|
|
<field name="section2_title"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
<field name="section2_description"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
</group>
|
|
<group string="Option 3 Details">
|
|
<field name="section3_title"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
<field name="section3_description"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
</group>
|
|
<group string="Option 4 Details">
|
|
<field name="section4_title"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
<field name="section4_description"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
</group>
|
|
</group>
|
|
<button name="action_send_message" string="Send Message"
|
|
type="object"
|
|
icon="fa-comment" class="btn-success"
|
|
attrs="{'invisible': [('message_type', '!=', 'text')]}"/>
|
|
<button name="action_send_intractive_message"
|
|
string="Send Interactive Button Message" type="object"
|
|
icon="fa-share-square-o" class="btn-success"
|
|
attrs="{'invisible': [('message_type', '!=', 'button')]}"/>
|
|
<button name="action_send_contact_details"
|
|
string="Send Contact Details"
|
|
type="object"
|
|
icon="fa-mobile" class="btn-success"
|
|
attrs="{'invisible': [('message_type', '!=', 'contact')]}"/>
|
|
<button name="action_send_interactive_list_message"
|
|
string="Send Interactive List Message"
|
|
type="object"
|
|
icon="fa-list-alt" class="btn-success"
|
|
attrs="{'invisible': [('message_type', '!=', 'list')]}"/>
|
|
<button name="action_send_location_details"
|
|
string="Send Location"
|
|
type="object"
|
|
icon="fa-map-marker" class="btn-success"
|
|
attrs="{'invisible': [('message_type', '!=', 'location')]}"/>
|
|
<footer>
|
|
<button string="Cancel" class="btn-secondary"
|
|
special="cancel"/>
|
|
</footer>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="whatsapp_message_action" model="ir.actions.act_window">
|
|
<field name="name">WhatsApp Message Action</field>
|
|
<field name="res_model">whatsapp.message</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="view_id" ref="view_whatsapp_message_form"/>
|
|
<field name="target">new</field>
|
|
</record>
|
|
</odoo>
|
|
|