Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
3519 Переглядів

No one should be able to edit the form once the process is completed.

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
черв. 24
2610
1
квіт. 24
9491
1
трав. 22
3765
2
черв. 21
3023
1
вер. 20
2827