diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-09-19 09:46:30 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-09-19 09:46:30 +0000 |
| commit | e3d2b018c2cbd8642d8eb15d8d3655263dda8c2d (patch) | |
| tree | 93b87cfa73b06cbe488f940bbf640df664cdf100 /addons | |
| parent | 5c408dd4422918454742b4ac8b4313de2b18720a (diff) | |
[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) <nim@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/website_event/models/event.py | 2 |
1 files changed, 1 insertions, 1 deletions
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") |
