20 lines
597 B
Python
20 lines
597 B
Python
# -*- coding: utf-8 -*-
|
|
from odoo import fields, models
|
|
|
|
|
|
class SaasPlan(models.Model):
|
|
"""Selectable subscription plans:
|
|
3 Months ($X) / 6 Months ($Y) / 1 Year ($Z)
|
|
"""
|
|
_name = 'saas.plan'
|
|
_description = 'SaaS Subscription Plan'
|
|
_order = 'duration_months'
|
|
|
|
name = fields.Char(required=True)
|
|
duration_months = fields.Integer('Duration (Months)', required=True)
|
|
price = fields.Monetary(required=True)
|
|
currency_id = fields.Many2one(
|
|
'res.currency', default=lambda self: self.env.company.currency_id
|
|
)
|
|
active = fields.Boolean(default=True)
|