This commit is contained in:
2026-11-08 20:08:53 +08:00
parent 7526a5fe4d
commit 9b924747c5
2692 changed files with 394867 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AiSession(models.Model):
_inherit = "ai.session"
def _get_request_context_snapshot(self, context=None):
snapshot = super()._get_request_context_snapshot(context)
if self.env.context.get('ai_automation_run') or (self.request_context or {}).get('ai_automation_run'):
snapshot['ai_automation_run'] = True
return snapshot
def _finish_exchange(self, status='completed', *, content=None):
super()._finish_exchange(status, content=content)
if (self.request_context or {}).get("ai_automation_run"):
self.auto_confirm = False