Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

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

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

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?

Subscribe

Get notified when there's activity on this post

This question has been flagged
subscriptioneventscouponsfeature request
1 Reply
1511 Views
Avatar
Nicolas LAURENT

I'd like my clients to buy a subscription that allow them to access a certain number of times to my weekly event, eg. they can access the weekly event only 2 times per month.

Any ideas on how to implement that?

For reference, here's what Deepseek imagine:

_____________________

Yes! You can configure your Odoo subscription product to issue a fixed number of time-limited coupons that expire with the subscription and cannot be rolled over. Here’s how to set it up:

Step 1: Create a Subscription Product

  1. Go to Sales > Products and create a new product.
  2. Enable Subscription:
    • Set the billing cycle (e.g., monthly).
    • Under Subscription Plan, define the duration (e.g., 30 days).

Step 2: Configure Coupons with Subscription-Based Expiry

Option A: Automated Coupons via Loyalty Program

  1. Create a Loyalty Program:
    • Navigate to Sales > Loyalty > Programs.
    • Select "Coupons" as the program type.
    • Set "Generate coupons automatically" for subscriptions.
  2. Link Coupons to Subscription:
    • Use a custom field on coupon.coupon to track the linked subscription:
      python
      Copy
      subscription_id = fields.Many2one('sale.subscription', string="Linked Subscription")
    • Set coupon expiry date = subscription end date:
      python
      Copy
      # Scheduled action (runs daily)
      for sub in env['sale.subscription'].search([('state', '=', 'active')]):
          coupons = env['coupon.coupon'].search([('subscription_id', '=', sub.id)])
          coupons.write({'expiry_date': sub.end_date})  # Coupons expire with subscription

Option B: Generate Coupons on Subscription Renewal

  1. Create a Coupon Template:
    • Go to Sales > Coupons and define:
      • Validity: Dynamic (set expiry = subscription end date).
      • Usage Limit: 1 per coupon (to prevent reuse).
  2. Automate Coupon Creation:
    • Trigger coupon generation when subscriptions renew:
      python
      Copy
      def generate_subscription_coupons(self):
          for sub in self:
              for _ in range(sub.coupon_quantity):  # E.g., 3 coupons/month
                  env['coupon.coupon'].create({
                      'program_id': sub.coupon_program_id.id,
                      'expiry_date': sub.end_date,
                      'subscription_id': sub.id
                  })

Step 3: Enforce "Use-It-or-Lose-It" Rules

  1. Prevent Rollover:
    • Add a constraint to delete unused coupons at subscription renewal:
      python
      Copy
      # Scheduled action (runs on subscription renewal)
      expired_subs = env['sale.subscription'].search([('end_date', '<', fields.Date.today())])
      env['coupon.coupon'].search([('subscription_id', 'in', expired_subs.ids)]).unlink()
  2. Restrict Redemption:
    • Use server actions to validate coupon usage:
      python
      Copy
      def validate_coupon(self):
          if self.subscription_id.state != 'active':
              raise UserError("Coupon expired with subscription!")

Step 4: Notify Customers

  • Email Templates:
    • Send coupons automatically via Sales > Configuration > Email Templates.
    • Include warnings like:
      "Your 3 monthly coupons expire on {subscription.end_date}. Unused coupons will not roll over."

Key Features

  • Time-Limited Coupons: Expire with the subscription.
  • No Accumulation: Unused coupons are destroyed on renewal.
  • Flexible Redemption: Coupons can be exchanged for specific products (configure in Coupon Program).

Testing Scenario

  1. A client subscribes for 1 month and receives 3 coupons.
  2. They use 2 coupons; the 3rd expires when the subscription ends.
  3. On renewal, they get 3 new coupons (previous unused coupons are deleted).

Why This Works

  • Tight Coupon-Subscription Binding: Coupons are tied to the subscription’s lifecycle.
  • Automated Cleanup: Cron jobs enforce expiration rules.
  • Transparency: Customers see coupon validity upfront.

For advanced workflows (e.g., prorated coupons), consider custom development. Otherwise, this setup works out-of-the-box with minor configurations.



0
Avatar
Discard
Avatar
Ritik (Wan Buffer Services)
Best Answer

Implementing a subscription-based model in Odoo to issue a fixed number of time-limited coupons that expire with the subscription period involves several steps. Here's how to set this up:

  1. Understanding Odoo's Default Behavior:
    By default, Odoo's subscription module allows for recurring billing but doesn't natively support issuing a predefined number of event access coupons that expire with each subscription cycle.
  2. Configuring Subscription Products:
    • Create the Subscription Product:
      Navigate to Sales → Products → Products.
      Create a new product, e.g., "Event Access Subscription."
      Set the Product Type to Service.
      Under the Sales tab, enable Subscription Product and define the subscription template (e.g., monthly).
  3. Managing Coupon Distribution:
    To issue a fixed number of coupons per subscription period:
    • Manual Distribution:
      At the start of each subscription cycle, manually generate and send a set number of event access coupons to the subscriber.
    • Automated Distribution:
      Develop a custom automation that triggers upon subscription renewal to generate and email the predefined number of coupons to the subscriber.
  4. Setting Coupon Validity:
    Ensure that each coupon is valid only within the subscription period:
    • When generating coupons, set their expiration date to align with the end of the current subscription cycle.​
    • This ensures unused coupons do not roll over to the next period.​
  5. Utilizing Third-Party Modules:
    To enhance functionality, consider integrating third-party modules:
    • Sale Coupon Limit Module:
      This module allows you to configure limits on the number of times a promotion can be applied per customer, ensuring subscribers cannot exceed their allotted event accesses.
    • Sale Coupon Validity Notification Module:
      This module notifies users when a coupon becomes invalid, aiding in managing coupon expirations effectively.
  6. Custom Development:
    Given the specific nature of this requirement, custom development may be necessary:
    • Automate Coupon Generation and Distribution:
      Develop a scheduled action that automatically generates the specified number of coupons at the beginning of each subscription period and emails them to the subscriber.
    • Track Coupon Usage:
      Implement a system to monitor and restrict the usage of coupons to prevent exceeding the allowed number per period.

At Wan Buffer Services, we specialize in customizing Odoo to fit unique business models. If you require assistance in implementing this subscription-based coupon system.

0
Avatar
Discard
Nicolas LAURENT
Author

Thank you for your answer. How much would it cost to for a customized development? I have several functionalities in mind I'd like to have in Odoo (check my other posts).

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
✅ eLearning subscription feature request: Gradual access to course conditioned by number of subcription renewals
subscription eLearning feature request
Avatar
0
Mar 25
1633
Event ticket discount 100% does not work.
events Ticketing coupons
Avatar
0
Jul 23
2092
Creating Promotion/Coupon Program for a particular Event
events v15 coupons promotions
Avatar
Avatar
1
May 24
2593
✅ Subscription & Calendar feature request: Extend subscription end dates to account for holidays
calendar holidays subscription Subscribe feature request
Avatar
0
Mar 25
1340
✅ Events feature request : "Every other" recurrence pattern
upgrade request events Feature feature request
Avatar
0
Mar 25
1629
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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