[FIX] website: fix _update_visitor_last_visit concurrency issues
[FIX] website: fix _update_visitor_last_visit concurrency issues

Install the website, install a second language.
Switch the language on the website: error 500.

The function opened a new cursor, to update website_visitor.
It did so at the end of the query dispatch.
However when switching the language of the website, the lang is written on the
website visitor. This is done at the flush, done at the end (exit) of the query.
This is done on the cursor that was used for all the transaction.
Therefore that write would systemically fail on a
ERROR: could not serialize access due to concurrent update

opw 2080986

closes odoo/odoo#38453

X-original-commit: cc88a36744dc3c2949c47e8b163e1de98f5dbd95
Signed-off-by: Nans Lefebvre (len) <a573b540d2dde90ba6da3b9d6286c8ec60c10044@odoo.com>

ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo