@@ -69,26 +69,26 @@
|
||||
<button name="admin_end" type="object" string="管理员强制结束" class="oe_highlight" groups="soong_workflow.group_soong_workflow_manager"/>
|
||||
<button name="delete_record" type="object" string="删除" class="oe_highlight" groups="soong_workflow.group_soong_workflow_manager"/>
|
||||
</header>
|
||||
<field name="workflow_id" string="审批类型"/>
|
||||
<field name="code"/>
|
||||
<field name="workflow_id" string="审批类型"/>
|
||||
<field name="name"/>
|
||||
<field name="approve_state" string="审批状态" widget="badge" decoration-danger="approve_state == 'end'" decoration-success="approve_state == 'pending'"/>
|
||||
<field name="create_uid"/>
|
||||
<field name="node_id" string="当前节点"/>
|
||||
<field name="employee_ids" widget="many2many_tags" string="当前经办人" class="list_ids_width"/>
|
||||
<field name="soong_state"/>
|
||||
<field name="documents_ids" widget="preview_many2many"/>
|
||||
<field name="approvals_group_id" optional="hide"/>
|
||||
<field name="department_id" optional="hide"/>
|
||||
<field name="users_ids" string="用户" widget="many2many_tags" optional="hide"/>
|
||||
<field name="write_date2"/>
|
||||
<field name="company_id" optional="hide"/>
|
||||
<field name="text" optional="hide"/>
|
||||
<field name="node_id" string="当前节点" column_invisible="1"/>
|
||||
<field name="documents_ids" widget="preview_many2many" column_invisible="1"/>
|
||||
<field name="approvals_group_id" column_invisible="1"/>
|
||||
<field name="department_id" column_invisible="1"/>
|
||||
<field name="users_ids" string="用户" widget="many2many_tags" column_invisible="1"/>
|
||||
<field name="write_date2" column_invisible="1"/>
|
||||
<field name="company_id" column_invisible="1"/>
|
||||
<field name="text" column_invisible="1"/>
|
||||
<field name="reclaim_state" column_invisible="1"/>
|
||||
<field name="member_of_department" optional="hide"/>
|
||||
<field name="member_of_department" column_invisible="1"/>
|
||||
<field name="is_manager" column_invisible="1"/>
|
||||
<field name="meal"/>
|
||||
<field name="workflow_happen_date" string="发生日期"/>
|
||||
<field name="meal" column_invisible="1"/>
|
||||
<field name="workflow_happen_date" string="发生日期" column_invisible="1"/>
|
||||
<button name="delete_record" type="object" string="删除" class="btn-primary" confirm="你确定要删除吗?"
|
||||
invisible="not (is_manager or approve_state == 'start') "/>
|
||||
<button name="reminders_record" type="object" string="催办" class="btn-primary"
|
||||
@@ -223,8 +223,10 @@
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">soong.workflow.record</field>
|
||||
<field name="view_mode">tree,form,search</field>
|
||||
<field name="context">{'search_default_group_by_approvals_group_id': True,}</field>
|
||||
<field name="domain">[('reclaim_state', '=', False)]</field>
|
||||
<field name="search_view_id" ref="soong_workflow_record_search1"/>
|
||||
<field name="view_id" ref="soong_workflow_record_tree"/>
|
||||
</record>
|
||||
<record id="soong_workflow_record_action_reclaim" model="ir.actions.act_window">
|
||||
<field name="name">工作流回收站</field>
|
||||
|
||||
@@ -634,7 +634,7 @@ class HrAttendance(models.Model):
|
||||
'name': '考勤记录列表',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'hr.attendance.detail',
|
||||
'view_mode': 'tree',
|
||||
'view_mode': 'tree,form',
|
||||
'domain': domain,
|
||||
}
|
||||
return action
|
||||
|
||||
@@ -20,7 +20,7 @@ class YuthonRetiredApproval(models.Model):
|
||||
job_id = fields.Many2one(related='employee_id.job_id', string="岗位")
|
||||
onboarding_time = fields.Date(related='employee_id.entry_date', string="入职日期")
|
||||
expected_departure_date = fields.Date(related='employee_id.retire_date', string="预计退休日期")
|
||||
retirement_type = fields.Selection([('normal', '正常退休'), ('special_job_early', '特殊工种提前退休'), ('sick', '病退')], string='退休类型')
|
||||
retirement_type = fields.Selection([('normal', '正常退休'), ('special_job_early', '提前退休'), ('sick', '病退')], string='退休类型')
|
||||
social_security_card = fields.Char(string='社保卡')
|
||||
treatment_choice = fields.Selection([('pension_payment', '养老金发放'), ('enterprise_annuity', '企业年金')], string='待遇选择')
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</group>
|
||||
<group string="人员信息" col="3">
|
||||
<group>
|
||||
<field name="employee_id" widget="ztree_select"/>
|
||||
<field name="employee_id" domain="[('user_state', '=' , 'in')]"/>
|
||||
<field name="department_id"/>
|
||||
<field name="retirement_type"/>
|
||||
</group>
|
||||
|
||||
@@ -996,8 +996,7 @@ class PropertyRentList(models.Model):
|
||||
contract_id = fields.Many2one('property.lease.contract', string="关联租赁合同审批")
|
||||
tenure_type = fields.Selection(related='contract_id.tenure_type', string="权属类型", store=True)
|
||||
property_address = fields.Text(string="物业信息", compute='get_property_address')
|
||||
contract_sort = fields.Selection(related='contract_id.contract_sort', string="资产类型", store=True) # 数据库存储问题,无意义
|
||||
contract_sort1 = fields.Selection([('property', '物业'), ('guanggao', '广告位'), ('parking', '停车场'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property')
|
||||
contract_sort = fields.Selection(related='contract_id.contract_sort', string="资产类型", store=True)
|
||||
company_id = fields.Many2one(related='contract_id.lessor_id', string="出租方公司", store=True)
|
||||
|
||||
@api.depends('contract_id')
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<field name="tenure_type"/>
|
||||
<field name="contract_id"/>
|
||||
<group expand="0" string="group_by">
|
||||
<filter name="contract_sort1" string="资产类型" context="{'group_by':'contract_sort1'}"/>
|
||||
<filter name="contract_sort" string="资产类型" context="{'group_by':'contract_sort'}"/>
|
||||
<filter name="group_company_id" string="公司" context="{'group_by':'company_id'}"/>
|
||||
<filter name="group_tenure_type" string="权属类型" context="{'group_by':'tenure_type'}"/>
|
||||
<filter name="group_admin_id" string="管理员" context="{'group_by':'admin_id'}"/>
|
||||
@@ -347,6 +347,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='lessee_id']" position="before">
|
||||
<field name="property_name"/>
|
||||
<field name="contract_sort" column_invisible="1"/>
|
||||
<field name="contract_id" string="合同" readonly="1"/>
|
||||
</xpath>
|
||||
</field>
|
||||
|
||||
@@ -53,7 +53,7 @@ class PropertyRentalWizard(models.Model):
|
||||
"contract_id": record.id,
|
||||
"due_date": start_date,
|
||||
'multiplier': multiplier,
|
||||
"contract_sort1": record.contract_sort,
|
||||
"contract_sort": record.contract_sort,
|
||||
'acc_type': acc_type,
|
||||
"lessee_id": record.lessee_id.id,
|
||||
"property_id": property_id,
|
||||
@@ -66,7 +66,7 @@ class PropertyRentalWizard(models.Model):
|
||||
"contract_id": record.id,
|
||||
"due_date": start_date,
|
||||
'multiplier': multiplier,
|
||||
"contract_sort1": record.contract_sort,
|
||||
"contract_sort": record.contract_sort,
|
||||
"lessee_id": record.lessee_id.id,
|
||||
'acc_type': acc_type,
|
||||
"property_id": property_id,
|
||||
|
||||
@@ -29,12 +29,25 @@ class YuthonTaskApproval(models.Model):
|
||||
duration = fields.Float(string="时长", store=True, compute='_compute_duration')
|
||||
concentration = fields.Float( string="浓度")
|
||||
warning_value = fields.Float(string="警戒值")
|
||||
symbol = fields.Selection([('outweigh', '>'), ('less', '<'), ('equals', '=')], string="符号", compute='_compute_symbol')
|
||||
def _get_default_name_title(self):
|
||||
return self._description if self._description else self._name
|
||||
|
||||
name_title = fields.Char(default=_get_default_name_title)
|
||||
self_users_ids = fields.Many2many('res.users', string="当前经办人", default=lambda self: [(6, 0, [self.env.user.id])])
|
||||
|
||||
@api.depends('concentration', 'warning_value')
|
||||
def _compute_symbol(self):
|
||||
for record in self:
|
||||
if record.concentration and record.warning_value:
|
||||
if record.concentration > record.warning_value:
|
||||
record.symbol = 'outweigh'
|
||||
elif record.concentration < record.warning_value:
|
||||
record.symbol = 'less'
|
||||
else:
|
||||
record.symbol = 'equals'
|
||||
|
||||
|
||||
@api.onchange('task_id')
|
||||
def _onchange_task_id(self):
|
||||
if self.task_id:
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
<group invisible="not concentration">
|
||||
<label for="concentration"/>
|
||||
<div class="d-inline-flex w-100">
|
||||
<field name="concentration" class="me-2" style="max-width: 3rem !important;"/>< 警戒值
|
||||
<field name="concentration" class="me-2" style="max-width: 3rem !important;"/>
|
||||
<field name="symbol" class="ms-2" style="max-width: 2rem !important;"/>警戒值
|
||||
<field name="warning_value" class="ms-2" readonly="1"
|
||||
style="max-width: 3rem !important;"/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user