No one should be able to edit the form once the process is completed.
Această întrebare a fost marcată
1
Răspunde
4966
Vizualizări
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
Îți place discuția? Nu doar citi, alătură-te!
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
|
1
iun. 24
|
4687 | ||
|
|
1
apr. 24
|
11338 | ||
|
|
1
mai 22
|
5991 | ||
|
|
2
iun. 21
|
5292 | ||
|
|
1
sept. 20
|
5298 |