mirror of
https://github.com/bringout/oca-ocb-web.git
synced 2026-04-21 08:52:03 +02:00
19.0 vanilla
This commit is contained in:
parent
20e6dadd87
commit
4b94f0abc5
205 changed files with 24700 additions and 14614 deletions
|
|
@ -4,8 +4,7 @@
|
|||
from odoo import models
|
||||
|
||||
|
||||
class Attachment(models.Model):
|
||||
|
||||
class IrAttachment(models.Model):
|
||||
_inherit = "ir.attachment"
|
||||
|
||||
def _can_bypass_rights_on_media_dialog(self, **attachment_data):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from werkzeug import urls
|
|||
from odoo import models, api
|
||||
|
||||
|
||||
class Image(models.AbstractModel):
|
||||
class IrQwebFieldImage(models.AbstractModel):
|
||||
_inherit = 'ir.qweb.field.image'
|
||||
|
||||
@api.model
|
||||
|
|
@ -27,4 +27,4 @@ class Image(models.AbstractModel):
|
|||
], limit=1)
|
||||
return attachment.datas
|
||||
|
||||
return super(Image, self).from_html(model, field, element)
|
||||
return super().from_html(model, field, element)
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ class ResUsers(models.Model):
|
|||
# of the overwrite done in 5ef8300.
|
||||
# So to avoid to create a new module bridge, with a lot of code, we prefer to make a check
|
||||
# here for website's user.
|
||||
return self.has_group('base.group_erp_manager') or self.has_group('website.group_website_restricted_editor')
|
||||
return (self.sudo().has_group('base.group_erp_manager')
|
||||
or self.sudo().has_group('website.group_website_restricted_editor'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue