Merge pull request !3600 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-07-01 01:44:11 +00:00
committed by Gitee
6 changed files with 11 additions and 11 deletions
@@ -19,6 +19,7 @@ class PropertyAccountsReceivable(models.Model):
invoicing_type = fields.Selection([('spot', '专票'), ('cape', '普票')], related='lessee_id.invoicing_type',
string="开票类型")
due_date = fields.Date(string='应收日期')
reconciliation_time = fields.Datetime('对账时间')
year = fields.Selection(selection=[(str(i), str(i)) for i in range(2024, 2060)], string='所属年', )
month = fields.Selection([('1', '一月'), ('2', '二月'), ('3', '三月'), ('4', '四月'),
('5', '五月'), ('6', '六月'), ('7', '七月'), ('8', '八月'),
@@ -29,9 +30,8 @@ class PropertyAccountsReceivable(models.Model):
multiplier = fields.Integer(string='季度')
remark = fields.Text(string='备注')
red_date = fields.Date(string='红冲日期')
charge_status = fields.Selection([('unpaid', '未收'), ('fully_paid', '已收')], string='收费状态')
is_suspend = fields.Boolean(string='是否挂起')
create_time = fields.Date(string='创建日期', default=lambda self: fields.Date.today())
create_time = fields.Datetime(string='创建时间', default=fields.Datetime.now)
is_billing = fields.Boolean(string='开票')
is_reconciliation = fields.Boolean(string='对账')
difference_amount = fields.Float(string='差额')
@@ -3,9 +3,9 @@
<field name="name">property.accounts.receivable.tree</field>
<field name="model">property.accounts.receivable</field>
<field name="arch" type="xml">
<tree editable="bottom" string="应收账单" decoration-danger = "charge_status == 'unpaid'"
decoration-muted="is_reconciliation == True"
decoration-success="charge_status == 'fully_paid'" limit="20">
<tree editable="bottom" string="应收账单"
decoration-success="is_reconciliation == True"
limit="20">
<header>
<button name="all_red" string="红冲" type="object" class="btn btn-primary"/>
</header>
@@ -19,9 +19,9 @@
<field name="discount_amount"/>
<field name="delivered1"/>
<field name="submitted"/>
<field name="charge_status" column_invisible="1"/>
<field name="multiplier" column_invisible="1"/>
<field name="is_push" optional="hide"/>
<field name="reconciliation_time" optional="hide"/>
<field name="create_time"/>
<field name="remark"/>
<field name="last_update_time" optional="hide"/>
@@ -61,12 +61,10 @@ class PropertyTenantWizard(models.Model):
tenant_id.write(tenant_data)
def update_account(self, row):
account_id = self.env['property.tenant.information'].search([('name', '=', row[2].value)])
account_id = self.env['property.tenant.information'].search([('name', '=', row[0].value)])
if account_id:
account_id.bank_ids = [(0, 0, {
'tenant_id':account_id.id,
'user':row[2].value,
'name': row[3].value,
'bank': row[4].value,
'bank': row[1].value,
})]
@@ -78,6 +78,7 @@ class ClickReconciliationWizard(models.Model):
receivable.write({
'is_reconciliation': True,
'delivered1': amount,
'reconciliation_time': fields.Datetime.now(),
'payout_date': record.start_time.date(),
'remark': line_data.get('remark', ''), # 使用line_data中的备注
'receivable_log': f'当前登录人{record.env.user.name}于{fields.Datetime.now()}对户名为{record.name_account}进行对账操作'
@@ -128,6 +128,7 @@ class PropertyReconciliationWizard(models.Model):
'delivered1': line.amount,
'payout_date': rec.bank_id.start_time.date(),
'remark': line.remake,
'reconciliation_time': fields.Datetime.now(),
'receivable_log': f'当前登录人{rec.env.user.name}于{fields.Datetime.now()}对户名为{rec.bank_id.name_account}进行对账操作,对账应收金额为{rec.receivable_total},实际金额为{rec.actual_total}'
})
@@ -26,7 +26,7 @@
<field name="rent_month" sum = "Total" readonly="1" force_save="1"/>
<field name="rent" sum = "Total" readonly="1" force_save="1"/>
<field name="collection_type"/>
<field name="amount" sum = "Total"/>
<field name="amount" sum = "Total" readonly="1"/>
<field name="remake"/>
</tree>
</field>