Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
15774 Widoki

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?

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć

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?

Najlepsza odpowiedź

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
Awatar
Odrzuć

Thanks!

Najlepsza odpowiedź

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



Awatar
Odrzuć

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

Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
kwi 25
2304
1
kwi 25
2995
1
kwi 25
697
4
mar 25
5287
2
lut 25
1618