- Introduced `saas.plan` model to define subscription plans with limits and pricing. - Created `saas.restaurant` model to manage restaurant tenants, including database provisioning and subscription management. - Implemented views for managing SaaS plans and restaurant tenants, including tree and form views. - Added security access rights for the new models. - Developed a backup management view for database backups. - Updated menu structure to include new SaaS management options. - Added Docker and deployment configurations for PostgreSQL, Redis, and Odoo services. - Included scaling guide and backup scripts for production environments. - Enhanced theme with new images and layout adjustments.
14 lines
604 B
Python
14 lines
604 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import models, fields
|
|
|
|
class SaasPlan(models.Model):
|
|
_name = 'saas.plan'
|
|
_description = 'Dine360 SaaS Plan'
|
|
|
|
name = fields.Char(string='Plan Name', required=True)
|
|
max_pos = fields.Integer(string='Max POS Terminals', default=1, help='0 for unlimited')
|
|
max_users = fields.Integer(string='Max Active Users', default=5, help='0 for unlimited')
|
|
price_monthly = fields.Float(string='Monthly Price', required=True, default=0.0)
|
|
price_yearly = fields.Float(string='Yearly Price', required=True, default=0.0)
|
|
active = fields.Boolean(default=True)
|