Files
funding-tools/funding_campaign/models/campaign_step.py
2024-01-24 09:29:45 +01:00

22 lines
751 B
Python

from odoo import api, fields, models
from odoo.exceptions import UserError
class CampaignStep(models.Model):
_name = 'campaign.step'
_description = 'Campaign Step'
name = fields.Char(string='Name')
description = fields.Html(string='Description')
active = fields.Boolean('Active', default=True)
sequence = fields.Integer()
funding_campaign_id = fields.Many2one('funding.campaign', string='Funding Campaign')
step_amount = fields.Float('Step Amount')
state = fields.Selection(
[("locked", "Locked"), ("unlocked", "Unlocked"), ("reached", "Reached")],
string="Status",
index=True,
readonly=True,
default="locked",
track_visibility="onchange",
copy=False,
)