From e59e065a24ea7a047207e9fb954dad6d64e50ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Fri, 5 Sep 2025 11:48:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/soong_workflow_record.xml | 2 +- .../models/hr_attendance_detail_wechat.py | 1 + .../models/property_bank_statements.py | 28 +++- .../views/property_bank_statements_views.xml | 2 - .../models/inherit_yuthon_property.py | 146 +++++++++--------- .../views/inherit_yuthon_property_views.xml | 17 +- .../wizard/click_reconciliation_wizard.py | 17 ++ .../wizard/property_reconciliation_wizard.py | 2 +- yuthon_purchase/__manifest__.py | 1 + yuthon_purchase/security/company_rule.xml | 8 + yuthon_stock/security/company_rule.xml | 8 + yuthon_stock/views/inherit_stock_picking.xml | 6 + 12 files changed, 151 insertions(+), 87 deletions(-) create mode 100644 yuthon_purchase/security/company_rule.xml create mode 100644 yuthon_stock/security/company_rule.xml diff --git a/soong_workflow/views/soong_workflow_record.xml b/soong_workflow/views/soong_workflow_record.xml index 33e9392c8..09787386b 100644 --- a/soong_workflow/views/soong_workflow_record.xml +++ b/soong_workflow/views/soong_workflow_record.xml @@ -154,7 +154,7 @@ ir.actions.act_window soong.workflow.record tree,kanban,search - {'check_employee': 1} + {'check_employee': 1, 'to_do': 1, 'approve_state':1 } [('users_ids', 'in', uid), ('reclaim_state', '=', False)] diff --git a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py index 3691dd72b..835648320 100644 --- a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py +++ b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py @@ -43,6 +43,7 @@ class HrAttendanceDetail(models.Model): department_id = fields.Many2one('hr.department', string="部门", related="employee_id.department_id", readonly=True, store=True) source = fields.Selection([('iot', '考勤机'), ('mini_programs', '小程序')], string="来源") attendance_iot_id = fields.Many2one('attendance.iot', string="设备号") + attendance_address = fields.Char(related="attendance_iot_id.attendance_address", string="设备地址") userid = fields.Char(string='userid') groupname = fields.Char(string='打卡规则名称') checkin_type = fields.Char(string='打卡类型') diff --git a/yuthon_property/models/property_bank_statements.py b/yuthon_property/models/property_bank_statements.py index 8176f5261..5d5e212d3 100644 --- a/yuthon_property/models/property_bank_statements.py +++ b/yuthon_property/models/property_bank_statements.py @@ -33,7 +33,7 @@ class PropertyBankStatements(models.Model): original_amount = fields.Float(string='交易金额') yes_amount = fields.Float(string='已对') no_amount = fields.Float(string='未对') - is_reconciliation = fields.Boolean('是否已对账') + reconciliation_time = fields.Datetime('对账时间') voucher_type = fields.Selection([('electronic_transfer', '电子转账凭证'), ('telegraphic_transfer', '电汇凭证')], string='凭证种类') remake = fields.Text('备注') registered = fields.Float('挂账') @@ -52,7 +52,7 @@ class PropertyBankStatements(models.Model): 'receivable_id', string='修改应收单' ) - + is_reconciliation = fields.Boolean('是否对账') # 无效 company_select = fields.Selection([('jhtz', '天河投资'), ('thwg', '天河物管'), ('thcj', '天河城建')]) property_ids = fields.Many2many('yuthon.property', string='物业地址') bank_state = fields.Selection([('not_reconciled', '未对账'), ('reconciled', '已对账'), ('registered', '挂账'), ('other', '其他')], string='状态', default='not_reconciled') @@ -183,3 +183,27 @@ class PropertyBankStatements(models.Model): return record + + def disposable(self): + bank_ids = self.env["property.bank.statements"].browse( + self._context.get('active_ids', self._context.get('active_id'))) + for rec in bank_ids: + penalty_type = self.env['yuthon.management.type'].search( + [('name', '=', '违约金')], + limit=1) + bank_lines = self.env['property.bank.line'].search([ + ('bank', '=', rec.name), + ('tenant_id.name', '!=', False), + ]) + if bank_lines: + tenant_id = bank_lines[0].tenant_id.id + start_date = (rec.start_time + timedelta(hours=8)).date() + accounts = self.env['property.accounts.receivable'].search([ + ('payout_date', '=', start_date), + ('lessee_id', '=', tenant_id), + ('contract_id', 'in', rec.contract_ids.ids), + ('property_id', 'in', rec.property_ids.ids), + ('management_type_id', '!=', penalty_type.id), + ]) + if accounts: + rec.reconciliation_time = accounts[0].reconciliation_time diff --git a/yuthon_property/views/property_bank_statements_views.xml b/yuthon_property/views/property_bank_statements_views.xml index 1bb673217..0df5ce690 100644 --- a/yuthon_property/views/property_bank_statements_views.xml +++ b/yuthon_property/views/property_bank_statements_views.xml @@ -27,7 +27,6 @@ - @@ -65,7 +64,6 @@ -