From 28592254b2f9443d4db7fcfafde678ee42842d12 Mon Sep 17 00:00:00 2001 From: Claude AI Date: Fri, 30 Jan 2026 00:38:13 +0000 Subject: [PATCH] fix(odoo): agregar store=True a campos computados MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - unread_count: necesario para filtros de búsqueda - last_message_preview: necesario para vistas Campos computados sin store=True no pueden usarse en dominios de filtros. Co-Authored-By: Claude Opus 4.5 --- odoo_whatsapp_hub/models/whatsapp_conversation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/odoo_whatsapp_hub/models/whatsapp_conversation.py b/odoo_whatsapp_hub/models/whatsapp_conversation.py index 093058d..5315b23 100644 --- a/odoo_whatsapp_hub/models/whatsapp_conversation.py +++ b/odoo_whatsapp_hub/models/whatsapp_conversation.py @@ -38,6 +38,7 @@ class WhatsAppConversation(models.Model): last_message_preview = fields.Char( string='Último Mensaje', compute='_compute_last_message', + store=True, ) message_ids = fields.One2many( 'whatsapp.message', @@ -56,6 +57,7 @@ class WhatsAppConversation(models.Model): unread_count = fields.Integer( string='No Leídos', compute='_compute_unread_count', + store=True, ) @api.depends('partner_id', 'contact_name', 'phone_number')