Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3511 Widoki

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
cze 24
2609
1
kwi 24
9482
1
maj 22
3760
2
cze 21
3021
1
wrz 20
2823