On 2016-08-10 11:40, Clemens Hupka wrote: > 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()
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: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/20160810203652.GR5597%40tetsuo.
