@@ -2,7 +2,7 @@
|
||||
<odoo>
|
||||
<record id="other_meet_employee_list" model="ir.ui.view">
|
||||
<field name="name">other.meet.employee.list</field>
|
||||
<field name="model">room.room</field>
|
||||
<field name="model">other.meet.employee</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree editable="bottom">
|
||||
<field name="name"/>
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<record id="other_meet_employee_action" model="ir.actions.act_window">
|
||||
<field name="name">会议室</field>
|
||||
<field name="res_model">room.room</field>
|
||||
<field name="res_model">other.meet.employee</field>
|
||||
<field name="view_mode">list</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -22,9 +22,9 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
user_role_id = fields.Many2one('soong.user.role', string="角色", compute='_compute_user_role_id', store=True)
|
||||
node_link_len = fields.Char(string="转交2")
|
||||
is_supervising = fields.Boolean(string="是否督办")
|
||||
comment_note_id = fields.Many2one('soong.note', string="意见", default='妥否,呈领导审批')
|
||||
comment_note_id = fields.Many2one('soong.note', string="常用意见", default='妥否,呈领导审批')
|
||||
comment_note = fields.Char(string="意见", index=True, store=True)
|
||||
state_list = fields.Char(string="状态列表")
|
||||
|
||||
record_id = fields.Integer()
|
||||
trans_link_id = fields.Many2one('trans.link', string='转交节点')
|
||||
return_link_id = fields.Many2one('trans.link', string='退回节点')
|
||||
@@ -42,6 +42,11 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
string="督办人员", store=True)
|
||||
is_automatic = fields.Boolean('是否自动匹配')
|
||||
|
||||
@api.onchange('comment_note_id')
|
||||
def _onchange_comment_note_id(self):
|
||||
if self.comment_note_id:
|
||||
self.comment_note = self.comment_note_id.name
|
||||
|
||||
@api.depends('user_id.employee_id.user_role_id')
|
||||
def _compute_user_role_id(self):
|
||||
for record in self:
|
||||
@@ -139,10 +144,10 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
"node_btn_id": self.node_btn_id.id,
|
||||
"lase_click_date": fields.Datetime.now(),
|
||||
"approval_state": "2",
|
||||
"comment": self.comment_note_id.name,
|
||||
"comment": self.comment_note,
|
||||
})
|
||||
else:
|
||||
now_record_obj.write({"comment": self.comment_note_id.name,
|
||||
now_record_obj.write({"comment": self.comment_note,
|
||||
"approval_state": "2",
|
||||
"lase_click_date": fields.Datetime.now()})
|
||||
next_node_id = record_id.workflow_id.node_ids.search([('name', 'ilike', self.trans_link_id.name),
|
||||
@@ -201,7 +206,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
next_node_id = next_link.node_from
|
||||
record_id.log_ids[-1].write({'approval_state': '2',
|
||||
"lase_click_date": fields.Datetime.now(),
|
||||
"comment": self.comment_note_id.name,
|
||||
"comment": self.comment_note,
|
||||
"node_btn_name": "1"})
|
||||
# if not self.sudo().env["soong.workflow.log"].search([('node_id', '=', next_node_id.id)]):
|
||||
self.sudo().env["soong.workflow.log"].create({
|
||||
@@ -217,7 +222,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
workflow_record_id.employee_ids = self.employee_ids
|
||||
return self.node_btn_id.with_context(cx).run()
|
||||
if self.node_btn_name == '结束':
|
||||
record_id.log_ids[-1].comment = self.comment_note_id.name
|
||||
record_id.log_ids[-1].comment = self.comment_note
|
||||
record_id.log_ids[-1].approval_state = "3"
|
||||
record_id.log_ids[-1].lase_click_date = fields.Datetime.now()
|
||||
record_id.work_end = True
|
||||
@@ -226,7 +231,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
"node_id": False,})
|
||||
if self.node_btn_name == "分发":
|
||||
if self.employee_ids:
|
||||
record_id.log_ids[-1].write({"comment": self.comment_note_id.name,
|
||||
record_id.log_ids[-1].write({"comment": self.comment_note,
|
||||
"approval_state": "2",
|
||||
"lase_click_date": fields.Datetime.now()})
|
||||
self.sudo().env["soong.workflow.log"].create({
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<form string="意见">
|
||||
<group invisible="node_btn_name in ['分发', '结束', '收回']">
|
||||
<field name="comment_note_id" required="node_btn_name not in ['结束', '收回']" domain="[('note_setting_id.users_role_ids', 'in', user_role_id)]"/>
|
||||
<field name="comment_note" required="node_btn_name not in ['结束', '收回']"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="user_role_id" invisible="1"/>
|
||||
<field name="node_btn_id" invisible="1"/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<field name="sequence"/>
|
||||
<field name="specifics" required="1"/>
|
||||
<field name="decision_type_id"/>
|
||||
<field name="decision_type_on_id"/>
|
||||
<field name="decision_type_on_id" column_invisible="1"/>
|
||||
<field name="management_matters"/>
|
||||
<field name="council_id"/>
|
||||
<field name="team_meet_id"/>
|
||||
@@ -101,9 +101,6 @@
|
||||
<field name="name">决策清单</field>
|
||||
<field name="res_model">issue.approval.decision</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'search_default_group_decision_type_on_id': True,
|
||||
'search_default_group_decision_type_id': True}
|
||||
</field>
|
||||
</record>
|
||||
<record id="all_update_issue" model="ir.actions.server">
|
||||
<field name="name">更新公司和适用范围</field>
|
||||
|
||||
Reference in New Issue
Block a user