@@ -38,14 +38,14 @@ class PropertyBankStatements(models.Model):
|
||||
remake = fields.Text('备注')
|
||||
registered = fields.Float('挂账')
|
||||
|
||||
create_receivable_id = fields.Many2many(
|
||||
create_receivable_ids = fields.Many2many(
|
||||
'property.accounts.receivable',
|
||||
'property_bank_stmt_create_receivable_rel',
|
||||
'bank_stmt_id',
|
||||
'receivable_id',
|
||||
string='创建应收单'
|
||||
)
|
||||
write_receivable_id = fields.Many2many(
|
||||
write_receivable_ids = fields.Many2many(
|
||||
'property.accounts.receivable',
|
||||
'property_bank_stmt_write_receivable_rel',
|
||||
'bank_stmt_id',
|
||||
|
||||
@@ -252,7 +252,6 @@ class YuthonProperty(models.Model):
|
||||
'default_property_id': self.id
|
||||
}
|
||||
}
|
||||
|
||||
def put_property_handover(self):
|
||||
property_ids = self.env["yuthon.property"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
@@ -260,8 +259,6 @@ class YuthonProperty(models.Model):
|
||||
property_list = []
|
||||
for record in property_ids:
|
||||
property_list.append([0, 0, {'property_id': record.id}])
|
||||
for i in property_ids:
|
||||
i.write({'property_state': 'ing_handover'})
|
||||
return {
|
||||
'name': '提交物业移交',
|
||||
'view_mode': 'form',
|
||||
@@ -273,6 +270,7 @@ class YuthonProperty(models.Model):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def put_property_management(self):
|
||||
property_ids = self.env["yuthon.property"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id')))
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<tree string="物业管理">
|
||||
<header>
|
||||
<button name="put_merge_approval" string="合并" type="object" class="btn btn-primary"/>
|
||||
<button name="put_split_approval" type="object" string="拆分" class="btn btn-primary"/>
|
||||
<button name="put_property_handover" string="物业移交" type="object" class="btn btn-primary"/>
|
||||
<button name="put_declare_approval" type="object" string="提交出租申报" class="btn btn-primary"/>
|
||||
<button name="all_assessment_approval" string="评估推送" type="object" class="btn btn-primary"/>
|
||||
@@ -21,7 +22,6 @@
|
||||
<field name="property_state" class="list_ids_width"/>
|
||||
<field name="first_letter" column_invisible="1"/>
|
||||
<button name="put_assessment_approval" type="object" string="评估推送" class="btn btn-primary" invisible="property_state == 'ing'"/>
|
||||
<button name="put_split_approval" type="object" string="拆分" class="btn btn-primary" invisible="property_state != 'done'"/>
|
||||
<button name="put_offline_approval" type="object" string="提交线下审批" class="btn btn-primary" invisible="property_state != 'done'"/>
|
||||
<button name="put_adjustment_approval" type="object" string="调整出租条件" class="btn btn-primary" invisible="property_state != 'done'"/>
|
||||
</tree>
|
||||
|
||||
@@ -61,4 +61,13 @@ class PropertyHandoverLine(models.Model):
|
||||
owner_id = fields.Many2one('yuthon.owner.message', string="权属人")
|
||||
purposes = fields.Many2one(related='property_id.asset_type_id',string="用途")
|
||||
property_state = fields.Selection(related='property_id.property_state', string="现状",)
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
documents_ids = fields.Many2many('ir.attachment', string="附件")
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
handover_line = super(PropertyHandoverLine, self).create(vals)
|
||||
if handover_line.property_id:
|
||||
handover_line.property_id.write({
|
||||
'property_state': 'ing_handover'
|
||||
})
|
||||
return handover_line
|
||||
@@ -349,7 +349,7 @@ class PropertyReconciliationWizard(models.Model):
|
||||
('collection_type', '=', 'rent'),
|
||||
]
|
||||
reconciliation_id = self.env['property.reconciliation.line'].search(domain2, limit=1)
|
||||
self.env['property.accounts.receivable'].create({
|
||||
receivable_id = self.env['property.accounts.receivable'].create({
|
||||
'is_reconciliation': is_reconciliation,
|
||||
'due_date': extract_start_date,
|
||||
'due_date_end': extract_end_date,
|
||||
@@ -364,6 +364,13 @@ class PropertyReconciliationWizard(models.Model):
|
||||
'remark': line.remake,
|
||||
'reconciliation_time': fields.Datetime.now(),
|
||||
})
|
||||
rec.bank_id.write({
|
||||
'create_receivable_ids': [(4, receivable_id.id)]
|
||||
})
|
||||
if receivable_id:
|
||||
rec.bank_id.write({
|
||||
'create_receivable_ids': [(4, receivable_id.id)]
|
||||
})
|
||||
else:
|
||||
existing_record.write({
|
||||
'delivered1': existing_record.delivered1 + line.amount,
|
||||
@@ -375,6 +382,9 @@ class PropertyReconciliationWizard(models.Model):
|
||||
'is_write': True if line.amount != 0 else None,
|
||||
'reconciliation_time': fields.Datetime.now(),
|
||||
})
|
||||
rec.bank_id.write({
|
||||
'write_receivable_ids': [(4, existing_record.id)]
|
||||
})
|
||||
|
||||
# 计算已对账和未对账金额
|
||||
rec.amount_been_reconciled += line.amount
|
||||
|
||||
Reference in New Issue
Block a user