This question has been flagged
2841 Views

In working on a custom module I needed to add some fields to the existing upload_attachment method. I copied it from main.py/Binary. One field I wanted to add session_id seems to cause a conflict in werkzeug.

{"message": "OpenERP WebClient Error", "code": 300, "data": {"debug": "Client Traceback (most recent call last):\n File \"/home/think/openerp/server/openerp/addons/web/http.py\", line 277, in dispatch\n r = method(self, **self.params)\nTypeError: upload_attachment() takes exactly 9 arguments (8 given)\n", "type": "client_exception"}}

This error is generated by werkzeug.exceptions.InternalServerError from within a catch-all except Exception block in http.py so it isn't easy to trace it back further. The problem is rectified if I change the name of the field to sid. It looks like a bug to me but before I report it I wanted to see if anybody else can shed light on this weirdness.

Avatar
Discard