Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
4 Odpovědi
18594 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit

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?

Nejlepší odpověď

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
Zrušit

Thanks!

Nejlepší odpověď

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
Zrušit

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

Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
kvě 25
2370
1
dub 25
3402
1
dub 25
4209
1
dub 25
1714
4
bře 25
6810