Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4767 มุมมอง

def exp_authenticate(db, login, password, user_agent_env):

 I have been using this 

from odoo.service import common

common.RPC_VERSION_3 = {

'server_version': 14,

'server_version_info': odoo.release.version_info,

'server_serie': odoo.release.serie,

'protocol_version': 1,

}

def exp_version():

return common.RPC_VERSION_3

common.exp_version = exp_version


but the method never been trigger

อวตาร
ละทิ้ง

same way you extend regular modules. import / override. i modified send_file function in

http.py end of file make sure you assign it like this:

from openerp import http

def send_file( .... )

# code here

http.send_file = send_file

ผู้เขียน คำตอบที่ดีที่สุด

Hello F.P.,

Thank you very much for answering, I got success by doing that.

อวตาร
ละทิ้ง

Hi,

I need to add optional param in exp_authenticate method. i can't able to understand above solution.

How can i do it?

Related Posts ตอบกลับ มุมมอง กิจกรรม
Override Method without class? แก้ไขแล้ว
4
เม.ย. 23
16306
1
มี.ค. 15
8379
0
มี.ค. 15
5195
Python "super" - function does not work แก้ไขแล้ว
2
ธ.ค. 22
12778
0
พ.ค. 22
3144