Oct 19, 2012

[SOLVED] openerp 6.1.1 cannot inherit view sale.view_order_form

few days ago, i work on inheritance some views, there are so many ways to do that, you can use inherit_id with ref="view_id_that_you_want_to_inherit", but there are some views must use different ways.

i need to show you basic concept of view management in openerp first,

1. every views has id, you can name it by yourself or just check on debug view mode, some test was use this XML ID



2. some views of your module will inherit view that has been changed by other module on that time, sometime you don't realize it.



from those pictures, you can see that so many module want to inherit view_order_form 

3.  every view has priority, you should add this property to make your view is still valid while it inherit by other module.

4. some view (parent view) are very complecated structures, even you use xpath or copy its structures, sometimes its not work.

 well, on my case, to inherit view_order_form with complicated structures, just add data tags ( <data> ) for your new fields. see this :





.
few days ago, i work on inheritance some views, there are so many ways to do that, you can use inherit_id with ref="view_id_that_you_want_to_inherit", but there are some views must use different ways.

i need to show you basic concept of view management in openerp first,

1. every views has id, you can name it by yourself or just check on debug view mode, some test was use this XML ID



2. some views of your module will inherit view that has been changed by other module on that time, sometime you don't realize it.



from those pictures, you can see that so many module want to inherit view_order_form 

3.  every view has priority, you should add this property to make your view is still valid while it inherit by other module.

4. some view (parent view) are very complecated structures, even you use xpath or copy its structures, sometimes its not work.

 well, on my case, to inherit view_order_form with complicated structures, just add data tags ( <data> ) for your new fields. see this :




No comments:

Post a Comment