Merge branch 'dev' of gitee.com:jinan-pengyusen-data/gzth into dev_zhou
Signed-off-by: 李鹏宇 <9664676+pengyuthon@user.noreply.gitee.com>
This commit is contained in:
@@ -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):
|
||||
# 开始时间结束时间开始日期结束日期,后期优化
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
<sheet>
|
||||
<div class="row">
|
||||
<div class="col-6 text-center">
|
||||
<field name="name" invisible="1"/>
|
||||
<button name="button_dates" string="安排日程" type="object" class="btn btn-primary"/>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
|
||||
@@ -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 ''
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<field name="name">issue.approval.decision.tree</field>
|
||||
<field name="model">issue.approval.decision</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="决策清单" editable="bottom">
|
||||
<tree string="决策清单">
|
||||
<field name="sequence"/>
|
||||
<field name="name"/>
|
||||
<field name="ordinal"/>
|
||||
<field name="category_matter"/>
|
||||
<field name="decision_id"/>
|
||||
<field name="specifics"/>
|
||||
<field name="council"/>
|
||||
<field name="team_meet"/>
|
||||
@@ -17,6 +17,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_issue_approval_decision_form" model="ir.ui.view">
|
||||
<field name="name">issue.approval.decision.form</field>
|
||||
<field name="model">issue.approval.decision</field>
|
||||
@@ -31,7 +32,8 @@
|
||||
</div>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="category_matter"/>
|
||||
<field name="decision_id"/>
|
||||
<field name="sequence"/>
|
||||
<field name="council"/>
|
||||
</group>
|
||||
<group>
|
||||
@@ -52,6 +54,20 @@
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_issue_approval_decision_search" model="ir.ui.view">
|
||||
<field name="name">issue.approval.decision.form</field>
|
||||
<field name="model">issue.approval.decision</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<searchpanel>
|
||||
<field name="decision_id"/>
|
||||
</searchpanel>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="issue_approval_decision_action" model="ir.actions.act_window">
|
||||
<field name="name">决策清单</field>
|
||||
<field name="res_model">issue.approval.decision</field>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
sequence="30"/>
|
||||
<menuitem
|
||||
id="issue_approval_decision_menu"
|
||||
parent="issue_approval_menu"
|
||||
parent="tianhe_issue_library_menu_root"
|
||||
name="决策清单"
|
||||
action="issue_approval_decision_action"
|
||||
sequence="40"/>
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
action="yuthon_issue.issue_approval_boss_action"
|
||||
sequence="5"/>
|
||||
<menuitem id="issue_approval_decision_menu_board"
|
||||
parent="issue_approval_menu_board"
|
||||
parent="tianhe_issue_library_menu_root_board"
|
||||
name="决策清单"
|
||||
action="yuthon_issue.issue_approval_decision_action"
|
||||
sequence="7"/>
|
||||
|
||||
Reference in New Issue
Block a user