跳至內容
選單
此問題已被標幟
4 回覆
17135 瀏覽次數

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?

頭像
捨棄
最佳答案

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.

頭像
捨棄

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?

最佳答案

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
頭像
捨棄

Thanks!

最佳答案

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



頭像
捨棄

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

最佳答案

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
5月 25
1808
1
4月 25
2882
1
4月 25
3630
1
4月 25
1237
4
3月 25
6094