From ddec60566f1062da8a822827bb07c8e99122b8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Tue, 21 Oct 2025 10:10:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_official/models/yuthon_official.py | 3 ++- yuthon_official/models/yuthon_official_labor.py | 3 ++- yuthon_official/models/yuthon_official_party.py | 3 ++- yuthon_official/views/yuthon_official_labor_views.xml | 3 ++- yuthon_official/views/yuthon_official_party_views.xml | 2 +- yuthon_official/views/yuthon_official_views.xml | 3 ++- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/yuthon_official/models/yuthon_official.py b/yuthon_official/models/yuthon_official.py index 1bfdeb2f1..5714313ed 100644 --- a/yuthon_official/models/yuthon_official.py +++ b/yuthon_official/models/yuthon_official.py @@ -34,7 +34,8 @@ class YuthonOfficial(models.Model): official_statu = fields.Selection([('done', '办结'), ('approval', '审核')], string="公文环节") users_id = fields.Many2one('res.users', string="拟稿人", default=lambda self: self.env.user) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="拟稿部门") - company_id = fields.Many2one('res.company', string="公司前缀") + company_id = fields.Many2one(related='users_id.company_id', string="公司") + company_id1 = fields.Many2one('res.company', string="公司前缀") is_meet = fields.Boolean(string="是否上会") issues_result = fields.Html(string="会议结果") related_issues_id = fields.Many2one('issue.library', string="关联议题") diff --git a/yuthon_official/models/yuthon_official_labor.py b/yuthon_official/models/yuthon_official_labor.py index d1d939faa..695ba1be9 100644 --- a/yuthon_official/models/yuthon_official_labor.py +++ b/yuthon_official/models/yuthon_official_labor.py @@ -28,7 +28,8 @@ class YuthonOfficialLabor(models.Model): red_suit = fields.Char(string="套红") users_id = fields.Many2one('res.users', string="拟稿人", default=lambda self: self.env.user) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="拟稿部门") - company_id = fields.Many2one('res.company', string="公司前缀") + company_id = fields.Many2one(related='users_id.company_id', string="公司") + company_id1 = fields.Many2one('res.company', string="公司前缀") official_documents_ids = fields.Many2many('ir.attachment', string="附件") urgency_level = fields.Selection([('normal', '一般'), ('urgent', '紧急'), ('extra_urgent', '特急')], default='normal' ,string="紧急程度") diff --git a/yuthon_official/models/yuthon_official_party.py b/yuthon_official/models/yuthon_official_party.py index 2fe67c4c1..07a1b9175 100644 --- a/yuthon_official/models/yuthon_official_party.py +++ b/yuthon_official/models/yuthon_official_party.py @@ -12,7 +12,8 @@ class YuthonOfficialParty(models.Model): name = fields.Char(string="名称") users_id = fields.Many2one('res.users', string="拟稿人", default=lambda self: self.env.user) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="拟稿部门") - company_id = fields.Many2one('res.company', string="公司前缀") + company_id = fields.Many2one(related='users_id.company_id', string="公司") + company_id1 = fields.Many2one('res.company', string="公司前缀") code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('official_code')) official_type_id = fields.Many2one('official.type', string="文件类型") # official_type = fields.Selection([('go', '发文'), ('come', '收文')], string="公文类型") diff --git a/yuthon_official/views/yuthon_official_labor_views.xml b/yuthon_official/views/yuthon_official_labor_views.xml index 6d7ee92da..260b6e798 100644 --- a/yuthon_official/views/yuthon_official_labor_views.xml +++ b/yuthon_official/views/yuthon_official_labor_views.xml @@ -54,7 +54,8 @@ - + + diff --git a/yuthon_official/views/yuthon_official_party_views.xml b/yuthon_official/views/yuthon_official_party_views.xml index 66cb84bba..b9d55db67 100644 --- a/yuthon_official/views/yuthon_official_party_views.xml +++ b/yuthon_official/views/yuthon_official_party_views.xml @@ -63,7 +63,7 @@ - + diff --git a/yuthon_official/views/yuthon_official_views.xml b/yuthon_official/views/yuthon_official_views.xml index bc8d007dc..9934dcfca 100644 --- a/yuthon_official/views/yuthon_official_views.xml +++ b/yuthon_official/views/yuthon_official_views.xml @@ -58,7 +58,8 @@ - + +