EnCoach Odoo 19 custom modules
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
This commit is contained in:
25
encoach_subscription/models/package.py
Normal file
25
encoach_subscription/models/package.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class EncoachPackage(models.Model):
|
||||
_name = "encoach.package"
|
||||
_description = "EnCoach Subscription Package"
|
||||
|
||||
name = fields.Char(required=True)
|
||||
price = fields.Float(digits=(12, 2))
|
||||
currency = fields.Char(default="USD")
|
||||
duration_days = fields.Integer()
|
||||
features = fields.Json()
|
||||
active = fields.Boolean(default=True)
|
||||
|
||||
def to_encoach_dict(self):
|
||||
self.ensure_one()
|
||||
return {
|
||||
"id": self.id,
|
||||
"name": self.name,
|
||||
"price": self.price,
|
||||
"currency": self.currency or "USD",
|
||||
"durationDays": self.duration_days,
|
||||
"features": self.features,
|
||||
"active": self.active,
|
||||
}
|
||||
Reference in New Issue
Block a user