diff --git a/shift/models/res_partner.py b/shift/models/res_partner.py index e70eaa557..7c5f999bb 100644 --- a/shift/models/res_partner.py +++ b/shift/models/res_partner.py @@ -88,7 +88,7 @@ class ResPartner(models.Model): store=True, ) - @api.depends("cooperative_status_ids") + @api.depends("cooperative_status_ids.can_shop") def _compute_can_shop(self): """ Shopping authorisation may vary on the can_shop status of the diff --git a/shift/readme/newsfragments/536.bugfix.rst b/shift/readme/newsfragments/536.bugfix.rst new file mode 100644 index 000000000..6cacd8344 --- /dev/null +++ b/shift/readme/newsfragments/536.bugfix.rst @@ -0,0 +1,2 @@ +Correctly recompute ``can_shop`` on partner when the value changes in the +``cooperative_status``.