跳至內容
選單
此問題已被標幟
4903 瀏覽次數

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>
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 22
6198
0
4月 19
2500
2
3月 15
9796
1
12月 23
18189
1
3月 15
4177