Skip to content

Commit

Permalink
FIX: checkout functionanlity on non admin user
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Oct 15, 2024
1 parent 3d59c5f commit 9a49cb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plm/models/ir_attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,9 +1213,9 @@ def _is_checkout(self):
for ir_attachment_id in self:
_docName, _docRev, chekOutUser, _hostName = self.env['ir.attachment'].getCheckedOut(ir_attachment_id.id, None)
if chekOutUser:
ir_attachment_id.is_checkout = True
ir_attachment_id.with_context(check=False).is_checkout = True
else:
ir_attachment_id.is_checkout = False
ir_attachment_id.with_context(check=False).is_checkout = False

def getFileExtension(self, docBrws):
fileExtension = ''
Expand Down

0 comments on commit 9a49cb8

Please sign in to comment.