Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3521 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iun. 24
2627
1
apr. 24
9495
1
mai 22
3766
2
iun. 21
3029
1
sept. 20
2831