From e2ed69b79838b5810fb39219d4457726ce5a002c Mon Sep 17 00:00:00 2001 From: Leonardo Pavan Rocha Date: Mon, 27 Jun 2022 11:47:30 +0000 Subject: [PATCH] [FIX] calendar: add index on access_token field Since the access_token is used in the videocall_location route, it makes sense to create an index on this column to allow faster lookup. This commit adds the index to this field since it's creation in 15.3. closes odoo/odoo#94714 X-original-commit: 3b753dc2f5fcac03f719cd16e9c0216bae83e9b7 Signed-off-by: Yannick Tivisse (yti) Signed-off-by: Leonardo Pavan Rocha --- addons/calendar/models/calendar_event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/calendar/models/calendar_event.py b/addons/calendar/models/calendar_event.py index 473094ab60d..8a07ef7cd4d 100644 --- a/addons/calendar/models/calendar_event.py +++ b/addons/calendar/models/calendar_event.py @@ -95,7 +95,7 @@ class Meeting(models.Model): 'res.partner', string='Scheduled by', related='user_id.partner_id', readonly=True) location = fields.Char('Location', tracking=True, help="Location of Event") videocall_location = fields.Char('Meeting URL', compute='_compute_videocall_location', store=True, copy=True) - access_token = fields.Char('Invitation Token', store=True, copy=False) + access_token = fields.Char('Invitation Token', store=True, copy=False, index=True) videocall_source = fields.Selection([('discuss', 'Discuss'), ('custom', 'Custom')], compute='_compute_videocall_source') videocall_channel_id = fields.Many2one('mail.channel', 'Discuss Channel') # visibility