Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty

```
(...)
        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
Hylkää

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

Tekijä

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?

Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
jouluk. 24
1370
0
marrask. 23
1371
0
toukok. 23
3464
0
kesäk. 20
2678
0
jouluk. 24
1339