Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
3517 Vistas

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

Avatar
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jun 24
2610
1
abr 24
9484
1
may 22
3764
2
jun 21
3023
1
sept 20
2825