更新了一下优化
This commit is contained in:
@@ -34,17 +34,31 @@ class IssueTicket(models.Model):
|
||||
)
|
||||
deadline = fields.Date(string="截止日期")
|
||||
tag_ids = fields.Many2many("issue.ticket.tag", string="标签")
|
||||
work_end=fields.Boolean(string="工作结束", default=False, tracking=True)
|
||||
remark=fields.Html(string="备注")
|
||||
work_end = fields.Boolean(string="工作结束", default=False, tracking=True)
|
||||
remark = fields.Html(string="备注")
|
||||
# 新增:问题明细关联
|
||||
line_ids = fields.One2many(
|
||||
"issue.ticket.detail", "ticket_id", string="问题明细", copy=True
|
||||
)
|
||||
reproduce_steps = fields.Selection(
|
||||
[
|
||||
("step_1", "步骤 1: 打开应用程序"),
|
||||
("step_2", "步骤 2: 点击“提交”按钮"),
|
||||
("step_3", "步骤 3: 等待错误提示"),
|
||||
],
|
||||
string="选择复现步骤",
|
||||
help="选择一个常见的复现步骤,或者在下方文本框中详细描述",
|
||||
)
|
||||
|
||||
detailed_reproduce_steps = fields.Text(
|
||||
string="详细复现步骤", help="请详细描述复现步骤,包含详细操作及截图(如有)"
|
||||
)
|
||||
|
||||
@api.constrains("deadline")
|
||||
def _check_deadline(self):
|
||||
for rec in self:
|
||||
if rec.deadline and rec.deadline < fields.Date.today():
|
||||
raise ValidationError("截止日期不能早于今天。")
|
||||
|
||||
def action_set_draft(self):
|
||||
self.state = "draft"
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
<field name="tag_ids" widget="many2many_tags"/>
|
||||
<field name="state"/>
|
||||
<field name="description"/>
|
||||
<field name="reproduce_steps" widget="radio" />
|
||||
<field name="detailed_reproduce_steps"/>
|
||||
</group>
|
||||
<field name="remark" widget="tinymce"/>
|
||||
</group>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
max-width: 75%;
|
||||
margin: 0 auto;
|
||||
|
||||
.o_wrap_field .o_form_label {
|
||||
.o_wrap_field .o_form_label :not(.o_radio_item){
|
||||
/* 固定宽度 */
|
||||
width: 60px;
|
||||
/* 启用两端对齐 */
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
>
|
||||
<t t-set-slot="toggler"/>
|
||||
<!-- LOGO -->
|
||||
<div class="logo" style="width: 100%;display: flex;max-width: 100%;align-items: center;margin-top: 20px;">
|
||||
<div class="logo" style="width: 100%;display: flex;max-width: 100%;align-items: center;margin-top: 20px;position: sticky; top: 0; z-index: 9999">
|
||||
<img t-attf-src="/web/image?model=res.company&field=company_name_logo&id={{get_current_company()}}" id="company_logo" style="margin-left: 10px;height: 30px;width: 30px;max-width: 30px;margin-right: 19px;" />
|
||||
<img class="img" t-attf-src="/web/image?model=res.company&field=logo&id={{get_current_company()}}" style="height: 3rem;padding: 10px 0;width: 55%;padding-left: 0;" id="company_name_logo" />
|
||||
<span
|
||||
|
||||
Reference in New Issue
Block a user