!5482 添加功能

Merge pull request !5482 from 李鹏宇/zhou
This commit is contained in:
李鹏宇
2025-09-29 09:29:04 +00:00
committed by Gitee
3 changed files with 9 additions and 4 deletions
@@ -86,7 +86,7 @@
<record id="view_property_bank_statements_action1" model="ir.actions.act_window">
<field name="name">银行流水</field>
<field name="res_model">property.bank.statements</field>
<field name="view_mode">tree,form,search</field>
<field name="view_mode">tree,search</field>
<field name="domain">[('is_company', '=', True)]</field>
<field name="context">{'group_by': 'bank_state'}</field>
<field name="view_ids" eval="[(5, 0, 0),
@@ -139,6 +139,14 @@
<field name="name"/>
<field name="yuthon_property_ids"/>
<field name="lessee_id"/>
<filter
name="meter_date_current_month"
string="当月"
domain="[
('meter_date', '>=', context_today().replace(day=1).strftime('%Y-%m-%d')),
('meter_date', '&lt;=', (context_today().replace(day=1) + relativedelta(months=1) - relativedelta(days=1)).strftime('%Y-%m-%d'))
]"
/>
<group expand="0" string="Group By">
<filter string="仪表编号" name="group_by_name" domain="[]" context="{'group_by': 'name'}"/>
<filter string="按月" name="group_by_meter_date_month" domain="[]" context="{'group_by': 'meter_date:month'}"/>
@@ -381,7 +381,6 @@ class PropertyReconciliationWizard(models.Model):
last_day = (first_day + relativedelta(months=1)) - relativedelta(days=1)
domain = [
('management_type_id.name', '!=', '违约金'),
('lessee_id', '=', first_line.tenant_id.id),
('is_reconciliation', '=', False),
('is_suspend', '=', False),
('due_date', '>=', first_day),
@@ -422,7 +421,6 @@ class PropertyReconciliationWizard(models.Model):
('due_date', '=', extract_start_date),
('contract_id', '=', line.contract_id.id),
('management_type_id', '=', management_type_id.id),
('lessee_id', '=', first_line.tenant_id.id),
]
# 检查是否已有相同记录
existing_record = self.env['property.accounts.receivable'].search(check_domain)
@@ -441,7 +439,6 @@ class PropertyReconciliationWizard(models.Model):
'due_date_end': extract_end_date,
'penalty': reconciliation_id.rent,
'management_type_id': management_type_id.id,
'lessee_id': first_line.tenant_id.id,
'contract_id': line.contract_id.id,
'delivered1': line.amount,
'payout_date': rec.actual_date if (line.rent == line.amount and line.rent != 0) else None,