No one should be able to edit the form once the process is completed.
Câu hỏi này đã bị gắn cờ
1
Trả lời
4935
Lượt xem
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
|
1
thg 6 24
|
4651 | ||
|
|
1
thg 4 24
|
11298 | ||
|
|
1
thg 5 22
|
5965 | ||
|
|
2
thg 6 21
|
5243 | ||
|
|
1
thg 9 20
|
5285 |