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

I am building a custom module that has a dependent module that is inheriting the base res_partner view and adding some customisations needed for that module. But in the current module that I'm building, I don't need to see those changes created by my dependent module. Is there a way to disable those inherited changes without altering the code in the dependent module? Can I write another inherited view in my current custom module where I can reset the changes done in the dependent module?

Hope my question is clear.

아바타
취소
베스트 답변

Just disable the inherited view by setting its active field to False. 

아바타
취소
작성자

I don't think you've read the question details fully. We want to be able to disable the inherited view without modifying the code on the inherited view. If it was about doing it by editing the inherited view, I might as well simply comment it out.

The solution I have suggested does not involve editing the view or any form of code modification. If you disable the inherited view, its contents will not be applied when the main view is rendered.

작성자

Yes, just so we're all on the same page, the situation is such that there is a main form, then there is an inherited form, which belongs to a dependent module. Now in the custom module I am creating now, I have to add some additional fields here, so I have a third inherited form. The problem is that because I have a dependent module that is inheriting a view from the base module, its changes are appearing in my current custom module as well. So I want to remove that inherited view that is part of my dependent module. But this dependent module is also a dependency on other modules in this setup. So if I go ahead and set the inherited view of my dependent module as inactive, it would disappear from all the modules that have it as a depednency.

I hope this makes it clear. Please visualize it if you're having trouble.

Base View => dependent module has inherited view => current custom module, which adds another layer of inheritence to the base view. We cannot modify the inherited view in the dependent module. Hence the question of how to disable an inherited view without setting it as inactive.

When you say set the active field to false, I'm assuming we either do it in the xml or via the UI, but this will reflect across all other modules that have the inherited view as dependence. We don't want that.

관련 게시물 답글 화면 활동
1
11월 24
1605
5
7월 24
92859
1
12월 23
3030
1
5월 22
3612
0
1월 20
2859