From c396b2389be2edc0691d2c52a9d9a6f3c68e9acc Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Thu, 29 May 2025 20:53:03 +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_trade/models/yuthon_care_condolences.py | 2 +- yuthon_trade/models/yuthon_trade_setting.py | 2 +- yuthon_trade/models/yuthon_work_condolences.py | 2 +- yuthon_trade/views/yuthon_care_condolences_views.xml | 2 +- yuthon_trade/views/yuthon_trade_setting_views.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/yuthon_trade/models/yuthon_care_condolences.py b/yuthon_trade/models/yuthon_care_condolences.py index 29a3b68a1..4de148fdf 100644 --- a/yuthon_trade/models/yuthon_care_condolences.py +++ b/yuthon_trade/models/yuthon_care_condolences.py @@ -10,7 +10,7 @@ class YuthonCareCondolences(models.Model): users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") care_type_id = fields.Many2one('yuthon.care.setting', string='类型') - documents_id = fields.Many2one(related='care_type_id.documents_id', string='附件') + documents_ids = fields.Many2many(related='care_type_id.documents_ids', string='附件') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code('property_care_reward_code_sequence')) date = fields.Date(string='日期') diff --git a/yuthon_trade/models/yuthon_trade_setting.py b/yuthon_trade/models/yuthon_trade_setting.py index 91ee3582e..ffdaccc37 100644 --- a/yuthon_trade/models/yuthon_trade_setting.py +++ b/yuthon_trade/models/yuthon_trade_setting.py @@ -6,7 +6,7 @@ class YuthonCareSetting(models.Model): _description = '关怀类型配置' name = fields.Char(string='名称') - documents_id = fields.Many2one('ir.attachment', string="附件") + documents_ids = fields.Many2many('ir.attachment', string="附件") class YuthonWorkSetting(models.Model): diff --git a/yuthon_trade/models/yuthon_work_condolences.py b/yuthon_trade/models/yuthon_work_condolences.py index f0f296413..9bbf7b2f4 100644 --- a/yuthon_trade/models/yuthon_work_condolences.py +++ b/yuthon_trade/models/yuthon_work_condolences.py @@ -11,7 +11,7 @@ class YuthonWorkCondolences(models.Model): department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") work_type_id = fields.Many2one('yuthon.work.setting', string='类型') code = fields.Char(string="编号", - default=lambda self: self.env['ir.sequence'].next_by_code('property_work_condolences_code_sequence')) + default=lambda self: self.env['ir.sequence'].next_by_code('property_work_condolences_code')) date = fields.Date(string='日期') fees = fields.Float(string='费用') reason = fields.Text(string="正文") diff --git a/yuthon_trade/views/yuthon_care_condolences_views.xml b/yuthon_trade/views/yuthon_care_condolences_views.xml index b7d665aaa..1577615bc 100644 --- a/yuthon_trade/views/yuthon_care_condolences_views.xml +++ b/yuthon_trade/views/yuthon_care_condolences_views.xml @@ -56,7 +56,7 @@ - + diff --git a/yuthon_trade/views/yuthon_trade_setting_views.xml b/yuthon_trade/views/yuthon_trade_setting_views.xml index c9b4de3a2..cbf4c9d40 100644 --- a/yuthon_trade/views/yuthon_trade_setting_views.xml +++ b/yuthon_trade/views/yuthon_trade_setting_views.xml @@ -6,7 +6,7 @@ - +