File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,21 +243,26 @@ Review results for batch operation:
243243 for error in fault.Error:
244244 print "Error " + error.Message
245245
246+ Attachments
247+ ----------------
246248
247249Adding attachments (See `Attachable documentation `_ for list of valid file types):
248250
249251::
250252
251253 attachment = Attachable()
252254
253- attachment.AttachableRef = AttachableRef()
254- attachment.AttachableRef.EntityRef = entity.to_ref()
255+ attachable_ref = AttachableRef()
256+ attachable_ref = .EntityRef = entity.to_ref()
257+
258+ attachment.AttachableRef.append(attachable_ref)
255259
256260 attachment.FileName = 'Filename'
257261 attachment._FilePath = 'full path to file'
258262 attachment.ContentType = 'application/pdf'
259263 attachment.save(qb=qb)
260264
265+
261266**Note: ** Objects and object property names match their Quickbooks
262267counterparts and do not follow PEP8.
263268
You can’t perform that action at this time.
0 commit comments