Fix model-controller mismatches and routing issues
- ticket: add user_id, priority, category fields; fix _serialize_ticket -> _serialize - package: fix is_active -> active (Odoo auto-filter), remove invalid entity_id filter - walkthrough: add sequence field; fix controller to use name/content instead of title/steps - users: fix encoach_user_type -> encoach_type, encoach_entity_id -> entity_rel_ids.entity_id - generation: use EncoachGenerationService class instead of nonexistent ORM model, fix /api/exam/level/ route conflict (separate GET and POST URLs) Made-with: Cursor
This commit is contained in:
@@ -19,10 +19,7 @@ class SubscriptionsController(EncoachMixin, http.Controller):
|
||||
if not user:
|
||||
return self._error_response('Unauthorized', 401)
|
||||
|
||||
domain = [('is_active', '=', True)]
|
||||
entity_id = kwargs.get('entityID')
|
||||
if entity_id:
|
||||
domain.append(('entity_id', '=', int(entity_id)))
|
||||
domain = []
|
||||
|
||||
packages = request.env['encoach.package'].sudo().search(domain, order='price asc')
|
||||
return self._json_response([p.to_encoach_dict() for p in packages])
|
||||
|
||||
Reference in New Issue
Block a user