Monetization & Subscriptions - Grevlin Price Intelligence Suite
by Grevlin Global Corp. https://grevlin.com$ 664.22
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Sales (sale_management) • Contacts (contacts) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 7663 |
| Technical Name |
grev_od_market_subscription |
| License | OPL-1 |
| Website | https://grevlin.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Sales (sale_management) • Contacts (contacts) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 7663 |
| Technical Name |
grev_od_market_subscription |
| License | OPL-1 |
| Website | https://grevlin.com |
Monetization & SubscriptionsFlexible subscription plans, credit-based billing, API key management, and access control for your market price intelligence platform.
|
|
|
|
Need Help?For support, contact us at odoo@grevlin.com Follow us on X: @GrevlinGlobal ✅ 30 days free support |
Grevlin Price Intelligence Suite - Monetization & Subscriptions
This module provides the monetization layer for the Grevlin Price Intelligence Suite, including subscription plans, API key management, credit-based billing, and centralized access control.
Overview
The Monetization & Subscriptions module enables data-as-a-service revenue by managing customer access through tiered plans, API keys, and a credit system. It integrates with Odoo's sale management for order processing.
Key Features
- 4-tier data plans: Free, Basic, Pro, Enterprise
- Feature flags: query limits, API call limits, geographic access levels, historical depth, forecast access
- API key management with SHA-256 hashing and secure generation
- Rate limiting per minute and per day
- Credit account system with balance tracking
- Credit transactions: purchase, consume, refund, expire
- Entitlement management linking partners to plans
- Central access control: check_and_consume() method
- Usage logging with response time tracking
- Integration with Odoo sale_management
Installation
- Place the grev_od_market_subscription folder in your Odoo addons path
- Install from :menuselection:`Settings --> Technical --> Database Structure --> Update Apps List`
Note
This module depends on sale_management. The sale_subscription module is an optional soft dependency -- if installed, plans can link to subscription plan records for recurring billing.
Configuration
Data Plans
Four plans are pre-loaded during installation:
| Plan | Queries/Month | API Calls/Month | Geographic Access | Historical Depth |
|---|---|---|---|---|
| Free | 50 | 100 | City level | 3 months |
| Basic | 500 | 1,000 | National | 12 months |
| Pro | 5,000 | 10,000 | Global | 36 months |
| Enterprise | Unlimited | Unlimited | Global | Unlimited |
To customize plans:
- Navigate to :menuselection:`Market Price Intelligence --> Subscriptions --> Data Plans`
- Modify limits, features, and pricing as needed
API Key Management
- Go to :menuselection:`Market Price Intelligence --> Subscriptions --> API Keys`
- Click :guilabel:`Create`
- Select the :guilabel:`Partner` and :guilabel:`Plan`
- Click :guilabel:`Generate Key`
Warning
The API key is shown only once after generation. It is stored as a SHA-256 hash and cannot be recovered. Ensure the customer saves their key securely.
Usage
Entitlements
Entitlements link customers to data plans:
- Navigate to :menuselection:`Market Price Intelligence --> Subscriptions --> Entitlements`
- Create an entitlement with:
- :guilabel:`Partner`: Customer
- :guilabel:`Plan`: Selected data plan
- :guilabel:`Sale Order`: Linked order (optional)
- :guilabel:`Start Date` / :guilabel:`End Date`: Validity period
Credit Accounts
For pay-per-query billing:
- Go to :menuselection:`Market Price Intelligence --> Billing --> Credit Accounts`
- Each partner has one credit account
- Credits are added via purchase and consumed per query
Usage Monitoring
- Navigate to :menuselection:`Market Price Intelligence --> Billing --> Usage Log`
- View API calls, credit consumption, response times
- Filter by partner, API key, or date range
Access Control
The central check_and_consume() method on grev.entitlement is called by the Portal & API module for every data access request:
allowed, reason = self.env['grev.entitlement'].check_and_consume( partner_id=partner.id, request_type='api_query', market_id=market.id, api_key_id=key.id, )
This method checks:
- Active entitlement exists for the partner
- Plan query/API limits not exceeded
- Geographic access level permits the requested market
- Credits available (if pay-per-query)
Technical Reference
Models
| Model | Technical Name | Description |
|---|---|---|
| Data Plan | grev.data.plan | Subscription tier definition |
| API Key | grev.api.key | Hashed API key with rate limits |
| Credit Account | grev.credit.account | Partner credit balance |
| Credit Transaction | grev.credit.transaction | Credit ledger entry |
| Usage Log | grev.usage.log | API call and query log |
| Entitlement | grev.entitlement | Partner-to-plan access grant |
See also
- Price Collection module for core data
- Portal & API module for customer-facing access
- Report Generation module for report sales
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module