feat(odoo): add wizard views
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
77
odoo_whatsapp_hub/wizards/send_whatsapp_wizard.xml
Normal file
77
odoo_whatsapp_hub/wizards/send_whatsapp_wizard.xml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<odoo>
|
||||||
|
<!-- Send WhatsApp Wizard Form -->
|
||||||
|
<record id="view_whatsapp_send_wizard_form" model="ir.ui.view">
|
||||||
|
<field name="name">whatsapp.send.wizard.form</field>
|
||||||
|
<field name="model">whatsapp.send.wizard</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Enviar WhatsApp">
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="partner_id" readonly="partner_id"/>
|
||||||
|
<field name="phone"/>
|
||||||
|
<field name="account_id"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="message_type"/>
|
||||||
|
<field name="attachment_id" invisible="message_type == 'text'"/>
|
||||||
|
<field name="media_url" invisible="message_type == 'text'"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="content" placeholder="Escribe tu mensaje aquí..."/>
|
||||||
|
</group>
|
||||||
|
<footer>
|
||||||
|
<button name="action_send" string="Enviar" type="object" class="btn-primary"/>
|
||||||
|
<button name="action_send_and_open" string="Enviar y Abrir Chat" type="object" class="btn-secondary"/>
|
||||||
|
<button string="Cancelar" class="btn-secondary" special="cancel"/>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Mass WhatsApp Wizard Form -->
|
||||||
|
<record id="view_whatsapp_mass_wizard_form" model="ir.ui.view">
|
||||||
|
<field name="name">whatsapp.mass.wizard.form</field>
|
||||||
|
<field name="model">whatsapp.mass.wizard</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<form string="Envío Masivo WhatsApp">
|
||||||
|
<group>
|
||||||
|
<group>
|
||||||
|
<field name="account_id"/>
|
||||||
|
<field name="use_template"/>
|
||||||
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name="total_count" readonly="1"/>
|
||||||
|
<field name="valid_count" readonly="1"/>
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group string="Contactos">
|
||||||
|
<field name="partner_ids" widget="many2many_tags"/>
|
||||||
|
</group>
|
||||||
|
<group string="Mensaje">
|
||||||
|
<field name="content" placeholder="Escribe tu mensaje aquí... Variables disponibles: {{name}}, {{email}}"/>
|
||||||
|
</group>
|
||||||
|
<div class="alert alert-info" role="alert" invisible="not use_template">
|
||||||
|
<strong>Variables disponibles:</strong>
|
||||||
|
<ul>
|
||||||
|
<li><code>{{name}}</code> - Nombre del contacto</li>
|
||||||
|
<li><code>{{email}}</code> - Email del contacto</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
<button name="action_send" string="Enviar a Todos" type="object" class="btn-primary" confirm="¿Está seguro de enviar el mensaje a todos los contactos seleccionados?"/>
|
||||||
|
<button string="Cancelar" class="btn-secondary" special="cancel"/>
|
||||||
|
</footer>
|
||||||
|
</form>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
|
<!-- Action for Mass Wizard -->
|
||||||
|
<record id="action_whatsapp_mass_wizard" model="ir.actions.act_window">
|
||||||
|
<field name="name">Envío Masivo WhatsApp</field>
|
||||||
|
<field name="res_model">whatsapp.mass.wizard</field>
|
||||||
|
<field name="view_mode">form</field>
|
||||||
|
<field name="target">new</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user