← Back to team overview

openerp-community team mailing list archive

custom view in OpenERP

 

Dear all !

I think there's no real way to add a custom view type in OpenERP without using a dirty trick.

For my needs, i did something like this:

/register a js view:/

|instance.web.views.add('foobar_view',  'instance.foobar.FooBarView');
instance.foobar.FooBarView  =  instance.web.View.extend({...})
|

/add a act_window entry:/

|<record  id="action_view_foobar"  model="ir.actions.act_window">
    <field  name="name">FooBar</field>
    <field  name="view_mode">foobar_view</field>
    <field  name="res_model">foo.bar</field>
</record>
|

It works fine for a fully new view, but I have the feeling it's more a hack.

Also, my view can't be integrated with other views (in the top-right menu, where you can switch from form, tree, calendar, gantt views) and I can't use my|foobar_view|as a|view_type|and use some|archi|parameters to configure it...


Someone has a better solution ?
If not, is there any plane to fully support custom view type in the future ?

Regards,
Michel


Follow ups