Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3510 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvn 24
2609
1
dub 24
9481
1
kvě 22
3760
2
čvn 21
3021
1
zář 20
2822