Skip to Content
Menu
This question has been flagged

Hello,


I was trying to hide breadcrumbs on my_model.

First one:


<template id="assets_backend" name="my_model assets" inherit_id="web.assets_backend" >
    <xpath expr="." position="inside">
        <link rel='stylesheet' href="/my_model/static/src/css/style.css"/>
    </xpath>
</template>

and css file:

.breadcrumb > li { display: none !important; } .breadcrumb > .active { display: none !important; }


I hided breadcrumbs but for all apps not only for mine.


Another way I tried was from python code:


   @api.v7
    def my_order(self, cr, uid, ids, context=None):
        if order.state == 'approved':
            self.create(cr, uid, data, context=context)
            return {
                'type': 'ir.actions.act_window',
                'name': _('My Order'),
                'res_model': 'purchase.request',
                'res_id': data.get('order_id'),
                'view_type': 'form',
                'view_mode': 'form',
                'target': 'current',
                'clear_breadcrumbs': true,
                'nodestroy': True, }


But in this way nothing happens. Does have the same problem? How do you solve it?

Avatar
Discard
Best Answer

            return {
                'type': 'ir.actions.act_window',
                'name': _('My Order'),
                'res_model': 'purchase.request',
                'res_id': data.get('order_id'),
                'view_type': 'form',
                'view_mode': 'form',
                'target': 'current',
                'context': {'no_breadcrumbs': True},
                'nodestroy': True, }

Hopes this helps..!!

Avatar
Discard
Related Posts Replies Views Activity
8
Sep 20
14447
1
Aug 17
5387
2
Feb 24
396
2
Apr 23
2137
1
May 19
3294