Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3534 Ansichten

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

Avatar
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juni 24
2658
1
Apr. 24
9518
1
Mai 22
3779
2
Juni 21
3047
1
Sept. 20
2843