Skip to content

Commit

Permalink
[IMP] Prevent deleting filters used in tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino committed Dec 5, 2024
1 parent b97c46c commit 7e76c80
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion partner_tag_smart_assignation/models/res_partner_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
class ResPartnerCategory(models.Model):
_inherit = "res.partner.category"

tag_filter_condition_id = fields.Many2one("ir.filters", "Domain filter")
tag_filter_condition_id = fields.Many2one(
"ir.filters", "Domain filter", ondelete="restrict")
smart = fields.Boolean(
help="Enable this to automatically assign the category on partners "
"matching a given filter domain or SQL query."
Expand Down

0 comments on commit 7e76c80

Please sign in to comment.