@@ -340,6 +354,10 @@
+
|
+
Name:
-
+
|
diff --git a/plm_box/models/ir_attachment.py b/plm_box/models/ir_attachment.py
index 27b8787e..44ff3e3f 100755
--- a/plm_box/models/ir_attachment.py
+++ b/plm_box/models/ir_attachment.py
@@ -55,14 +55,11 @@ def create(self, vals):
name = self.getNewSequencedName(vals)
vals['name'] = name
return super(Plm_box_document, self).create(vals)
-
+
def getCheckOutUser(self):
- for docBrws in self:
- checkOutObj = self.env.get('plm.checkout')
- checkOutBrwsList = checkOutObj.search([('documentid', '=', docBrws.id)])
- for checkOutBrws in checkOutBrwsList:
- if checkOutBrws:
- return self.getUserNameFromId(checkOutBrws.write_uid)
+ for checkOutBrws in self._getCheckOutUser():
+ if checkOutBrws:
+ return checkOutBrws.name
return ''
@api.model