[FIX] Apply the patch instead of reverting it. Fix comment

This commit is contained in:
Jorge Enrique Gómez Gómez 2023-03-09 02:21:29 -05:00
parent 69d4f6da8e
commit 9dc262ac7f
2 changed files with 6 additions and 3 deletions

View File

@ -30,7 +30,7 @@ pt_core ()
SRC=$PWD
DEST=$DESTDIR/core/
OPTIONS="-p1 --verbose -R"
OPTIONS="-p1 --verbose"
pushd $DEST
# Already applied:

View File

@ -2,9 +2,12 @@ diff --git a/odoo/addons/base/models/ir_attachment.py b/odoo/addons/base/models/
index f1d8701a1..0f7926756 100644
--- a/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
# 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')):
- raise AccessError(_("Sorry, you are not allowed to access this document."))
+ res_models = ['account.move', 'stock.picking',