35 lines
1.3 KiB
Python
35 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import models, fields, api
|
|
|
|
|
|
class TxMySubmission(models.Model):
|
|
_name = 'tx.my.submission'
|
|
_inherit = ['mail.thread', 'mail.activity.mixin']
|
|
_description = '我的投稿'
|
|
|
|
name = fields.Char(string='名称', tracking=True)
|
|
demand_id = fields.Many2one("tx.benchmarking.scenarios", string="需求征集id")
|
|
demand_name = fields.Char(string="需求征集名称")
|
|
company_name = fields.Char(string="企业名称")
|
|
nature_business = fields.Char(string="企业性质")
|
|
business_code = fields.Char(string="企业信用代码")
|
|
contact_information = fields.Char(string="联系方式")
|
|
contact_person = fields.Char(string="联系人")
|
|
status = fields.Char(string="状态")
|
|
solution_file = fields.Binary(string="解决方案")
|
|
solution_file_name = fields.Char(string="解决方案附件名称")
|
|
company_file = fields.Binary(string="公司资质")
|
|
company_file_name = fields.Char(string="公司资质文件名称")
|
|
|
|
state = fields.Selection([("draft", "待审核"), ("done", "通过"), ("fail", "不通过")], string="状态", default="draft")
|
|
|
|
def action_done(self):
|
|
for r in self:
|
|
r.state = "done"
|
|
|
|
def action_fail(self):
|
|
for r in self:
|
|
r.state = "fail"
|
|
|