diff options
| author | Jeremy Kersten <jke@odoo.com> | 2020-04-23 14:37:00 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-04-27 13:49:01 +0000 |
| commit | 27de8b1478902cf4b7cc7fcd0bd2736bf68ca3d6 (patch) | |
| tree | d8ccb70a338cf805537849e8001e636b2809575b | |
| parent | dba74ed353e9acdb7c0ea002724ed420f4f26d15 (diff) | |
[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>
| -rw-r--r-- | addons/website_blog/controllers/main.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_blog/controllers/main.py b/addons/website_blog/controllers/main.py index ad3a629f6bd..3e9108bd1a0 100644 --- a/addons/website_blog/controllers/main.py +++ b/addons/website_blog/controllers/main.py @@ -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, }) |
