Help

1

Odoo 13 Community - "A partner is linked to only one visitor."

Avatar
Roland van Eeden

I've had this instance running perfectly on a Hosted VPS for just under a month however when I tried to login this morning I was given the following error message:

Oops! Something went wrong.

Take a look at the error message below.

Error message:

A partner is linked to only one visitor.

further when i tried accessing my local hosted test database I encountered the same problem. Any suggestions on where to start looking?


1 Comment
Avatar
Discard
Avatar
Thomas Pigneur
-

It seems to be due to the Track visitor module included in the website. I solved the issue by desactivated the tracking

6 Answers
4
Avatar
Odoo Tools
Best Answer

This error seems to be the ‘website’ module bug. It takes place when a related session (website.visitor) is archived. It happens within 7 days if you do not log in, and then Odoo blocks duplicated session to be created.

Solution:

  1. As Cristobal offers, manually remove archived website visitors. Using the SQL: 'DELETE FROM website_visitor WHERE active = False;'. It is possible also to do right from the interface:

    1. Go to the entry Website > Visitors

    2. In the debug mode add the field 'active' to the view

    3. Filter visitors by 'Archived'

    4. Use the Action > 'Unarchive'

  2. To turn of the cron ‘Website Visitor:  Archive old visitors’ which would block archiving any website visitors (in order not to repeat the point 1 again).

The solution is  for sure temporary until the bug itself is not fixed. I have just sent the issue: https://github.com/odoo/odoo/issues/40077. Please follow to know when it is fixed.

So, let’s hope it will be done soon, since it is quite dangerous, especially when customers can’t log in portal and we have no idea that they can’t.


Avatar
Discard
1
Avatar
Ossi Mantylahti
Best Answer

I can confirm that this problem is still present on Odoo version 23rd April 2020. Workaround for disabling the cron job is to edit the code and comment it out. Path:

Developer mode on

Technical -> (under Automation) Scheduled actions -> Website visitors. Edit Python code and comment out the line:

#model._cron_archive_visitors()


Avatar
Discard
0
Avatar
Cristobal Marti
Best Answer

I had the same problem, and I solved it by deleting data by SQL.

sudo su - postgres

psql

 \c DB_name 

DELETE FROM public.website_visitor WHERE id = '1';

Maybe the ID number is not what I indicate here, just try it.

Avatar
Discard
0
Best Answer

Good job ! @Cristobal Marti it's work

Avatar
Discard
0
Avatar
Jaf Faizal Jalaluddin
Best Answer

Hi, have the same problem.

But using the ODOO hosted at net3sixty-sdn-bhd.odoo.com

How to solve this porblem?

Avatar
Discard
0
Avatar
Izote LLC
Best Answer

Also had the same problem. Thanks for the fixes!!!

Avatar
Discard