Groups
Groups
Sign in
Groups
Groups
tryton
Conversations
About
Send feedback
Help
Adding attachments with proteus
41 views
Skip to first unread message
Clemens Hupka
unread,
Aug 10, 2016, 2:55:04 PM
8/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tryton
Hello!
I try to add attachments using proteus (4.0) using the following code:
# p=Product.find(blabla)
img = Attachment()
with open(filename, "rb") as imageFile:
f = imageFile.read()
b = bytearray(f)
img.type = 'data'
img.name
= filenamewithoutpath
img.resource = p
img.data = b
img.save()
Cédric Krier
unread,
Aug 10, 2016, 4:40:04 PM
8/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tryton
I guess it was answered by
http://www.tryton.org/~irclog/2016-08-10.log.html#t2016-08-10%2020:07
--
Cédric Krier - B2CK SPRL
Email/Jabber:
cedric...@b2ck.com
Tel:
+32 472 54 46 59
Website:
http://www.b2ck.com/
Reply all
Reply to author
Forward
0 new messages