解决odoo 12 的priority评分星星,在保存状态下依旧可以修改的问题
修改后代码:
_onClick: function (event) { event.preventDefault(); event.stopPropagation(); if(this.mode == 'readonly'){ }else{ var index = $(event.currentTarget).data('index'); var newValue = this.field.selection[index][0]; if (newValue === this.value) { newValue = this.empty_value; } this._setValue(newValue); } },
修改文件路径:
/addons/web/static/src/js/fields/basic_fields.js