mirror of
https://github.com/Ladebeze66/llm_ticket3.git
synced 2025-12-16 03:47:49 +01:00
17 lines
595 B
Python
17 lines
595 B
Python
from typing import List, Dict, Any
|
|
from .auth_manager import AuthManager
|
|
from .utils import clean_html
|
|
|
|
class MessageManager:
|
|
def __init__(self, auth: AuthManager):
|
|
self.auth = auth
|
|
|
|
def get_ticket_messages(self, ticket_id: int) -> List[Dict[str, Any]]:
|
|
params = {
|
|
"model": "mail.message",
|
|
"method": "search_read",
|
|
"args": [[[ "res_id", "=", ticket_id], ["model", "=", "project.task"]]],
|
|
"kwargs": {"fields": ["id", "body", "author_id", "date"]}
|
|
}
|
|
return self.auth._rpc_call("/web/dataset/call_kw", params)
|