Update end_rental_contract.py

This commit is contained in:
zainab2097 2024-10-03 15:34:48 +03:00 committed by GitHub
parent fd7f96152e
commit 25929a82b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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 = {