This commit: 1. Adds settings to install the new `web_unsplash` enterprise module. See counterpart commit on enterprise for details. 2. Export `ImageWidget` and `update_control_panel` to be able to override them. 3. Add the unsplash access key rights to website designer. (see related OE commit) task-35060 Closes #25825, closes #25637
21 lines
710 B
Python
21 lines
710 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import api, fields, models
|
|
|
|
|
|
class ResUsers(models.Model):
|
|
_inherit = 'res.users'
|
|
|
|
group_website_user = fields.Selection(
|
|
selection=lambda self: self._get_group_selection('base.module_category_website'),
|
|
string='Website Editor', compute='_compute_groups_id', inverse='_inverse_groups_id',
|
|
category_xml_id='base.module_category_website')
|
|
|
|
@api.multi
|
|
def _has_unsplash_key_rights(self):
|
|
self.ensure_one()
|
|
if self.has_group('website.group_website_designer'):
|
|
return True
|
|
return super(ResUsers, self)._has_unsplash_key_rights()
|