This question has been flagged
1 Reply
4995 Views

Hy,

I would like to add a menu link in the right menu of the partner. More precisely, the link exist if you're in a specific group and I would like to add it for other groups. I didn't find where to manage this. Is there a specific kind of object? Is there a specific place to manage ACL on right sidebar links ?

Any help would be appreciated.

regards

Avatar
Discard
Best Answer

The following is an example for a link.

<act_window
        id="action_picking_out"
        name="Delivery Orders"
        res_model="stock.picking"
        src_model="sale.order"
        domain="[('sale_id', '=', active_id), ('type', '=', 'out')]"
        context="{
            'form_view_ref': 'stock.view_picking_out_form',
            'tree_view_ref': 'stock.view_picking_out_tree',
            'search_view_ref': 'stock.view_picking_out_search'
            }"
        />

The link is in Sale Order form view, it is specified in the src_model attribute. It is a link to the corresponding Delivery Order and is specified in res_model. You can add domain for the view which the link opens. Here clicking on the link will open only the delivery orders with sale_id equals to the active_id (id of the sale order from which you have clicked the link) and type equals to out . Also the corresponding form view, tree view and search view for the target form should be specified in the context. Here the code for the link is added in sale_view.xml file, similarly you can add the link in the xml file which defines partner views (inheriting the partner model and adding it in your custom module will be a good idea).

Avatar
Discard