Merge branch 'master' into dev
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
"wizard/soong_workflow_apostille_ok_wizard_view.xml",
|
||||
"wizard/soong_workflow_record_revoke_wizard_view.xml",
|
||||
"wizard/soong_workflow_record_delete_wizard_view.xml",
|
||||
'wizard/change_opinions_wizard_views.xml',
|
||||
"templates/soong_workflow_templates.xml",
|
||||
"views/menuitem.xml",
|
||||
],
|
||||
|
||||
@@ -60,6 +60,20 @@ class SoongWorkflow(models.Model):
|
||||
employee_ids = fields.Many2many('hr.employee', string="人员")
|
||||
role_ids = fields.Many2many('soong.user.role', 'soong_workflow_role_rel', 'workflow_id', 'user_role_id', string="角色")
|
||||
|
||||
def change_opinions_wizard(self):
|
||||
soong_ids = self.env["soong.workflow"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
return {
|
||||
'name': '变更意见',
|
||||
'type': 'ir.actions.act_window',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'change.opinions.wizard',
|
||||
'target': 'new',
|
||||
'context': {
|
||||
'default_soong_ids': [(6, 0, soong_ids.ids)],
|
||||
}
|
||||
}
|
||||
|
||||
@api.onchange('is_ease')
|
||||
def _onchange_is_ease(self):
|
||||
target_value = not self.is_ease
|
||||
|
||||
@@ -442,9 +442,9 @@ class SoongWorkflowMixin(models.AbstractModel):
|
||||
is_supervising = False
|
||||
if self._module in ['yuthon_official']:
|
||||
is_supervising = self.is_supervising
|
||||
is_first_node = (self_state == 0)
|
||||
if is_first_node:
|
||||
comment_note_id = self.env['soong.note'].search([('name', '=', '妥否,呈领导审批。')], limit=1).id
|
||||
|
||||
if btn_rec.node_id.comment_id:
|
||||
comment_note_id = btn_rec.node_id.comment_id.id
|
||||
else:
|
||||
comment_note_id = False
|
||||
return {
|
||||
|
||||
@@ -88,6 +88,7 @@ class SoongWorkflowNode(models.Model):
|
||||
employee_ids = fields.Many2many('hr.employee', string='抄送/传阅人员')
|
||||
is_end = fields.Boolean(string="结束", default=False)
|
||||
department_id = fields.Many2many('hr.department', string='部门转入范围')
|
||||
comment_id = fields.Many2one('soong.note', string="固定意见")
|
||||
approval_concatenation = fields.Selection([('chuan', '串申'), ('bing', '并申')], string="审批形式", default="bing",
|
||||
help='并:任何人均给意见,最后一个完成的人转交到下一节点.'
|
||||
'串:都会收到消息,但任意一个人转交后,即到下一节点,其他人将不再显示,相当于收回.')
|
||||
|
||||
@@ -47,4 +47,6 @@ access_soong_workflow_record_revoke_wizard,soong_workflow_record_revoke_wizard,m
|
||||
access_soong_workflow_line,soong_workflow_line,model_soong_workflow_line,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
access_project_project_line,project_project_line,model_project_project_line,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
access_soong_bounced_wizard,soong_bounced_wizard,model_soong_bounced_wizard,base.group_user,1,1,1,1
|
||||
access_workflow_line_wizard,workflow_line_wizard,model_workflow_line_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
access_workflow_line_wizard,workflow_line_wizard,model_workflow_line_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
|
||||
access_change_opinions_wizard,change_opinions_wizard,model_change_opinions_wizard,soong_workflow.group_soong_workflow_user,1,1,1,1
|
||||
|
@@ -13,6 +13,7 @@
|
||||
<field name="name" placeholder="ex. 'Draft' or 'Direct Manager'" required="1"/>
|
||||
<field name="node_name" placeholder="ex. 'draft' or 'direct_manager'" required="1"/>
|
||||
<field name="department_id" widget="many2many_tags"/>
|
||||
<field name="comment_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sequence" required="1"/>
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
<field name="is_manager" column_invisible="1"/>
|
||||
<button name="delete_record" type="object" string="删除" class="btn-primary" confirm="你确定要删除吗?"
|
||||
invisible="approve_state != 'start'"/>
|
||||
<button name="reminders_record" type="object" string="催办" class="btn-primary" invisible="approve_state in ['start', 'end']"/>
|
||||
<button name="reminders_record" type="object" string="催办" class="btn-primary" invisible="soong_state != 'done' or create_uid != uid"/>
|
||||
<button name="revoke_record" type="object" string="撤销" class="btn-primary"
|
||||
groups="soong_workflow.group_soong_workflow_manager"/>
|
||||
</tree>
|
||||
|
||||
@@ -115,4 +115,11 @@
|
||||
<field name="res_model">soong.workflow</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
</record>
|
||||
<record id="change_opinions_wizard" model="ir.actions.server">
|
||||
<field name="name">变更意见</field>
|
||||
<field name="model_id" ref="soong_workflow.model_soong_workflow"/>
|
||||
<field name="binding_model_id" ref="soong_workflow.model_soong_workflow"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.change_opinions_wizard()</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -9,5 +9,6 @@ from . import soong_workflow_record_revoke_wizard
|
||||
from . import role_group_wizard
|
||||
from . import workflow_line_wizard
|
||||
from . import soong_bounced_wizard
|
||||
from . import change_opinions_wizard
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
from odoo import fields, models, api
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
from datetime import datetime, date, time, timedelta
|
||||
|
||||
|
||||
class ChangeOpinionsWizard(models.Model):
|
||||
_name = 'change.opinions.wizard'
|
||||
_description = '变更意见'
|
||||
|
||||
node_name = fields.Char(string="节点名称")
|
||||
comment_id = fields.Many2one('soong.note', string="意见")
|
||||
soong_ids = fields.Many2many('soong.workflow')
|
||||
|
||||
def confirm(self):
|
||||
for soong in self.soong_ids:
|
||||
for node in soong.node_ids:
|
||||
if node.name == self.node_name:
|
||||
node.comment_id = self.comment_id
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_change_opinions_wizard" model="ir.ui.view">
|
||||
<field name="name">变更意见</field>
|
||||
<field name="model">change.opinions.wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<group>
|
||||
<field name="node_name"/>
|
||||
<field name="comment_id"/>
|
||||
<field name="soong_ids" widget="many2many_tags" invisible="1"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="confirm" string="确认" type="object" class="oe_highlight"/>
|
||||
<button special="cancel" string="取消" class="oe_link" />
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -21,6 +21,19 @@ class SoongWorkflowRecordDeleteWizard(models.TransientModel):
|
||||
workflow_record = self.env["soong.workflow.record"].sudo().search([("id", "=", record.id)], limit=1)
|
||||
if not workflow_record:
|
||||
continue
|
||||
# 议题状态恢复
|
||||
if workflow_record.res_model == "issue.approval":
|
||||
issue_id = self.env["issue.approval"].sudo().search([("id", "=", workflow_record.res_id)], limit=1)
|
||||
issue_line_records = self.env['issue.approval.line'].search([
|
||||
('issue_approval_id', '=', issue_id.id)
|
||||
])
|
||||
if issue_line_records:
|
||||
issue_line_records.unlink()
|
||||
issue_library_id = self.env["issue.library"].sudo().search([("issue_approval_id", "=", issue_id.id)], limit=1)
|
||||
if issue_library_id:
|
||||
issue_library_id.write({'issue_state': 'draft'})
|
||||
|
||||
|
||||
# 删除假期额度里面的对应的流程记录
|
||||
related_detail_models = [
|
||||
'vacation.leave.line',
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
sequence="1"/>
|
||||
<menuitem id="yuthon_base_reports"
|
||||
name="打印模板配置"
|
||||
parent="system_version_menu_root_board"
|
||||
parent="cron_type_menu_root"
|
||||
action="base.reports_action"
|
||||
sequence="5"/>
|
||||
</odoo>
|
||||
@@ -253,6 +253,15 @@ class YuthonHrEmployee(models.Model):
|
||||
('divorced', 'Divorced')
|
||||
], string='Marital Status', groups="hr.group_hr_user", default='single', tracking=True)
|
||||
|
||||
def update_trade_union(self):
|
||||
records = self.env['hr.employee'].search([('is_membership', '=', True)])
|
||||
for record in records:
|
||||
if record.contract_id.termination_date:
|
||||
if record.contract_id.termination_date <= date.today() + timedelta(days=8):
|
||||
record.is_membership = False
|
||||
if record.contract_id.date_end <= date.today() + timedelta(days=8):
|
||||
record.is_membership = False
|
||||
|
||||
@api.depends('date_end')
|
||||
def _compute_end_comparison(self):
|
||||
for record in self:
|
||||
|
||||
@@ -9,13 +9,17 @@ class ContractReviewApproval(models.Model):
|
||||
code = fields.Char(string="编号",
|
||||
default=lambda self: self.env['ir.sequence'].next_by_code('contract_review_approval_code'))
|
||||
name = fields.Char(string='合同名称')
|
||||
user_id = fields.Many2one('res.users', string='合同经办人')
|
||||
user_id = fields.Many2one('res.users', string='合同经办人', default=lambda self: self.env.user)
|
||||
is_issues = fields.Boolean(string='是否上会')
|
||||
issues_result = fields.Html(string="会议结果")
|
||||
related_issues_id = fields.Many2one('issue.library', string="关联议题")
|
||||
department_id = fields.Many2one('hr.department', string='送审部门')
|
||||
amount = fields.Float(string='合同金额')
|
||||
remarks = fields.Text(string='情况说明')
|
||||
purchase_type = fields.Selection(
|
||||
[('fixed', '固定资产'), ('low', '低值易耗'), ('service', '服务'), ('day', '日常消耗品')],
|
||||
string="采购类型", required=True, default='fixed')
|
||||
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
urgency_level = fields.Selection([('normal', '普件'), ('urgent', '急件'), ('emergency', '特急件')], string='紧急度',
|
||||
default='normal')
|
||||
@@ -23,9 +27,6 @@ class ContractReviewApproval(models.Model):
|
||||
work_end = fields.Boolean(string="结束")
|
||||
contract_type = fields.Many2one('yuthon.contract.type', string="合同类型")
|
||||
formation_method = fields.Many2one('yuthon.contract.type', string="形成方式")
|
||||
submitting_unit = fields.Char(string="送审单位")
|
||||
sign_date = fields.Date(string="合同签订日期")
|
||||
performance_term_day = fields.Integer(string='履约期限')
|
||||
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
@@ -19,7 +19,7 @@ class YuthonHrEmployee(models.Model):
|
||||
"views": [[form_id, "form"]],
|
||||
"context":{
|
||||
'default_employee_id': employee.id,
|
||||
'default_phone': employee.work_phone,
|
||||
'default_phone': employee.mobile_phone,
|
||||
'default_job_id': employee.job_id.id,
|
||||
'default_structure_id': employee.contract_id.structure_type_id.id if employee.contract_id else False,
|
||||
'default_onboarding_date': employee.entry_date,
|
||||
|
||||
@@ -46,16 +46,13 @@
|
||||
<group>
|
||||
<field name="name" required="1"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="user_id"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="department_id"/>
|
||||
<field name="contract_type"/>
|
||||
<field name="formation_method"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="purchase_type"/>
|
||||
<field name="amount"/>
|
||||
<field name="submitting_unit"/>
|
||||
<field name="sign_date"/>
|
||||
<field name="performance_term_day" string="履约期限(天)"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -60,6 +60,48 @@ class IssueLibrary(models.Model):
|
||||
member_of_department = fields.Boolean("是否是本部门数据", compute='_compute_part_of_department',
|
||||
search='_search_part_of_department')
|
||||
|
||||
is_passed = fields.Selection([('',''), ('pass', '通过'), ('reject', '未通过')])
|
||||
is_push_party = fields.Boolean(string="党推送")
|
||||
is_push_class = fields.Boolean(string="班子推送")
|
||||
is_push_boss = fields.Boolean(string="董事推送")
|
||||
|
||||
def correction(self):
|
||||
for rec in self:
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的议题')])
|
||||
url = f'https://oa.thtzjt.com/web#id={self.id}&cids=2&action={menu_id.action.id}&model=yuthon.notice&view_type=list&menu_id={menu_id.id}'
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa',
|
||||
user_id=rec.employee_id.wecom_userid,
|
||||
title="议题修正",
|
||||
description="您有待修正的议题,请尽快修正",
|
||||
url=url, btntxt="详细信息")
|
||||
return {
|
||||
'type': 'ir.actions.client',
|
||||
'tag': 'display_notification',
|
||||
'params': {
|
||||
'type': 'success',
|
||||
'message': '已发送提醒消息',
|
||||
'sticky': False,
|
||||
}
|
||||
}
|
||||
|
||||
def library_push(self):
|
||||
for rec in self:
|
||||
if rec.is_passed != 'pass':
|
||||
raise UserError("当前状态不允许推送")
|
||||
|
||||
push_update_vals = {}
|
||||
if rec.is_party and rec.is_passed:
|
||||
push_update_vals['is_push_party'] = True
|
||||
|
||||
if rec.is_class and rec.is_passed:
|
||||
push_update_vals['is_push_class'] = True
|
||||
|
||||
if rec.is_boss and rec.is_passed:
|
||||
push_update_vals['is_push_boss'] = True
|
||||
|
||||
if push_update_vals:
|
||||
rec.write(push_update_vals)
|
||||
|
||||
def add_workflow(self):
|
||||
return {
|
||||
'name': '流程添加弹窗',
|
||||
@@ -115,15 +157,26 @@ class IssueLibrary(models.Model):
|
||||
specifics_list.append(line.issue_approval_decision_id.specifics)
|
||||
dec.approval_decision_sequence = ';'.join(specifics_list) if specifics_list else ''
|
||||
|
||||
def revoke(self):
|
||||
self.write({'issue_state': 'draft'})
|
||||
if self.issue_approval_id:
|
||||
issue_line_records = self.env['issue.approval.line'].search([
|
||||
('issue_approval_id', '=', self.issue_approval_id.id)
|
||||
])
|
||||
if issue_line_records:
|
||||
issue_line_records.unlink()
|
||||
workflow_id = self.env['soong.workflow.record'].search([('res_model', '=', 'issue.approval'),
|
||||
('res_id', '=', self.issue_approval_id.id)], limit=1)
|
||||
if workflow_id:
|
||||
workflow_id.sudo().unlink()
|
||||
self.issue_approval_id.unlink()
|
||||
|
||||
|
||||
def all_issue_pull(self):
|
||||
issue_active_ids = self.env["issue.library"].browse(self._context.get('active_ids', self._context.get('active_id')))
|
||||
if not issue_active_ids:
|
||||
if self.issue_state != 'draft':
|
||||
for i in issue_active_ids:
|
||||
if i.issue_state != 'draft':
|
||||
raise UserError("当前状态不允许提交")
|
||||
else:
|
||||
for i in issue_active_ids:
|
||||
if i.issue_state != 'draft':
|
||||
raise UserError("当前状态不允许提交")
|
||||
form_id = self.env.ref("yuthon_issue.issue_library_approval_form").id
|
||||
issue_decision_lines = []
|
||||
specifics_list = []
|
||||
@@ -227,7 +280,7 @@ class IssueLibrary(models.Model):
|
||||
|
||||
def single_meeting_issue(self):
|
||||
issue = self.env["issue.library"].browse(self.id)
|
||||
if issue.state != 'will':
|
||||
if issue.issue_state != 'will':
|
||||
raise UserError("当前状态不允许上会")
|
||||
self.write({"issue_state": "on_meet"})
|
||||
issue_details = [(0, 0, {
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
<field name="creart_datetime" column_invisible="1"/>
|
||||
<field name="member_of_department" column_invisible="1"/>
|
||||
<button name="single_issue_pull" string="提交" type="object" class="oe_highlight"/>
|
||||
<button name="library_push" string="推送" type="object" class="oe_highlight"/>
|
||||
<button name="revoke" string="撤销" type="object" class="oe_highlight" invisible="issue_state == 'draft'"/>
|
||||
<button name="issue_cancel" string="取消" type="object" class="oe_highlight"/>
|
||||
<button name="unlink" string="删除" type="object" class="oe_highlight"/>
|
||||
<button name="approval_details" string="审批详情" type="object" class="oe_highlight"/>
|
||||
@@ -213,6 +215,7 @@
|
||||
<field name="issue_state"/>
|
||||
<field name="company_id" optional="hide"/>
|
||||
<button name="single_meeting_issue" string="上会" type="object" class="oe_highlight"/>
|
||||
<button name="correction" string="修正" type="object" class="oe_highlight"/>
|
||||
<button name="issue_cancel" string="取消" type="object" class="oe_highlight"/>
|
||||
<button name="unlink" string="删除" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
@@ -327,7 +330,7 @@
|
||||
<field name="name">党总支议题库</field>
|
||||
<field name="res_model">issue.library</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('is_party', '=', True)]</field>
|
||||
<field name="domain">[('is_push_party', '=', True)]</field>
|
||||
<field name="search_view_id" ref="view_issue_library_filter"/>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree3')}),
|
||||
@@ -338,7 +341,7 @@
|
||||
<field name="name">党支委议题库</field>
|
||||
<field name="res_model">issue.library</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('is_party', '=', True)]</field>
|
||||
<field name="domain">[('is_push_party', '=', True)]</field>
|
||||
<field name="search_view_id" ref="view_issue_library_filter"/>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree3')}),
|
||||
@@ -368,6 +371,7 @@
|
||||
<field name="issue_state"/>
|
||||
<field name="company_id" optional="hide"/>
|
||||
<button name="single_meeting_issue" string="上会" type="object" class="oe_highlight"/>
|
||||
<button name="correction" string="修正" type="object" class="oe_highlight"/>
|
||||
<button name="issue_cancel" string="取消" type="object" class="oe_highlight"/>
|
||||
<button name="unlink" string="删除" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
@@ -481,7 +485,7 @@
|
||||
<field name="name">班子会议题库</field>
|
||||
<field name="res_model">issue.library</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('is_class', '=', True)]</field>
|
||||
<field name="domain">[('is_push_class', '=', True)]</field>
|
||||
<field name="search_view_id" ref="view_issue_library_filter"/>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree4')}),
|
||||
@@ -511,6 +515,7 @@
|
||||
<field name="issue_state"/>
|
||||
<field name="company_id" optional="hide"/>
|
||||
<button name="single_meeting_issue" string="上会" type="object" class="oe_highlight"/>
|
||||
<button name="correction" string="修正" type="object" class="oe_highlight"/>
|
||||
<button name="issue_cancel" string="取消" type="object" class="oe_highlight"/>
|
||||
<button name="unlink" string="删除" type="object" class="oe_highlight"/>
|
||||
</tree>
|
||||
@@ -623,7 +628,7 @@
|
||||
<field name="name">董事会议题库</field>
|
||||
<field name="res_model">issue.library</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('is_boss', '=', True)]</field>
|
||||
<field name="domain">[('is_push_boss', '=', True)]</field>
|
||||
<field name="search_view_id" ref="view_issue_library_filter"/>
|
||||
<field name="view_ids" eval="[(5, 0, 0),
|
||||
(0, 0, {'view_mode': 'tree', 'view_id': ref('yuthon_issue.view_issue_library_tree5')}),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from email.policy import default
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta, date
|
||||
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
@@ -39,6 +39,14 @@ class PropertyMeterArchives(models.Model):
|
||||
|
||||
state = fields.Selection([("reading", "已抄"), ("unreading", "未抄")], string="抄表状态", default="unreading")
|
||||
|
||||
def update_ele_state(self):
|
||||
current_date = fields.Date.today() + timedelta(hours=8)
|
||||
records = self.env["property.meter.archives"].search([])
|
||||
for record in records:
|
||||
if record.end_time:
|
||||
if current_date >= record.end_time:
|
||||
record.archives_state = "stop"
|
||||
|
||||
def delete_data(self):
|
||||
archives_ids = self.env["property.meter.archives"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from odoo import models, fields, api
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta, date
|
||||
|
||||
|
||||
class PropertyElectricReading(models.Model):
|
||||
@@ -53,6 +54,14 @@ class PropertyMeterWater(models.Model):
|
||||
)
|
||||
remarks = fields.Text(string="备注")
|
||||
|
||||
def update_water_state(self):
|
||||
current_date = fields.Date.today() + timedelta(hours=8)
|
||||
records = self.env["property.meter.water"].search([])
|
||||
for record in records:
|
||||
if record.end_time:
|
||||
if current_date >= record.end_time:
|
||||
record.water_state = "stop"
|
||||
|
||||
def water_task(self):
|
||||
current_date = fields.Date.today()
|
||||
current_date = current_date.replace(day=15)
|
||||
|
||||
@@ -21,7 +21,6 @@ class InheritPurchaseOrder(models.Model):
|
||||
('分管领导', '分管领导'),
|
||||
('总经理', '总经理')], default='draft')
|
||||
work_end = fields.Boolean(string="结束")
|
||||
active = fields.Boolean('Active', default=True, tracking=True)
|
||||
user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user)
|
||||
company_id = fields.Many2one(related='user_id.employee_ids.company_id', string="公司")
|
||||
department_id = fields.Many2one(related='user_id.employee_ids.department_id', string="部门")
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
<xpath expr="//field[@name='date_order']" position="after">
|
||||
<field name="user_id"/>
|
||||
<field name="start_date"/>
|
||||
<field name="active" invisible="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='products']" position="attributes">
|
||||
<attribute name="string">明细</attribute>
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
<group string="审批事项">
|
||||
<field name="is_back" invisible="1"/>
|
||||
<field name="work_end" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="name" string="事项标题"/>
|
||||
<field name="users_id"/>
|
||||
<field name="information_categories_ids" widget="many2many_tags" string="业务类型"/>
|
||||
<field name="reason" string="事项说明"/>
|
||||
<field name="document_ids" widget="preview_many2many" string="附件清单"/>
|
||||
<field name="type_stamp_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="is_chapter == 'no' or not is_chapter"/>
|
||||
<field name="scope_chapter_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" invisible="is_chapter == 'no' or not is_chapter"/>
|
||||
<field name="information_categories_ids" widget="many2many_tags"/>
|
||||
<field name="reason"/>
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
<field name="department_id" invisible="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
Reference in New Issue
Block a user