49 lines
1.2 KiB
Python
49 lines
1.2 KiB
Python
from odoo import fields, models
|
|
|
|
|
|
class DanceFeeStructure(models.Model):
|
|
_name = "dance.fee.structure"
|
|
_description = "Dance Fee Structure"
|
|
_order = "name"
|
|
|
|
name = fields.Char(required=True)
|
|
dance_style = fields.Selection(
|
|
[
|
|
("bharatanatyam", "Bharatanatyam"),
|
|
("kathak", "Kathak"),
|
|
("hiphop", "Hip-Hop"),
|
|
("contemporary", "Contemporary"),
|
|
("zumba", "Zumba"),
|
|
],
|
|
string="Dance Style",
|
|
required=True,
|
|
)
|
|
level = fields.Selection(
|
|
[
|
|
("beginner", "Beginner"),
|
|
("intermediate", "Intermediate"),
|
|
("advanced", "Advanced"),
|
|
],
|
|
required=True,
|
|
)
|
|
amount = fields.Float(required=True)
|
|
tax_ids = fields.Many2many(
|
|
"account.tax",
|
|
string="Taxes",
|
|
domain="[('type_tax_use', '=', 'sale')]",
|
|
)
|
|
duration = fields.Selection(
|
|
[
|
|
("monthly", "Monthly"),
|
|
("quarterly", "Quarterly"),
|
|
],
|
|
default="monthly",
|
|
required=True,
|
|
)
|
|
currency_id = fields.Many2one(
|
|
"res.currency",
|
|
default=lambda self: self.env.company.currency_id.id,
|
|
required=True,
|
|
)
|
|
active = fields.Boolean(default=True)
|