Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
我在页面字段的onchange函数里返回了{'warning' : warning},希望能够显示报错信息,但是并没有报错信息弹出。望高手指点。
试试 raise osv.except_osv(_('warning!'), _(warning))
这样也试一试return {'value': {}, 'warning':warning}
多谢高手指点,我关闭浏览器并重新加载工程,就可以看到结果了。
raise osv.except_osv(_('warning!'), _(warning))return {'value': {}, 'warning':warning}两种都可以?