Skip to content

Commit ab41357

Browse files
committed
[IMP] estate: ignore button click when the property is already sold
- Ignore the button click to mark a property as sold if the property is already sold. This is more user-friendly than raising an error.
1 parent 76c2c27 commit ab41357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

estate/models/estate_property.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _unlink_except_new_or_cancelled(self) -> None:
7575
def action_set_sold(self) -> bool:
7676
for record in self:
7777
if record.state == "sold":
78-
raise UserError(_("This property has already been sold."))
78+
continue
7979

8080
if record.state == "cancelled":
8181
raise UserError(_("Cancelled properties cannot be sold."))

0 commit comments

Comments
 (0)