Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
15753 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ

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?

Câu trả lời hay nhất

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
Ảnh đại diện
Huỷ bỏ

Thanks!

Câu trả lời hay nhất

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



Ảnh đại diện
Huỷ bỏ

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
2298
1
thg 4 25
2991
1
thg 4 25
688
4
thg 3 25
5281
2
thg 2 25
1616