From de7e60c7795bc68f4c124db3a4e1a8bcdbbe075e Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Sat, 18 Jan 2025 17:15:54 +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/data/sale_renting_code_data.xml | 6 ++++ .../models/yuthon_trade_activities.py | 17 ++++++++-- .../views/yuthon_trade_activities.xml | 31 ++++++++++++++++--- yuthon_trade/views/yuthon_trade_menu.xml | 2 +- 4 files changed, 49 insertions(+), 7 deletions(-) diff --git a/yuthon_trade/data/sale_renting_code_data.xml b/yuthon_trade/data/sale_renting_code_data.xml index 7694e27af..8b196c4b4 100644 --- a/yuthon_trade/data/sale_renting_code_data.xml +++ b/yuthon_trade/data/sale_renting_code_data.xml @@ -18,4 +18,10 @@ GH%(y)s%(month)s%(day)s 3 + + 活动编号 + yuthon_trade_activities_code + HD%(y)s%(month)s%(day)s + 3 + \ No newline at end of file diff --git a/yuthon_trade/models/yuthon_trade_activities.py b/yuthon_trade/models/yuthon_trade_activities.py index 968f0d90e..66f59aade 100644 --- a/yuthon_trade/models/yuthon_trade_activities.py +++ b/yuthon_trade/models/yuthon_trade_activities.py @@ -3,10 +3,23 @@ from odoo import models, fields, api class YuthonTradeActivities(models.Model): _name = 'yuthon.trade.activities' - _description = '工会活动' + _description = '活动方案审批' _inherit = ['soong.workflow.mixin', 'mail.thread.main.attachment', 'mail.activity.mixin'] name = fields.Char(string='名称') code = fields.Char(string="编号", default=lambda self: self.env['ir.sequence'].next_by_code( - 'property_personal_condolences_code_sequence')) + 'yuthon_trade_activities_code')) + theme = fields.Char(string="主题") + background_event = fields.Text(string="活动背景") + activity_content = fields.Text(string="活动内容") + activity_start_time = fields.Datetime(string="活动开始时间") + activity_end_time = fields.Datetime(string="活动结束时间") + activity_address = fields.Char(string="活动地点") + activity_object = fields.Char(string="活动对象") + other = fields.Text(string="其他") + users_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user.id) + yuthon_company = fields.Selection(related='users_id.employee_id.yuthon_company', string="公司") + department_id = fields.Many2one(related='users_id.employee_id.department_id', string="部门") + host_id = fields.Many2one("hr.department", string="主办") + joint_office_ids = fields.Many2many("hr.department", string="联办") \ No newline at end of file diff --git a/yuthon_trade/views/yuthon_trade_activities.xml b/yuthon_trade/views/yuthon_trade_activities.xml index 51d07a8c1..53cadb536 100644 --- a/yuthon_trade/views/yuthon_trade_activities.xml +++ b/yuthon_trade/views/yuthon_trade_activities.xml @@ -4,7 +4,7 @@ yuthon.trade.activities.tree yuthon.trade.activities - + @@ -14,18 +14,41 @@ yuthon.trade.activities.form yuthon.trade.activities -
+ + + + + + + + + + + + + + + + + - + + + + + + + +
- 工会活动 + 活动方案审批 yuthon.trade.activities tree,form diff --git a/yuthon_trade/views/yuthon_trade_menu.xml b/yuthon_trade/views/yuthon_trade_menu.xml index f81463de6..84c8a4ad8 100644 --- a/yuthon_trade/views/yuthon_trade_menu.xml +++ b/yuthon_trade/views/yuthon_trade_menu.xml @@ -25,7 +25,7 @@ action="action_yuthon_work_condolences" sequence="11"/>