Skip to Content
Menu
This question has been flagged
1 Reply
6352 Views

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.

Avatar
Discard
Best Answer

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

Avatar
Discard
Author

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.

Author

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.

Related Posts Replies Views Activity
1
Nov 24
103
5
Jul 24
86821
1
Dec 23
1814
1
May 22
1821
0
Jan 20
2130