No one should be able to edit the form once the process is completed.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
3515
瀏覽次數
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
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
1
6月 24
|
2610 | ||
|
1
4月 24
|
9483 | ||
|
1
5月 22
|
3762 | ||
|
2
6月 21
|
3023 | ||
|
1
9月 20
|
2825 |