diff --git a/room/models/inherit_calendar_event.py b/room/models/inherit_calendar_event.py index 165390d8a..aa1f36769 100644 --- a/room/models/inherit_calendar_event.py +++ b/room/models/inherit_calendar_event.py @@ -3,12 +3,13 @@ from odoo import api, fields, models, tools, _ from odoo.exceptions import UserError, ValidationError + class CalendarEvent(models.Model): _inherit = "calendar.event" sth_type = fields.Selection([('sth', '日程'), ('meet', '会议')], default="sth", string="活动类型", readonly=1) room_booking_id = fields.Many2one('room.booking', string="会议") - name = fields.Char(string="日程名称") + name = fields.Char(string="日程名称", default='新建') def button_meet(self): # 开始时间结束时间开始日期结束日期,后期优化 diff --git a/room/views/inherit_calendar_event_views.xml b/room/views/inherit_calendar_event_views.xml index e802b3da1..5e7afcb84 100644 --- a/room/views/inherit_calendar_event_views.xml +++ b/room/views/inherit_calendar_event_views.xml @@ -70,6 +70,7 @@
+
diff --git a/yuthon_issue/models/issue_approval_decision.py b/yuthon_issue/models/issue_approval_decision.py index 13bb10bdd..021b8d105 100644 --- a/yuthon_issue/models/issue_approval_decision.py +++ b/yuthon_issue/models/issue_approval_decision.py @@ -2,29 +2,35 @@ from odoo import api, fields, models, tools from odoo.exceptions import ValidationError - class IssueApprovalDecision(models.Model): _name = "issue.approval.decision" _description = '决策清单' - _inherit = ['mail.thread.main.attachment', 'mail.activity.mixin'] - _order = 'ordinal asc' + _order = 'sequence asc' name = fields.Char(string='事项') - ordinal = fields.Char(string='序号', store=True) - category_matter = fields.Many2one('issue.approval.decision',string='上级事项') - child_ids = fields.One2many('issue.approval.decision', 'category_matter', string='下级事项') + sequence = fields.Char(string='序号', store=True) + decision_id = fields.Many2one('issue.approval.decision', string='上级事项') + child_ids = fields.One2many('issue.approval.decision', 'decision_id', string='下级事项') specifics = fields.Char(string='具体事项') - council = fields.Selection([('1','审'), ('2','决')], string='党总委员会') - team_meet = fields.Selection([('1','审'), ('2','决')], string='经营班子会') - board_meet = fields.Selection([('1','审'), ('2','决'), ('4','授权投决会')], string='董事会') + council = fields.Selection([('approval', '审'), ('decide', '决')], string='党总委员会') + team_meet = fields.Selection([('approval', '审'), ('decide', '决')], string='经营班子会') + board_meet = fields.Selection([('approval', '审'), ('decide', '决'), ('commission', '授权投决会')], string='董事会') district_bureau = fields.Char(string='区政府、区财政局') remarks = fields.Char(string='备注') - - @api.onchange('ordinal', 'category_matter') - def _onchange_department_code(self): - for code in self: - if code.category_matter.ordinal: - code.ordinal = code.category_matter.ordinal +'.'+ code.ordinal if code.ordinal else '' - else: - code.ordinal = code.ordinal + # @api.onchange('sequence', 'decision_id') + # def _onchange_department_code(self): + # for code in self: + # if code.decision_id.sequence: + # code.sequence = code.decision_id.sequence + '.' + code.sequence + # else: + # code.sequence = code.sequence + # for child in code.child_ids: + # if code.sequence: + # if '.' in child.sequence: + # number = code.sequence + '.' + child.sequence.split('.')[-1] + # child.write({'sequence': number}) + # else: + # child.sequence = code.sequence + '.' + (child.sequence or '') + # else: + # child.sequence = child.sequence or '' diff --git a/yuthon_issue/views/issue_approval_decision_views.xml b/yuthon_issue/views/issue_approval_decision_views.xml index 6480a9710..affa8eb55 100644 --- a/yuthon_issue/views/issue_approval_decision_views.xml +++ b/yuthon_issue/views/issue_approval_decision_views.xml @@ -4,10 +4,10 @@ issue.approval.decision.tree issue.approval.decision - + + - - + @@ -17,6 +17,7 @@ + issue.approval.decision.form issue.approval.decision @@ -31,7 +32,8 @@
- + + @@ -52,6 +54,20 @@ + + + issue.approval.decision.form + issue.approval.decision + + + + + + + + + + 决策清单 issue.approval.decision diff --git a/yuthon_issue/views/menus.xml b/yuthon_issue/views/menus.xml index 1c7eb2606..dcecd00be 100644 --- a/yuthon_issue/views/menus.xml +++ b/yuthon_issue/views/menus.xml @@ -86,7 +86,7 @@ sequence="30"/> diff --git a/yuthon_work_brand/views/work_menus.xml b/yuthon_work_brand/views/work_menus.xml index 7d9d38b78..7f68f2531 100644 --- a/yuthon_work_brand/views/work_menus.xml +++ b/yuthon_work_brand/views/work_menus.xml @@ -158,7 +158,7 @@ action="yuthon_issue.issue_approval_boss_action" sequence="5"/>