No one should be able to edit the form once the process is completed.
此问题已终结
1
回复
4934
查看
Hi,
Try the below Javascript code
odoo.define('module.extension_name', function (require) {
var FormView = require('web.FormView');
FormView.include({
load_record: function() {
this._super.apply(this, arguments);
if (this.model === 'your.model') {
if (this.datarecord && (this.datarecord.state === 'state')) {
this.$buttons.find('.o_form_button_edit').css({'display':'none'});
}
else {
this.$buttons.find('.o_form_button_edit').css({'display':''});
}
}
});
});And include the file in assets:
Regards
| 相关帖文 | 回复 | 查看 | 活动 | |
|---|---|---|---|---|
|
|
1
6月 24
|
4649 | ||
|
|
1
4月 24
|
11295 | ||
|
|
1
5月 22
|
5964 | ||
|
|
2
6月 21
|
5243 | ||
|
|
1
9月 20
|
5284 |