[FIX] website_slides: reset public views when duplicating

Followup on 82ce815a8c . When content (`slide.slide`) is
duplicated, public_views should not be copied. Indeed it gives a new slide
and it makes no sense to keep the old slide statistics.

closes odoo/odoo#46084

X-original-commit: a2f5f8b552b48483ce5fdf0be04da7c27b326f2e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Swapnesh Shah
2020-02-24 11:52:00 +00:00
committed by Thibault Delavallée
parent 30122c8c7b
commit 8f703cb050
+1 -1
View File
@@ -183,7 +183,7 @@ class Slide(models.Model):
# views
embedcount_ids = fields.One2many('slide.embed', 'slide_id', string="Embed Count")
slide_views = fields.Integer('# of Website Views', store=True, compute="_compute_slide_views")
public_views = fields.Integer('# of Public Views')
public_views = fields.Integer('# of Public Views', copy=False)
total_views = fields.Integer("Views", default="0", compute='_compute_total', store=True)
# comments
comments_count = fields.Integer('Number of comments', compute="_compute_comments_count")