This question has been flagged

I want to get tracking information by using google analytic tracking code in OpenERP. I know the easiest way is just copy the tracking code into web module base.xml file (under class oe_view_manager_body). When I did that, the tracking function works well.

But I need to upgrade the source code timely, so I need to create a new module inherited web module and add that tracking code in to that new created module. So I would update web module a lot.

The problem is I can't get any signal if I put the tracking code into the new module. Could anyone help?

In my web_new, I have static/src/xml/custom.xml

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="ViewManager">
    <t t-jquery="div.oe_view_manager_body" t-operation="replace">
        <div class="oe_view_manager_body">
        <script>
            Tracking_Code
        </script>
            <t t-foreach="widget.views_src" t-as="view">
                <div t-attf-class="oe_view_manager_view_#{view.view_type}"/>
            </t>
        </div>
    </t>
</t>
</templates>
Avatar
Discard