I try to add the sum of attachments which are added to a form - to show in the tree view. But I m not able to find the right synthax. Odoo 8.
Tried a lot of variations like
<field name="attachement_ids"/>
but did not hit the right one. Anybody knows? Thanks.
EDIT:
With the code given by Emipro Technologies in odoo 8 I get this traceball:
File "/opt/odoo/openerp/api.py", line 395, in new_api result = [method(rec, *args, **kwargs) for rec in self]
File "/media/cenguru-server/odoo-addons-test/geraete/models.py", line 114, in count_attachments attachment_ids = obj_attachment.search([('res_model','=','geraetespezifikation'),('res_id','=',record.id)]).ids
File "/opt/odoo/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) TypeError: search() takes at least 4 arguments (2 given)
Which arguments are missing - where can I find documentation of functions like obj_attachment.search?
Could you help me again?