@@ -121,15 +121,13 @@ class PropertyBankStatements(models.Model):
|
||||
def _get_reconciliation_vals(self, record):
|
||||
if record.name:
|
||||
dt = datetime.strptime(str(self.start_time), '%Y-%m-%d %H:%M:%S').date()
|
||||
first_day = dt.replace(day=1)
|
||||
last_day = first_day + relativedelta(months=1) - relativedelta(days=1)
|
||||
last_day = dt.replace(day=1) + relativedelta(months=1) - relativedelta(days=1)
|
||||
total_rent_month = 0
|
||||
# 应收租金
|
||||
rent_ids = self.env['property.accounts.receivable'].search([
|
||||
('lessee_id.name', '=', record.name_account),
|
||||
('management_type_id.name', '=', '租金'),
|
||||
('is_reconciliation', '=', False),
|
||||
('due_date', '>=', fields.Date.to_string(first_day)),
|
||||
('due_date', '<=', fields.Date.to_string(last_day)),
|
||||
])
|
||||
# 应收押金
|
||||
@@ -137,7 +135,6 @@ class PropertyBankStatements(models.Model):
|
||||
('lessee_id.name', '=', record.name_account),
|
||||
('management_type_id.name', '=', '押金'),
|
||||
('is_reconciliation', '=', False),
|
||||
('due_date', '>=', fields.Date.to_string(first_day)),
|
||||
('due_date', '<=', fields.Date.to_string(last_day)),
|
||||
])
|
||||
# 应收管理费
|
||||
@@ -145,7 +142,6 @@ class PropertyBankStatements(models.Model):
|
||||
('lessee_id.name', '=', record.name_account),
|
||||
('management_type_id.name', '=', '管理费'),
|
||||
('is_reconciliation', '=', False),
|
||||
('due_date', '>=', fields.Date.to_string(first_day)),
|
||||
('due_date', '<=', fields.Date.to_string(last_day)),
|
||||
])
|
||||
# 应收水费
|
||||
@@ -153,7 +149,6 @@ class PropertyBankStatements(models.Model):
|
||||
('lessee_id.name', '=', record.name_account),
|
||||
('management_type_id.name', '=', '水费'),
|
||||
('is_reconciliation', '=', False),
|
||||
('due_date', '>=', fields.Date.to_string(first_day)),
|
||||
('due_date', '<=', fields.Date.to_string(last_day)),
|
||||
])
|
||||
# 应收电费
|
||||
@@ -161,7 +156,6 @@ class PropertyBankStatements(models.Model):
|
||||
('lessee_id.name', '=', record.name_account),
|
||||
('management_type_id.name', '=', '电费'),
|
||||
('is_reconciliation', '=', False),
|
||||
('due_date', '>=', fields.Date.to_string(first_day)),
|
||||
('due_date', '<=', fields.Date.to_string(last_day)),
|
||||
])
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
<button name="unsuspend" type="object" string="挂起" class="btn btn-primary button_width"/>
|
||||
</group>
|
||||
<group>
|
||||
<button name="receivable_return" type="object" string="撤销" class="btn btn-primary button_width"/>
|
||||
<button name="receivable_return" type="object" string="撤销对账" class="btn btn-primary button_width"/>
|
||||
</group>
|
||||
<group>
|
||||
<button name="action_refuse" type="object" string="退回" class="btn btn-primary button_width"/>
|
||||
<button name="action_refuse" type="object" string="退回应收" class="btn btn-primary button_width"/>
|
||||
</group>
|
||||
</group>
|
||||
<footer/>
|
||||
|
||||
Reference in New Issue
Block a user