From 25929a82b8ae7bf48c969dd9cdf0bbc94aa52b72 Mon Sep 17 00:00:00 2001 From: zainab2097 <149927291+zainab2097@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:34:48 +0300 Subject: [PATCH] Update end_rental_contract.py --- .../property_management/models/end_rental_contract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odex25_realstate/property_management/models/end_rental_contract.py b/odex25_realstate/property_management/models/end_rental_contract.py index 01c85eeff..caf68f30f 100644 --- a/odex25_realstate/property_management/models/end_rental_contract.py +++ b/odex25_realstate/property_management/models/end_rental_contract.py @@ -252,7 +252,7 @@ class PropertyManagementMaintenance(models.Model): request_id = fields.Many2one('sale.order', string="Request Item") def action_rest_draft(self): - rec.write({'state': 'draft'}) + self.write({'state': 'draft'}) @api.onchange('renter_invoice') @@ -282,7 +282,7 @@ class PropertyManagementMaintenance(models.Model): 'quantity': 1.0, 'price_unit': self.hand_cost, # 'account_id': maintenance.contract_id.revenue_account_id.id, - 'analytic_account_id': maintenance.property_id.account_analy_id.id if payment.property_id.account_analy_id else False, + 'analytic_account_id': maintenance.property_id.account_analy_id.id if maintenance.property_id.account_analy_id else False, 'tax_ids': [(6, 0, [payment.tax_id.id])] if payment.tax_id else False, # Assigning tax_id to tax_ids })) invoice_vals = {