赞
踩
**山东财盛jack
**姜振建 qq:373719378 手机:15954039008(微信)
代码:
from odoo.tools.profiler import profile
方法前加
@profile
结果:
x_wizard ---------------------------- d:\program files\odoo 14.0.20201105\server\odoo\myaddons\zcpd\models\wizard.py, 31
1 0 0.0 @profile
@api.model
def default_get(self, default_fields):
"""
为向导赋默认值。
"""
1 0 0.0 nd = str(date.today().year)
1 2 14.52 result = super(x_wizard, self).default_get(default_fields)
1 0 0.0 result.update({
1 0 0.0 'nd':nd,
})
1 0 0.0 return result
Total:
1 2 14.52
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。