Hello,

Inheritance is a concept on objects. In that way, on objects, Open ERP is doing 
a classic inheritance with the _inherits keyword. The _inherit (without 's') 
method is slightly different than a classic object inheritance. But _inherit 
has often been called inheritance too in most common ORMs. So, in that way, 
Open ERP does full inheritance.

I don't know any other software that has inheritance on data so I don't know if 
the therm inheritance can be use on views. But it is very useful so we used to 
use it when we want to extend existing views.

I think we developed hundreds of inherited views in Open ERP. When you do an 
_inherit, you always want to extend the original view (because the _inherit 
keyword extend the original object). This is the more used mode of inheritance 
and this is one of the feature that allowed to develop Open ERP in such a 
modular way. (I think we have maximum 3 examples of the _inherits). And you 
rarely want to create a new view that inherit from an original view.
I see 2 different cases:
* you _inherit an object, keeping the same name: in that case, you will want to 
extend the original view as you are extending the object
* you _inherit an object, with a new name (or do a _inherits): in that case, 
you will have to create a new view because it's a new object.

I don't understand why you want to do in another way. May be one could need an 
inverted inherit in views compared to the current behaviour but, as I still 
didn't see good advantages and needs of this behaviour, we keep the inherit of 
views like it is currently. I think that's the better way.

If we notice that we need a way to create a new view by inheriting from another 
existing one (instead of extending an existing one), we will have to create a 
new keyword for this features. But I saw and developed hundreds of modules and 
we never needed that.

Conclusion: Open ERP is doing a real inheritance. We can discuss of view 
inhetiance as I don't know if it exist an inheritance definition for data 
instead of object. (may be we invented this :) ) Open ERP implement the most 
useful method. But, if we notice there is a demand for another kind of 
inheritance, we will add a new keyword in the futur versions. (6.0?)




-------------------- m2f --------------------

--
http://www.openerp.com/forum/viewtopic.php?p=27008#27008

-------------------- m2f --------------------


_______________________________________________
Tinyerp-users mailing list
http://tiny.be/mailman/listinfo/tinyerp-users

Reply via email to