İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3533 Görünümler

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

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Haz 24
2658
1
Nis 24
9517
1
May 22
3779
2
Haz 21
3047
1
Eyl 20
2843