You can create a view for an
AbstractModel model that represents the common features of your models and inherit that view as a template for each model. You don't need to actually inherit the model itself.
View inheritance does not change the inherited view when the target model is different; it is applied on on the target model. You can have one view per model because all inherited views will be applied for each model regardless the
view_id defined in action.
A similar concept is used in
stock module in v7. The models
stock.picking.out are created as prototype inheritance of
stock.picking (but all models are sharing the same database table using
_table = "stock_picking"). New views are created by inheriting from
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
|Asked: 3/15/13, 10:33 AM|
|Seen: 1372 times|
|Last updated: 3/16/15, 8:10 AM|