How to create new attachments in Odoo? How do they work?
问题 I want to create an attachment from python code. So, what I have tried: self.env['ir.attachment'].create({ 'store_fname' : ??, 'checksum' : ?? }) What values should be passed for the column 'store_fname' and 'checksum' in ir_attachment table? 回答1: Those fields should be filled automatically: The store_fname is the folder and the name that the file uses when it is store in the filestore folder The checksum concides with the file name as well. It is the result of applying the sha1 algorythm to