Hello,
I'm overwriting the create method of ir.attachment and got a problem when raise is called. It freezes the web client. Here is a simplified code to test it:
class ir_attachment(osv.osv):
_inherit = 'ir.attachment'
def create(self, cr, uid, vals, context=None):
raise osv.except_osv('Error!',"This is a test")
return super(ir_attachment, self).create(cr, uid, vals, context)
When I try to add an attachment to any resource (a partner for example) the raise is logged on the server side but the popup never appears and the web client get stuck. I guess it's because the system is considering the model and resource of the ir.attachment itself instead of the resource where I'm attaching the document to (ea: the partner). So of course, if I create a document manually in Knowledge->Document the raise will work, but it's not the point.
Anyone has an idea how to solve that ? It would be much appreciated :-)
This is the last issue I have to finalize an OpenERP/Alfresco interface I've been working on and that will be publicly published when this is solved.
Thx
Fabian