Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odgovori
15739 Prikazi

Odoo version 16.0

Python version 3.10


While running service it gives below warning in terminal


odoo-16.0/odoo/tools/config.py:565


DeprecationWarning: The longpolling-port is a deprecated alias to the gevent-port option, please use the latter



How to fix it?

Avatar
Opusti
Best Answer

Confusingly, this deprecation warning is shown, if you do not add longpolling_port to the odoo config. IMHO, instead it should be printed, if you still use this parameter. If you do not use the feature, you can deactivate it like pointed out above. If you use the gevent port (i.e. the longpolling feature), as a workaround, you can specify both in this order:

longpolling_port = False
gevent_port = 8072

This made the warning disappear in our case, while longpolling still runs under 8072.

Avatar
Opusti

I have multiple odoo instances like odoo 11, and two odoo 17 instances running on longpolling port: 8072, gevent_port 8073, 8074. First two instances is running without any issue. But the third one is raising error below,
OSError: [Errno 98] Address already in use: ('0.0.0.0', 8072)
though I've mentioned longpolling_port=False and 8074 as gevent_port in the configuration.
Is there any solution?

Best Answer

The longpolling-port option has been deprecated in Odoo 16.0 and you need to change it in  the default odoorc file or odoo config to gevent_port

or you can set the value to False:

longpolling_port = False
Avatar
Opusti

Thanks!

Best Answer

It functions with the current date.

How can I get the duration based on the date and time?

for myself:

if both i.start_date and i.end_date exist:

Datetime.strptime(str(i.start_date), "%Y-%m-%d %H:%M:%S").date(); s_date = datetime.strptime()

Datetime.strptime(str(i.end_date), "%Y-%m-%d %H:%M:%S").date() yields e_date.

If the date is smaller than the e-date, then

(e_date - s_date) is the outcome.

i.duration = outcome

alternatively:

message = f"{s_date} Needs to be preceding {e_date}."

message = raise UserError



Avatar
Opusti

It appears from the error message "Requirement already satisfied: psycopg2 in./.local/lib/python3.6/site-packages (2.7.4)" that your Python environment already has the psycopg2 module loaded.
https://geometrydashworld.net

Best Answer

Not working for me, in v 15 worked fine, now the chat option is useless, very sad

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
apr. 25
2296
1
apr. 25
2988
1
apr. 25
684
4
mar. 25
5277
2
feb. 25
1611