diff --git a/odex25_realstate/property_management/data/ir_sequence_data.xml b/odex25_realstate/property_management/data/ir_sequence_data.xml
index 5a08e141e..073f94823 100644
--- a/odex25_realstate/property_management/data/ir_sequence_data.xml
+++ b/odex25_realstate/property_management/data/ir_sequence_data.xml
@@ -84,7 +84,7 @@
- Due Date Server Action
+ Due Date
list
@@ -106,7 +106,7 @@
-
+
Create Commission Vendor Invoice
@@ -114,7 +114,7 @@
code
for record in records:
- record.create_vendor_bill_for_payments()
+ record.action_invoice()
diff --git a/odex25_realstate/property_management/models/end_rental_contract.py b/odex25_realstate/property_management/models/end_rental_contract.py
index 53fc6aee7..66ba4d6f7 100644
--- a/odex25_realstate/property_management/models/end_rental_contract.py
+++ b/odex25_realstate/property_management/models/end_rental_contract.py
@@ -113,7 +113,7 @@ class EndOfRent(models.Model):
invoice.write({'invoice_line_ids': commands})
rec.invoice_id = invoice.id
rec.write({'state': 'done'})
- elif (rec.insurance_amount == 0.0 or rec.remain_amount==0.0) and !rec.maintenance:
+ elif (rec.insurance_amount == 0.0 or rec.remain_amount==0.0) and not rec.maintenance:
rec.write({'state': 'done'})
elif (rec.insurance_amount == 0.0 or rec.remain_amount==0.0) and rec.maintenance:
invoice_vals = rec._prepare_invoice_values(rec, abs(rec.remain_amount))
diff --git a/odex25_realstate/property_management/models/property_management_conf.py b/odex25_realstate/property_management/models/property_management_conf.py
index a47ea261f..511ed1d6e 100644
--- a/odex25_realstate/property_management/models/property_management_conf.py
+++ b/odex25_realstate/property_management/models/property_management_conf.py
@@ -3,14 +3,6 @@
from odoo import models, fields, api, exceptions, tools, _
-class Company(models.Model):
- _inherit = 'res.company'
-
- commission_percentage = fields.Float(string='Commission Percentage', help="The commission percentage.")
- commission_account_id = fields.Many2one('account.account', string='Commission Account', help="The account used to record commissions.")
- collecting_company_id = fields.Many2one('res.partner', string='Collecting Company', help="The company responsible for collecting the commission.")
-
-
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
diff --git a/odex25_realstate/property_management/models/rent_payment.py b/odex25_realstate/property_management/models/rent_payment.py
index c0595dcb2..5ae370a4b 100644
--- a/odex25_realstate/property_management/models/rent_payment.py
+++ b/odex25_realstate/property_management/models/rent_payment.py
@@ -203,7 +203,6 @@ class RentPayment(models.Model):
def create_vendor_bill_for_payments(self):
active_ids = self._context.get('active_ids', [])
# action = self.env['rent.payment'].browse(context.get('active_ids', []))
- # payments_to_invoice = action.filtered(lambda p: p.state == 'paid' and p.collected_from_company and not p.invoice_commission_id)
payments_to_invoice = self.env['rent.payment'].browse(active_ids).filtered(
lambda p: p.state == 'paid' and p.collected_from_company and not p.invoice_commission_id)
vendor_id = int(self.env['ir.config_parameter'].sudo().get_param('property_management.collecting_company_id'))