Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3532 Weergaven

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

Avatar
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jun. 24
2654
1
apr. 24
9514
1
mei 22
3779
2
jun. 21
3043
1
sep. 20
2841