Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Is there a way to disable an inherited view of a base view from a second inherited view? i.e. without editing the first inherited view or the base view?

Subscribe

Get notified when there's activity on this post

This question has been flagged
viewsinheritancebaseinherited
1 Reply
8712 Views
Avatar
Ragav Y

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.

0
Avatar
Discard
Sehrish

Inheritance in Odoo: https://learnopenerp.blogspot.com/2018/01/inheritance-in-models-and-views.html

Avatar
Paresh Wagh
Best Answer

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

2
Avatar
Discard
Ragav Y
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.

Paresh Wagh

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.

Ragav Y
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.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
View inheritance hiding a field
views inheritance
Avatar
Avatar
1
Nov 24
2590
Change the Position of field in Xpath Solved
views inheritance
Avatar
Avatar
Avatar
Avatar
Avatar
5
Jul 24
95807
How to extend a base template for a specific page only, without affecting other pages that use the same base template?
views inheritance
Avatar
Avatar
1
Dec 23
3992
removing elements from an inherited view
views inheritance
Avatar
Avatar
1
May 22
5021
I am building a custom module that has a dependent module that has extended the base view of res_partner. In my custom module I also have an inherited view of the base res_partner view. In it how do I hide the inherited view of my dependent module?
views inheritance
Avatar
0
Jan 20
3495
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now