No one should be able to edit the form once the process is completed.
To pytanie dostało ostrzeżenie
1
Odpowiedz
4877
Widoki
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
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
|
1
cze 24
|
4549 | ||
|
|
1
kwi 24
|
11228 | ||
|
|
1
maj 22
|
5871 | ||
|
|
2
cze 21
|
5207 | ||
|
|
1
wrz 20
|
5243 |