Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Do I need to inherit the entire object class of a module if I only need to modify/add another view of its xml?

By
Aldennis
on 2/22/13, 3:29 AM 876 views

Hi,

I would like to ask if I need to inherit the entire object class if I only need to modify/add views to it? For example, I need to modify the Stock Move tree view to hide some columns. I can do this via the web client but if there are too many modifications I would like to create a module for it then inherit the view instead.

However, the module comes with the .py file and it should contain the object class of the view I am inheriting, so in return I would inherit the entire object class of stock.move even though I am not adding fields or modifying functions.

Its possible for a module to only have .py file but is it possible also to only have the .xml file?

2

Guewen Baconnier - Software Developer, Camptocamp

--Guewen Baconnier - Software Developer, Camptocamp--
2658
| 6 7 8
Lausanne, Switzerland
--Guewen Baconnier - Software Developer, Camptocamp--

Guewen works at Camptocamp as an Odoo developer since 2010. He is the lead developer of the Odoo Connector framework and the Magento Connector. He is a delegate member of the OCA, a committer and an active contributor to the OCA projects.

 

Guewen Baconnier - Software Developer, Camptocamp
On 2/22/13, 3:56 AM

You just need a .xml file with your new views or the inherited views. You need to create a .py file only if you want to add / change fields or methods of your model.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 2/22/13, 3:29 AM
Seen: 876 times
Last updated: 3/16/15, 8:10 AM