Visitor (Norway), Fabien Pinckaers (fp) mailing list archives

Hello Fabian. Thanks for the b [...]

by - 11/25/2016 11:09:32

Hello Fabian. Thanks for the beer at the Odoo experience this year :) Odoo10: in my custom.model, i have defined a field: contract2_id = fields.Binary(string="Field name", attachment='True') when i go to: settings -> technical -> attachments I can't find my attachment. But if i look in the table (via psql) i is there. Q1: How can i get the attachments to appear in the view? Q2: (somewhat related) I have defined an "action button_save_form_and_upload_contract" where i save the current form, and i want to return the "standard" attachement-form. How do i do this? # return { # 'name':'form_name', # 'view_type':'form', # 'view_mode':'tree', # 'views' : [(view_id,'form')], # 'res_model':'ir.attachment', # 'res_id': id, # 'view_id':view_id, # 'type':'ir.actions.act_window', # 'target':'new', # 'context':context, # }