fix(odoo): cambiar tree a list para Odoo 17+
- Reemplazar <tree> por <list> en todas las vistas - Cambiar mode="tree" a mode="list" - Actualizar view_partner_tree a view_partner_list - Actualizar view_mode de tree,form a list,form En Odoo 17+, el tipo de vista "tree" fue renombrado a "list". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,14 +29,14 @@
|
||||
<!-- Add WhatsApp notebook page -->
|
||||
<xpath expr="//notebook" position="inside">
|
||||
<page string="WhatsApp" name="whatsapp" invisible="whatsapp_conversation_count == 0">
|
||||
<field name="whatsapp_conversation_ids" mode="tree" readonly="1">
|
||||
<tree>
|
||||
<field name="whatsapp_conversation_ids" mode="list" readonly="1">
|
||||
<list>
|
||||
<field name="account_id"/>
|
||||
<field name="status" widget="badge"/>
|
||||
<field name="last_message_at"/>
|
||||
<field name="last_message_preview"/>
|
||||
<field name="unread_count" widget="badge" decoration-danger="unread_count > 0"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</xpath>
|
||||
@@ -47,7 +47,7 @@
|
||||
<record id="view_partner_tree_whatsapp" model="ir.ui.view">
|
||||
<field name="name">res.partner.tree.whatsapp</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_tree"/>
|
||||
<field name="inherit_id" ref="base.view_partner_list"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='phone']" position="after">
|
||||
<field name="whatsapp_unread_count" widget="badge" decoration-danger="whatsapp_unread_count > 0" optional="show"/>
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<field name="name">whatsapp.account.tree</field>
|
||||
<field name="model">whatsapp.account</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="phone_number"/>
|
||||
<field name="status" widget="badge" decoration-success="status == 'connected'" decoration-warning="status == 'connecting'" decoration-danger="status == 'disconnected'"/>
|
||||
<field name="is_default"/>
|
||||
<field name="conversation_count"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -58,6 +58,6 @@
|
||||
<record id="action_whatsapp_account" model="ir.actions.act_window">
|
||||
<field name="name">Cuentas WhatsApp</field>
|
||||
<field name="res_model">whatsapp.account</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="name">whatsapp.conversation.tree</field>
|
||||
<field name="model">whatsapp.conversation</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree decoration-bf="unread_count > 0">
|
||||
<list decoration-bf="unread_count > 0">
|
||||
<field name="display_name"/>
|
||||
<field name="phone_number"/>
|
||||
<field name="status" widget="badge" decoration-info="status == 'bot'" decoration-warning="status == 'waiting'" decoration-success="status == 'active'" decoration-muted="status == 'resolved'"/>
|
||||
@@ -13,7 +13,7 @@
|
||||
<field name="last_message_at"/>
|
||||
<field name="last_message_preview"/>
|
||||
<field name="unread_count" widget="badge" decoration-danger="unread_count > 0"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Mensajes" name="messages">
|
||||
<field name="message_ids" mode="tree" readonly="1">
|
||||
<tree>
|
||||
<field name="message_ids" mode="list" readonly="1">
|
||||
<list>
|
||||
<field name="create_date"/>
|
||||
<field name="direction" widget="badge"/>
|
||||
<field name="content"/>
|
||||
<field name="status" widget="badge"/>
|
||||
<field name="sent_by_id"/>
|
||||
</tree>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -119,7 +119,7 @@
|
||||
<record id="action_whatsapp_conversation" model="ir.actions.act_window">
|
||||
<field name="name">Conversaciones</field>
|
||||
<field name="res_model">whatsapp.conversation</field>
|
||||
<field name="view_mode">kanban,tree,form</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="context">{'search_default_filter_active': 1}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user