diff --git a/addons/website/models/mixins.py b/addons/website/models/mixins.py index 5f6f80695c7..ce3ba7a268d 100644 --- a/addons/website/models/mixins.py +++ b/addons/website/models/mixins.py @@ -122,6 +122,7 @@ class WebsiteMultiMixin(models.AbstractModel): string="Website", ondelete="restrict", help="Restrict publishing to this website.", + index=True, ) def can_access_from_current_website(self, website_id=False): @@ -139,7 +140,7 @@ class WebsitePublishedMixin(models.AbstractModel): _description = 'Website Published Mixin' website_published = fields.Boolean('Visible on current website', related='is_published', readonly=False) - is_published = fields.Boolean('Is Published', copy=False, default=lambda self: self._default_is_published()) + is_published = fields.Boolean('Is Published', copy=False, default=lambda self: self._default_is_published(), index=True) can_publish = fields.Boolean('Can Publish', compute='_compute_can_publish') website_url = fields.Char('Website URL', compute='_compute_website_url', help='The full URL to access the document through the website.')