[FIX] Apply the patch instead of reverting it. Fix comment
This commit is contained in:
parent
69d4f6da8e
commit
9dc262ac7f
@ -30,7 +30,7 @@ pt_core ()
|
|||||||
|
|
||||||
SRC=$PWD
|
SRC=$PWD
|
||||||
DEST=$DESTDIR/core/
|
DEST=$DESTDIR/core/
|
||||||
OPTIONS="-p1 --verbose -R"
|
OPTIONS="-p1 --verbose"
|
||||||
|
|
||||||
pushd $DEST
|
pushd $DEST
|
||||||
# Already applied:
|
# Already applied:
|
||||||
|
|||||||
@ -2,9 +2,12 @@ diff --git a/odoo/addons/base/models/ir_attachment.py b/odoo/addons/base/models/
|
|||||||
index f1d8701a1..0f7926756 100644
|
index f1d8701a1..0f7926756 100644
|
||||||
--- a/odoo/addons/base/models/ir_attachment.py
|
--- a/odoo/addons/base/models/ir_attachment.py
|
||||||
+++ b/odoo/addons/base/models/ir_attachment.py
|
+++ b/odoo/addons/base/models/ir_attachment.py
|
||||||
@@ -418,7 +418,10 @@ class IrAttachment(models.Model):
|
@@ -416,9 +416,13 @@ class IrAttachment(models.Model):
|
||||||
|
""" Restricts the access to an ir.attachment, according to referred mode """
|
||||||
|
if self.env.is_superuser():
|
||||||
return True
|
return True
|
||||||
# Always require an internal user (aka, employee) to access to a attachment
|
- # Always require an internal user (aka, employee) to access to a attachment
|
||||||
|
+ # Either internal users or Portal users (for some models) have access to attachments
|
||||||
if not (self.env.is_admin() or self.env.user.has_group('base.group_user')):
|
if not (self.env.is_admin() or self.env.user.has_group('base.group_user')):
|
||||||
- raise AccessError(_("Sorry, you are not allowed to access this document."))
|
- raise AccessError(_("Sorry, you are not allowed to access this document."))
|
||||||
+ res_models = ['account.move', 'stock.picking',
|
+ res_models = ['account.move', 'stock.picking',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user