fix: three bugs blocking bot presence and approval UI
1. OdooClient missing self._timeout — every _xmlrpc_call raised AttributeError, making the odoo health check permanently fail. Fix: set self._timeout = XMLRPC_TIMEOUT in __init__. 2. action_ping only accepted ollama=='ok' but health.py now returns 'warming' when the model is not yet hot in VRAM. Fix: treat warming as passing so the bot goes online and the model loads on the first real request. 3. /ai/approval/pending declared methods=['GET'] on a type='json' route — Odoo JSON-RPC always POSTs, so every browser call got 405 METHOD NOT ALLOWED. Fix: change to methods=['POST']. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ _logger = logging.getLogger(__name__)
|
||||
|
||||
class AiApprovalController(http.Controller):
|
||||
|
||||
@http.route('/ai/approval/pending', type='json', auth='user', methods=['GET'])
|
||||
@http.route('/ai/approval/pending', type='json', auth='user', methods=['POST'])
|
||||
def list_pending(self):
|
||||
if not request.env.user.has_group('activeblue_ai.group_ai_manager'):
|
||||
return {'error': 'Access denied', 'items': []}
|
||||
|
||||
Reference in New Issue
Block a user