diff --git a/shift/models/res_partner.py b/shift/models/res_partner.py index ca9052faa..5e911122d 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/535.bugfix.rst b/shift/readme/newsfragments/535.bugfix.rst new file mode 100644 index 000000000..6cacd8344 --- /dev/null +++ b/shift/readme/newsfragments/535.bugfix.rst @@ -0,0 +1,2 @@ +Correctly recompute ``can_shop`` on partner when the value changes in the +``cooperative_status``.