From 1aff35b10d5ec5550ba90ea41b027120eed6e610 Mon Sep 17 00:00:00 2001 From: sunjie Date: Mon, 27 Oct 2025 00:58:14 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/controllers/applet_attendance.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_attendance.py b/yuthon_hr_attendance/controllers/applet_attendance.py index 1832d6df9..837be1226 100644 --- a/yuthon_hr_attendance/controllers/applet_attendance.py +++ b/yuthon_hr_attendance/controllers/applet_attendance.py @@ -921,8 +921,13 @@ class AppletAttendance(Controller): last_day_str = last_day.strftime('%Y-%m-%d') floor_name = request.env['yuthon.epitope.values'].sudo().search([('id', '=', floor_id)]).name - domain = [('state', '=', reading_state), - ('epitope_values_id.name', '=', floor_name), + # domain = [('state', '=', reading_state), + # ('epitope_values_id.name', '=', floor_name), + # ('meter_date', '>=', first_day_str), + # ('meter_date', '<=', last_day_str)] + + # 去掉 state + domain = [('epitope_values_id.name', '=', floor_name), ('meter_date', '>=', first_day_str), ('meter_date', '<=', last_day_str)] From ac4fa5be9f2dea10b60b274857adb1822f9f0278 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: Mon, 27 Oct 2025 09:32:39 +0800 Subject: [PATCH 02/10] =?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 --- .../wizard/property_reconciliation_wizard.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index 0fdda21fc..9cd65c1bc 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -39,13 +39,13 @@ class PropertyReconciliationWizard(models.Model): @api.onchange('reconciliation_line_ids', 'actual_total') def _onchange_amount_reconciled(self): for rec in self: - rec.amount_reconciled = rec.actual_total - rec.amount_been_reconciled - sum(line.amount for line in rec.reconciliation_line_ids) + rec.amount_reconciled = max(rec.bank_id.no_amount - sum(line.amount for line in rec.reconciliation_line_ids), 0) for line in rec.reconciliation_line_ids: if line.amount and line.collection_type != 'penalty': if (line.due_date.month >= rec.actual_date.month and line.due_date.year == line.due_date.year) or (line.due_date.year > rec.actual_date.year): if line.rent >= line.amount: due_date_str = fields.Date.to_date(line.due_date).strftime('%Y-%m') - line.remake = f'预{due_date_str},欠{round(line.rent - line.amount, 2)}' + line.remake = f'补{due_date_str},欠{round(line.rent - line.amount, 2)}' if line.due_date.month == rec.actual_date.month and line.due_date.year == line.due_date.year: if line.rent >= line.amount: @@ -55,7 +55,7 @@ class PropertyReconciliationWizard(models.Model): if (line.due_date.month < rec.actual_date.month and line.due_date.year == line.due_date.year) or (line.due_date.year < rec.actual_date.year): if line.rent >= line.amount: due_date_str = fields.Date.to_date(line.due_date).strftime('%Y-%m') - line.remake = str(rec.actual_date) + '补' + str(due_date_str) + ',欠' + str(round(line.rent - line.amount, 2)) + line.remake = str(rec.actual_date) + '预' + str(due_date_str) + ',欠' + str(round(line.rent - line.amount, 2)) @api.depends('reconciliation_line_ids') From f78aa716c1c6853c97a26a97931737a1236a9b4b 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: Mon, 27 Oct 2025 09:55:15 +0800 Subject: [PATCH 03/10] =?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 --- .../wizard/property_reconciliation_wizard.py | 17 ++++--------- .../property_reconciliation_wizard_views.xml | 25 +++++++++++++------ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard.py b/yuthon_property_approval/wizard/property_reconciliation_wizard.py index 9cd65c1bc..cd94525b9 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard.py +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard.py @@ -19,6 +19,8 @@ class PropertyReconciliationWizard(models.Model): name_account = fields.Char( string='对方户名') account = fields.Char(string='账号') amount_been_reconciled = fields.Float(string='已对金额', store=True) + amount_water_been = fields.Float(string='已对流水金额') + amount_water = fields.Float(string='未对流水金额') amount_reconciled = fields.Float(string='未核销', store=True) actual_total = fields.Float(string='实收金额') actual_date = fields.Date(string='实收日期') @@ -34,7 +36,8 @@ class PropertyReconciliationWizard(models.Model): rec.lessee_ids = rec.bank_id.lessee_ids.ids rec.name_account = rec.bank_id.name_account rec.remake = rec.bank_id.remake - + rec.amount_water_been = rec.bank_id.no_amount + rec.amount_water = rec.bank_id.yes_amount @api.onchange('reconciliation_line_ids', 'actual_total') def _onchange_amount_reconciled(self): @@ -88,16 +91,6 @@ class PropertyReconciliationWizard(models.Model): @api.onchange('actual_total') def _onchange_reconciliation_line_ids(self): - collection_type_mapping = { - 'deposit': '押金', - 'rent': '租金', - 'water_fee': '水费', - 'electricity_fee': '电费', - 'penalty': '违约金', - 'management_fee': '管理费', - 'repair_fee': '维修费', - 'other': '其他' - } new_lines = [] # 违约金生成 for contract_id in self.bank_id.contract_ids: @@ -328,7 +321,7 @@ class PropertyReconciliationWizard(models.Model): 按已生成的明细行 分配金额 :return: """ - remaining_amount = self.actual_total + remaining_amount = self.bank_id.no_amount rent_lines = [line for line in self.reconciliation_line_ids if line.collection_type == "rent"] other_lines = [line for line in self.reconciliation_line_ids if line.collection_type != "rent"] diff --git a/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml b/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml index 503eb5b15..7c8194c77 100644 --- a/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml +++ b/yuthon_property_approval/wizard/property_reconciliation_wizard_views.xml @@ -19,19 +19,28 @@ - + + + + + + + + - - - - - - - + + + + + + + + + From 4f5db2088542dddaefae35633134b836f4fa9d9c 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: Mon, 27 Oct 2025 10:13:57 +0800 Subject: [PATCH 04/10] =?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 --- yuthon_property_approval/models/property_lease_contract.py | 2 +- .../wizard/binding_information_wizard_views.xml | 4 ++-- .../wizard/property_reconciliation_wizard.py | 4 ++-- .../wizard/property_reconciliation_wizard_views.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/yuthon_property_approval/models/property_lease_contract.py b/yuthon_property_approval/models/property_lease_contract.py index 9c4b50bfb..649639cca 100644 --- a/yuthon_property_approval/models/property_lease_contract.py +++ b/yuthon_property_approval/models/property_lease_contract.py @@ -304,7 +304,7 @@ class PropertyLeaseContract(models.Model): name_title = fields.Char(default=_get_default_name_title) - contract_sort = fields.Selection([('property', '物业'), ('guanggao', '广告位'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property') + contract_sort = fields.Selection([('property', '物业'), ('guanggao', '广告位'),('parking', '停车场'), ('guanzi', '管子间'), ('room', '机房'), ('base_station','基站'), ('other', '其他')], string="资产类型", default='property') @api.depends('lease_ids.address_id.title_deed') def _compute_title_information(self): diff --git a/yuthon_property_approval/wizard/binding_information_wizard_views.xml b/yuthon_property_approval/wizard/binding_information_wizard_views.xml index 4b4461a27..5acb3f508 100644 --- a/yuthon_property_approval/wizard/binding_information_wizard_views.xml +++ b/yuthon_property_approval/wizard/binding_information_wizard_views.xml @@ -10,8 +10,8 @@ - - + +