Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

✅ eLearning feature request : Revoke course access when subscription is closed or canceled

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
subscriptionupgraderequesteLearningfeature request
1414 Vues
Avatar
Nicolas LAURENT

I want to sell access to my online course by subscription, and I want the student to have access to the course only when their subscription is active. I want the access to be revoked if the subscription is closed or canceled.

This seems to be a pretty basic functionnality regarding an eLearning platform, but I've looked up for tutorials, and it's not a native Odoo functionnality. I've asked Deepseek how to manage that, and it seems that I need Odoo Studio to customize (details below).

How to submit this functionnality to be included in a future update?

______________________________

In Odoo, by default, when a subscription ends, the client’s access to the course linked to that subscription is not automatically revoked. Odoo does not natively handle the automatic revocation of course access based on subscription status. However, you can configure this behavior using custom development or automated actions. Here’s a detailed explanation of what happens by default and how you can manage course access when a subscription ends:

1. Default Behavior in Odoo

  • Subscription Ends: When a subscription ends, Odoo marks it as expired or canceled, but it does not automatically revoke access to the course.
  • Course Access: The client retains access to the course unless you manually revoke it or implement a custom solution.

2. Why This Happens

  • Odoo’s Subscription and eLearning modules are not tightly integrated by default.
  • There is no native functionality to automatically link subscription status to course access.

3. How to Automatically Revoke Course Access When a Subscription Ends

To automatically revoke course access when a subscription ends, you can use one of the following approaches:

a. Automated Actions

  1. Create an Automated Action:
    • Go to Settings > Technical > Automation > Automated Actions.
    • Create a new automated action triggered when a subscription is expired or canceled.
  2. Update Course Access:
    • Use the automated action to update the client’s access to the course.
    • Example: Set a custom field (e.g., has_access) to False when the subscription ends.
  3. Restrict Access:
    • Use Record Rules to restrict access to the course based on the has_access field.

b. Custom Development

  1. Create a Custom Field:
    • Add a custom field (e.g., subscription_active) to the res.partner model to track subscription status.
  2. Update Subscription Status:
    • Use a custom module or script to update the subscription_active field when a subscription ends.
  3. Restrict Course Access:
    • Override the access logic for the course to check the subscription_active field.
    • Example: If subscription_active is False, deny access to the course.

c. Odoo Studio (Custom Edition Only)

If you’re using the Custom Edition (29.9 €/month), you can use Odoo Studio to create a custom workflow that links subscription status to course access.

4. Example Workflow

Here’s an example of how you can implement this functionality:

  1. Create a Custom Field:
    • Add a custom field (e.g., subscription_active) to the res.partner model.
  2. Automate Subscription Status Updates:
    • Use an automated action to update the subscription_active field when a subscription ends.
    • Example:
      python
      Copy
      from odoo import models, fields
      
      class Subscription(models.Model):
          _inherit = 'sale.subscription'
      
          def update_subscription_status(self):
              for subscription in self:
                  partner = subscription.partner_id
                  if subscription.state in ['closed', 'canceled']:
                      partner.write({'subscription_active': False})
  3. Restrict Course Access:
    • Use a record rule to restrict access to the course based on the subscription_active field.
    • Example:
      xml
      Copy
      <record id="restrict_course_access" model="ir.rule">
          <field name="name">Restrict Course Access</field>
          <field name="model_id" ref="model_slide_channel"/>
          <field name="domain_force">[('subscription_active', '=', True)]</field>
          <field name="groups" eval="[(4, ref('base.group_user'))]"/>
      </record>
      Run HTML

5. Notify the Client

  • Use Email Templates to notify the client when their subscription ends and their course access is revoked.
  • Example: Send an email when the subscription_active field is set to False.

6. Testing

  • Test the setup by creating a subscription, linking it to a course, and verifying access is revoked when the subscription ends.

Conclusion

By default, Odoo does not automatically revoke course access when a subscription ends. However, you can implement this functionality using automated actions, custom development, or Odoo Studio (if you’re using the Custom Edition). If you need assistance, consider hiring an Odoo developer to create a custom solution tailored to your needs.

0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
✅ eLearning subscription feature request: Gradual access to course conditioned by number of subcription renewals
subscription eLearning feature request
Avatar
0
mars 25
1551
✅ Events feature request : "Every other" recurrence pattern
upgrade request events Feature feature request
Avatar
0
mars 25
1574
Charge for Elearning courses through a subscription method
subscription courses eLearning
Avatar
Avatar
1
juil. 25
2697
Keep old Subscription functionality when upgrading to new version Résolu
subscription upgrade functionality
Avatar
Avatar
2
oct. 24
1459
Event Coupon Subscription feature request: How to set up a subscription product to issue a fixed number of time-limited coupons that expire with the subscription and cannot be rolled over?
subscription events coupons feature request
Avatar
Avatar
1
mars 25
1476
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now