[NEW] funding_campaign: create add-on

This commit is contained in:
Stéphan Sainléger
2024-01-24 09:29:45 +01:00
parent 5b37b57f10
commit 21fbb44105
19 changed files with 1262 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
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,
)