I am using the python package werkzeug to redirect users upon signing a document, using a sign enterprise module in odoo, and it gives me this error.
File "/opt/odoo/enterprise/addons/sign/controllers/main.py", line 106, in sign_document_from_mail
return werkzeug.redirect('/sign/document/%s/%s' % (id, token))
Exception
AttributeError: module 'werkzeug' has no attribute 'redirect'
Here is where is the block of code I think the error is coming from
@http.route(["/sign/document/mail/<int:id>/<token>"], type='http', auth='public')
def sign_document_from_mail(self, id, token):
sign_request = request.env['sign.request'].sudo().browse(id)
if not sign_request:
return http.request.render('sign.deleted_sign_request')
current_request_item = sign_request.request_item_ids.filtered(lambda r: r.access_token == token)
current_request_item.access_via_link = True
return werkzeug.redirect('/sign/document/%s/%s' % (id, token))
I really do not know how to go about fixing this.
I have fixed the issue I had to downgrade to an older version 0.14.1