0
votes

I have one html page (css,js) how add this html page in custom module and link to menu.

After click on menu (backend) link I need open html page in popup html.

Any example?

<?xml version="1.0" encoding="utf-8"?>
<openerp>
        <data>
            <record id="test_check" model="ir.actions.act_url">
                <field name="name">Test</field>
                <field name="type">ir.actions.act_url</field>
                <field name="target">new</field>
                <field name="url">test/static/src/index.html?</field>
        </record>



        <menuitem action="test_check" name="Test" id="menu_test_check" sequence="44"/>

    </data>
</openerp>

When use new html page is open in new tab, I want after open eg. Accounting after click in menu link in small window (200 x 200px) open html page. In my example in html page I have calculator. Example postimg.org/image/jzll39dp5

Is it possible implement this https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open2

2

2 Answers

1
votes

Create an action and add it in menu

eg:-

Create an action to open a html page.

<record id="google_check" model="ir.actions.act_url">
                <field name="name">Google</field>
                <field name="type">ir.actions.act_url</field>
                <field name="target">new</field>
                <field name="url">https://www.google.com.in/?</field>
        </record>



<menuitem action="google_check" name="Google" id="menu_google_check" parent="purchase.menu_procurement_management"/>
1
votes

If you need a "website menu" link then you have to do this

https://github.com/OCA/OCB/blob/10.0/addons/website/data/website_data.xml#L17

What you see there is the menu entry for the homepage. You can link whatever you want in the "url" field.