I have config FTP in my local system. I have put one CSV file into one folder now I can get the CSV file and create the attachment to that CSV file so how can I attach that CSV file. I have some code about connect with FTP file. but no idea how to get and attach in attachment or direct download that file
path = '/home/Demo/FTP/Test/'
filename = 'PE_20180727093212.csv'
ftp = ftplib.FTP("127.0.0.1")
ftp.login("demo", "demo")
ftp.cwd(path)
ftp.retrbinary("RETR " + filename, open(filename, 'wb').write)
ftp.quit()
Did u find out the proper answer for how to attach the FTP file in odoo?