标签:get 错误 sel 出现 位置 log patch event control
错误的示范:
from odoo import api, fields, models
from dateutil.relativedelta import relativedelta
from ..controllers.cls_get_trans_info import SpiderTrans
from odoo import exceptions
import gevent
import logging
from gevent import monkey
monkey.patch_all() # 这是一个错误的示例
class ClassName(models.Model):
_name = 'model.name'
...
正确的示范:
from odoo import api, fields, models
from dateutil.relativedelta import relativedelta
from ..controllers.cls_get_trans_info import SpiderTrans
from odoo import exceptions
import gevent
import logging
from gevent import monkey
monkey.patch_all() # 这是一个错误的示例
class ClassName(models.Model):
_name = 'model.name
field_name= fields.Char()
def func(self):
monkey.patch_all() #猴子补丁需要在该位置调用
标签:get 错误 sel 出现 位置 log patch event control
原文地址:https://www.cnblogs.com/qianxunman/p/12178911.html