We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5180e6f + 6c9220e commit 4a7a4fdCopy full SHA for 4a7a4fd
delivery_driver/models/res_partner.py
@@ -16,7 +16,9 @@ def _check_is_driver(self):
16
drivers_in_carrier = self.env["delivery.carrier"].search(
17
[("driver_id", "in", self.ids)]
18
)
19
- if drivers_in_carrier and not self.is_driver:
+ if drivers_in_carrier and drivers_in_carrier.filtered_domain(
20
+ [("driver_id.is_driver", "=", False)]
21
+ ):
22
raise ValidationError(
23
_(
24
"You can't remove the driver flag from a partner that"
0 commit comments