[Bug 272794] finance/odoo: Breakage caused by Werkzeug 2.3.x

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 29 Jul 2023 12:16:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272794

            Bug ID: 272794
           Summary: finance/odoo: Breakage caused by Werkzeug 2.3.x
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: acm@FreeBSD.org
          Reporter: yzrh@noema.org
             Flags: maintainer-feedback?(acm@FreeBSD.org)
          Assignee: acm@FreeBSD.org

Created attachment 243686
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=243686&action=edit
Fix FutureResponse

Werkzeug 2.3.x has been in quarterly for quite some time now.
Installing odoo from quarterly works, but when visited with a web
browser, 500 is always returned.

ERROR odoo odoo.http: Exception during request handling.
Traceback (most recent call last):
  File ".../odoo/http.py", line 1993, in __call__
    response = request._serve_db()
  File ".../odoo/http.py", line 1578, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File ".../odoo/service/model.py", line 134, in retrying
    result = func()
  File ".../odoo/http.py", line 1608, in _serve_ir_http
    ir_http._post_dispatch(response)
  File ".../odoo/addons/base/models/ir_http.py", line 147, in _post_dispatch
    request.dispatcher.post_dispatch(response)
  File ".../odoo/http.py", line 1676, in post_dispatch
    self.request._save_session()
  File ".../odoo/http.py", line 1506, in _save_session
    self.future_response.set_cookie('session_id', sess.sid,
max_age=SESSION_LIFETIME, httponly=True)
  File ".../odoo/http.py", line 1124, in set_cookie
    werkzeug.Response.set_cookie(self, key, value=value, max_age=max_age,
expires=expires, path=path, domain=domain, secure=secure, httponly=httponly,
samesite=samesite)
  File ".../werkzeug/sansio/response.py", line 258, in set_cookie
    charset = self._charset if self._charset != "utf-8" else None
AttributeError: 'FutureResponse' object has no attribute '_charset'

The fix is trivial.

-- 
You are receiving this mail because:
You are the assignee for the bug.