Full backend implementation with custom Odoo modules: - encoach_api: Core API, user management, JWT auth - encoach_exam: Exam generation (reading, writing, listening, speaking) - encoach_evaluate: AI-powered evaluation (writing, speaking) - encoach_training: Training tips and walkthrough - encoach_storage: File storage management - encoach_payment: Stripe, PayPal, Paymob integration - encoach_mail: Email notifications Made-with: Cursor
31 lines
889 B
Python
31 lines
889 B
Python
from odoo import models, fields
|
|
|
|
|
|
class EncoachElaiAvatar(models.Model):
|
|
_name = "encoach.elai.avatar"
|
|
_description = "ELAI Avatar Configuration"
|
|
|
|
name = fields.Char(required=True)
|
|
avatar_code = fields.Char(required=True)
|
|
avatar_url = fields.Char()
|
|
gender = fields.Selection(
|
|
[("male", "Male"), ("female", "Female")],
|
|
string="Gender",
|
|
)
|
|
canvas = fields.Char()
|
|
voice_id = fields.Char()
|
|
voice_provider = fields.Char()
|
|
|
|
def to_encoach_dict(self):
|
|
self.ensure_one()
|
|
return {
|
|
"id": self.id,
|
|
"name": self.name,
|
|
"avatarCode": self.avatar_code,
|
|
"avatarUrl": self.avatar_url or "",
|
|
"gender": self.gender or "",
|
|
"canvas": self.canvas or "",
|
|
"voiceId": self.voice_id or "",
|
|
"voiceProvider": self.voice_provider or "",
|
|
}
|