Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
3508 Vues

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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
juin 24
2609
1
avr. 24
9479
1
mai 22
3759
2
juin 21
3020
1
sept. 20
2822