[IMP] website: make is_view_active a model method
`is_view_active` relies on the `website` specified in the context. This commit turns `is_view_active` to a model method, to avoid that its callers think the `website` on which it is called is the one used. closes odoo/odoo#103126 X-original-commit: 52d436706bf650bb14f2bc2a398d107ff99f81ea Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -1037,6 +1037,7 @@ class Website(models.Model):
|
||||
raise ValueError('No record found for unique ID %s. It may have been deleted.' % (view_id))
|
||||
return view
|
||||
|
||||
@api.model
|
||||
@tools.ormcache_context('key', keys=('website_id',))
|
||||
def is_view_active(self, key):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user