No one should be able to edit the form once the process is completed.
Se marcó esta pregunta
1
Responder
4959
Vistas
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
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
|
1
jun 24
|
4672 | ||
|
|
1
abr 24
|
11327 | ||
|
|
1
may 22
|
5986 | ||
|
|
2
jun 21
|
5287 | ||
|
|
1
sept 20
|
5287 |