In Openerp 7 Functional field added with store in Database
I used the below code:-
def _concat_attached_file(self, cr, uid, ids, name, arg, context=None):
res = {}
attachment_obj = self.pool.get('ir.attachment')
for id in ids:
procedure_attachment = attachment_obj.search(cr, uid, [('res_model', '=', 'model_name'), ('res_id', '=', id)], context=context)
filelist = []
for val in attachment_obj.browse(cr, uid, procedure_attachment):
filelist.append(val.name)
filevalue = ', '.join(filelist)
if not filevalue:
filevalue = None
res[id] = filelist
return res
'attached_file' : fields.function(_concat_attached_file, method=True, store=True, string='Attached File Name', type='char'),
But the above functional fields generate output only with Store=False. Suppose used Store=True output not generated. I want to store the db also how to fix ?Thanks