From e3d2b018c2cbd8642d8eb15d8d3655263dda8c2d Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 19 Sep 2019 09:46:30 +0000 Subject: [PATCH] [FIX] website_event: track publishing When an event is published/unpublished, the 'Is Published' value appears twice in the chatter. This is because `website_published` is defined as a related of `is_published`, and `is_published` is tracked. The button calls `website_publish_button` which triggers a `write` on `website_published`, the latter triggering a `write` on `is_published`. The situation is quite exceptional: we usually don't define a related on a field of the same model. Therefore, we can simply change the field tracked. opw-2073804 closes odoo/odoo#37128 Signed-off-by: Nicolas Martinelli (nim) --- addons/website_event/models/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_event/models/event.py b/addons/website_event/models/event.py index 90812f15783..1f7525e26aa 100644 --- a/addons/website_event/models/event.py +++ b/addons/website_event/models/event.py @@ -22,7 +22,7 @@ class Event(models.Model): _name = 'event.event' _inherit = ['event.event', 'website.seo.metadata', 'website.published.multi.mixin'] - is_published = fields.Boolean(tracking=True) + website_published = fields.Boolean(tracking=True) is_participating = fields.Boolean("Is Participating", compute="_compute_is_participating")