diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml index f66a7735f..0fab0d917 100644 --- a/soong_workflow/views/soong_workflow_record.xml +++ b/soong_workflow/views/soong_workflow_record.xml @@ -15,7 +15,6 @@ - @@ -119,9 +118,8 @@ ir.actions.act_window soong.workflow.record tree,kanban,search - [('reclaim_state', '=', False)] + [('employee_ids.user_id', '=', uid), ('reclaim_state', '=', False)] - {'search_default_group_by_employee': True} 人事相关流程 diff --git a/yuthon_hr_attendance/models/go_approval.py b/yuthon_hr_attendance/models/go_approval.py index 0d5553625..6a24ce917 100644 --- a/yuthon_hr_attendance/models/go_approval.py +++ b/yuthon_hr_attendance/models/go_approval.py @@ -50,12 +50,7 @@ class GoApprovals(models.Model): @api.onchange('is_day', 'is_hour') def _onchange_role_selection(self): if self.is_day and self.is_hour: - return { - 'warning': { - 'title': _('输入错误'), - 'message': _('只能选择主角色或者角色组中的一个,不能同时选择。') - } - } + raise UserError("只能选择按天或按小时") @api.onchange('start_day_selection', 'end_day_selection') def _onchange_selection_fields(self): diff --git a/yuthon_property/models/property_accounts_receivable.py b/yuthon_property/models/property_accounts_receivable.py index f4c341030..729c9f5c8 100644 --- a/yuthon_property/models/property_accounts_receivable.py +++ b/yuthon_property/models/property_accounts_receivable.py @@ -28,7 +28,7 @@ class PropertyAccountsReceivable(models.Model): remark = fields.Text(string='备注') red_date = fields.Date(string='红冲日期') charge_status = fields.Selection([('unpaid', '未收'), ('fully_paid', '已收')], string='收费状态') - is_suspend = fields.Boolean(string='挂起') + is_suspend = fields.Boolean(string='是否挂起') create_time = fields.Date(string='创建日期', default=lambda self: fields.Date.today()) is_billing = fields.Boolean(string='开票') is_reconciliation = fields.Boolean(string='对账') @@ -41,4 +41,13 @@ class PropertyAccountsReceivable(models.Model): last_update_time = fields.Datetime(string='最后修改时间') def unlink(self): - return super().unlink() \ No newline at end of file + return super().unlink() + + # 激活 + def suspend(self): + return self.write({'is_suspend': False}) + + + # 挂起 + def unsuspend(self): + return self.write({'is_suspend': True}) \ No newline at end of file diff --git a/yuthon_property/views/property_accounts_receivable_views.xml b/yuthon_property/views/property_accounts_receivable_views.xml index d692aa404..39b55ae5c 100644 --- a/yuthon_property/views/property_accounts_receivable_views.xml +++ b/yuthon_property/views/property_accounts_receivable_views.xml @@ -24,7 +24,10 @@ +