콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
5363 화면

How to hide "Remove" button in view dialogs when we open one2many record in form view.

***Many times users deleted the record by mistake

Reference:

https://github.com/odoo/odoo/blob/1ca707ef6e83dd9a1708534f3732cefbaefac6fd/addons/web/static/src/js/views/view_dialogs.js#L155

Note: I tried delete="false" in one2many form tag


아바타
취소

Hi,

What about setting an exception(User Error) while deleting the record

You can add that exception by super the function def unlink(self)

Regards

작성자

def unlink(self) will be called once the record is saved but it will not work if the line is not saved.

Ex:

Vendor invoice line which is filled by onchange of PO.

If I open a vendor invoice line before saving the invoice form and it wont call a unlink function if I click remove button.

Is there any feature available like delete="false"

I tried but I don't see Remove in the popup of o2m field.

작성자

Hi Sudhir Note Version: 12.0.post20190904

관련 게시물 답글 화면 활동
0
6월 22
2264
1
3월 15
3830
2
7월 25
6758
2
1월 24
1521
0
11월 23
1369