Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
17731 Vistas

Hi folks,

So, I have installed the dashboard module, board. This allows me to use/create dashboards in my system. As an experiement, I created a new dashboard through the user interface called "Alex's Board" and placed it in the default place (Reporting/Dashboards).

The problem is, I can't figure out how to delete it! I reckon it is going to be something super easy and obvious but I'm having a blond moment and can't figure it out.

As an additional question, I notice that all dashboards don't have anything in the header section. Most models / forms you get the name and breadcrumbs along with the edit/save/discard/more buttons in the header area, but dashboards don't have any of this. Do any developers know how this is achieved as it is something I would like to implement elsewhere in my system?

Many thanks for your time

-Alex

http://i186.photobucket.com/albums/x64/cameltosis_rocksoc/OpenERP/version_7_dashboard_issue_zps9637cfb3.png (image description)

Avatar
Descartar
Mejor respuesta

Use Settings/User Interface/Menu Items to reach menu definitions.

Delete as needed.

Best regards.

Avatar
Descartar
Autor Mejor respuesta

Hi folks,

I still dont have a proper answer to deleting custom dashboards beyond deleting them in the database directly (bad) but I have figured out the header bit. It is done by javascript and, in standard OpenERP, is hard coded to the board.board model.

So, here is some JS I wrote for my own dashboard module, hopefully it is useful for you all:

openerp.jcrm_dashboard = function(instance) {

instance.web.ViewManagerAction.include({

    init: function(parent, action) {      
        var flags = action.flags || {};
        if (action.res_model == 'jcrm.dashboard' && action.view_mode === 'form') {
            _.extend(flags, {
                views_switcher : false,
                display_title : false,
                search_view : false,
                pager : false,
                sidebar : false,
                action_buttons : false
            });
        }
        action.flags = flags
        this._super(parent, action);
    },
});

};

What this code basically does is monitor the action calls for when my model (jcrm.dashboard) is called and when the type of view is form. Then, it turns off some flags related to the header area, then calls the super function to continue with normal functionality. As you can see, the flags are sensibly named and this code is easy to implement.

My module is called jcrm_dashboard and this bit of javascript sits within /jcrm_dashboard/static/src/js/. I hope this is useful for other developers, it certainly unlocked some interesting features for us!

Would still love to be able to delete custom dashboards through the UI without needing admin privaledges or database access but at least I got something solved!

Regards,

-Alex

Avatar
Descartar
Mejor respuesta

For delete dashboard just click on close sign x in right top corner.

image description

If you need custom header, just write it when create it in bottom field (before Add button).

image description

Avatar
Descartar
Autor

There is no "x" in the top right corner of the dashboard itself. I understand that you can delete items off a dashboard that way, but I want to delete the entire dashboard including the menu item that also gets created with the dashboard. Also, could you expand on the second bit about the custom header? Any code examples you could post? Many thanks

Autor

Updated my original question with a link to an image that describes my problem better.

You create new menu for dashboard not dashboard. Then goto "Settings/Technical/User Interface/Menu Items" and delete this menu items. For quick search you can type "Alex's Board".

Publicaciones relacionadas Respuestas Vistas Actividad
2
dic 15
7787
0
jun 24
764
0
ago 23
935
2
jun 17
12290
2
mar 24
2281