添加功能
This commit is contained in:
@@ -58,7 +58,7 @@ class PropertyLeaseRenewal(models.Model):
|
||||
deposit = fields.Float(string="押金")
|
||||
|
||||
receivables_ids = fields.One2many('early.receivables.line', 'renewal_id', string='应收明细')
|
||||
workflow_record_id = fields.Many2one('soong.workflow.record', string='应付账单流程')
|
||||
bills_record_id = fields.Many2one('property.bills.payable', string='应付账单流程')
|
||||
|
||||
@api.depends('receivables_ids.original_amount')
|
||||
def _compute_full_refund(self):
|
||||
@@ -113,7 +113,7 @@ class PropertyLeaseRenewal(models.Model):
|
||||
bills_line_list.append((0, 0, {
|
||||
'due_date': fields.Date.today(),
|
||||
'management_type_id': refund_line.management_type_id.id,
|
||||
'original_amount': refund_line.refund_amount,
|
||||
'original_amount': refund_line.line_amount,
|
||||
}))
|
||||
bills_payable = self.env['property.bills.payable'].create({
|
||||
'lease_contract_id': rec.contract_id.id,
|
||||
@@ -121,9 +121,7 @@ class PropertyLeaseRenewal(models.Model):
|
||||
'create_uid': self.env.uid,
|
||||
'bills_line_ids': bills_line_list
|
||||
})
|
||||
soong_record = self.env["soong.workflow.record"].search([("code", "=", bills_payable.code)])
|
||||
if soong_record:
|
||||
self.workflow_record_id = soong_record.id
|
||||
self.bills_record_id = bills_payable.id
|
||||
|
||||
# 原有作废/减免逻辑保留
|
||||
for receivable_id in rec.receivables_ids:
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<field name="document_ids" widget="preview_many2many"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="workflow_record_id" invisible="not workflow_record_id"/>
|
||||
<field name="bills_record_id" invisible="not bills_record_id"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="应收明细" invisible="renewal_type != 'early_checkout'">
|
||||
|
||||
Reference in New Issue
Block a user