Skip to content

Commit c8cd696

Browse files
committed
[ADD] real_estate: Property maintenance requests and validations
- Created maintenance request model linked to property - Added status workflow - Validated approved maintenance cost - Computed total maintenance cost on property - Blocked property sale if any maintenance request is not done - Blocked deletion of properties and maintenance when maintenance is not done
1 parent 1273113 commit c8cd696

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

real_estate/models/real_estate_properties.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _unlink_if_accepted_offer(self):
129129

130130
def action_cancel(self):
131131
if self.stage == 'sold':
132-
raise UserError("A sold property cannot be cancelled")
132+
raise UserError("A sold property cannot be cancelled.")
133133
self.stage = 'cancelled'
134134

135135
def action_sold(self):

real_estate/models/real_estate_properties_maintenance_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ def _check_cost_on_accepted_status(self):
2525
def _unlink_if_maintenance_request_not_done(self):
2626
maintenace_request = self.filtered_domain([('status', '!=', 'done')])
2727
if maintenace_request:
28-
raise UserError("Can't delete an active Maintenance Request Record!")
28+
raise UserError("Can't delete an active Maintenance Request Record.")

0 commit comments

Comments
 (0)