I'm working on a custom module where I first need to generate a zip file (containing 3-4 CSV files) on the disk. Once it is done I want to upload that zip file into Odoo sales module as an attachment (ir.attachment) inside the related sales order. This way user can anytime download that zip file to view the archived files.
I'm able to generate zip file successfully on the disk, but after that, I'm not able to find how to attach that zip file (as binary) in the ir.attachment model. Can anyone please help me here?