Skip to Content
मेन्यू
This question has been flagged
1 Reply
3512 Views

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

Avatar
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
1
जून 24
2609
1
अप्रैल 24
9482
1
मई 22
3760
2
जून 21
3021
1
सित॰ 20
2823