[FIX] website_blog: update viewed count without update the write_date

To backport in v13
+ check for optimistic lock

task-2211013

Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
This commit is contained in:
Jeremy Kersten
2020-04-27 13:49:01 +00:00
co-authored by Romain Derie
parent dba74ed353
commit 27de8b1478
+1 -1
View File
@@ -259,7 +259,7 @@ class WebsiteBlog(http.Controller):
request.session.modified = True
# Increase counter
blog_post.sudo().write({
blog_post.sudo()._write({
'visits': blog_post.visits + 1,
'write_date': blog_post.write_date,
})