Skip to Content
Menu
This question has been flagged

```
(...)
        template : "home_action",
        events : {
            "click .estoque_icone" : "open_stock"
        },
        init : function () {
            this._super.apply(this, arguments);
        },
        open_stock : function () {
            // It turns out a permission error when entering the id "string"
            this.do_action(84);
        }
(...)
```
the template:

```
<div t-name="home_action">
    <div class="home_menu">
        <a href="#">
            <div class="estoque_icone thumbnail">
                <img src="/example/static/src/img/estoque.png" />
                <div class="estoque_descricao">
                    <h3>name</h3>
                    <p>Example</p>
                </div>
            </div>
        </a>
        <a href="#">
        <div class="configuracoes_icone thumbnail">
            <img src="/example/static/src/img/config.png" />
            <div class="configuracoes_descricao">
                <h3>name</h3>
                <p>Example.</p>
            </div>
        </div>
        </a>
    </div>
</div>
```

I need you to open the link to complete page of action (as if you had clicked on the menu item).

I'm from Brazil, do not speak English.

Avatar
Discard

Can't you use a button tag and then display it as a link?

Author

Yes, but the button will display the content of the action within the current page or in a modal window, I need the action appears like a click in the top menu, with the same sidebar, and the menu marked as clicked

On button, the page displayed will be dependent on the action's target. Usually you put 'new' as the target but you can also put 'current', which will display the page within the view manager. However I'm not sure how to achieve the "menu marked as clicked" part. Any reason why you don't just create a menu and call a specific action instead of creating a new widget?

Related Posts Replies Views Activity
2
Dec 24
1333
0
Nov 23
1349
0
May 23
3429
0
Jun 20
2645
0
Dec 24
1287