Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3516 Представления

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

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июн. 24
2610
1
апр. 24
9483
1
мая 22
3762
2
июн. 21
3023
1
сент. 20
2825