【问题标题】:How to add odoo live chat javascripts in website theme layout?如何在网站主题布局中添加 odoo 实时聊天 javascripts?
【发布时间】:2017-06-19 00:52:23
【问题描述】:

如何在网站主题布局中添加odoo live chat javascripts?

我想在我的 odoo 网站页面的文档说明中添加以下内容:

将此代码复制并粘贴到您的网站的标签内: 但问题是当我将它粘贴到那里时它不起作用。我在想也许有一个合适的方法来做到这一点。

<link href="http://localhost:8069/web/css/im_livechat.external_lib" rel="stylesheet"/>
<script src="http://localhost:8069/web/js/im_livechat.external_lib" type="text/javascript"></script>
<script src="http://localhost:8069/im_livechat/loader/mydb/4" type="text/javascript"></script>

【问题讨论】:

    标签: javascript openerp odoo-8 openerp-8 livechat


    【解决方案1】:

    继承 website.layout 模板并将您的脚本代码粘贴到 head 标记中。希望这会起作用,并且在加载主页时您可以看到聊天向导。

    【讨论】:

      【解决方案2】:

      把你的*.js files under /your_module/static/src/js and *.css /static/src/css

      然后,将这些文件添加到您的模板中

      <template id="id">
         <link href="/you_module/static/src/css/your_css.css" rel="stylesheet"/>
         <link href="/web/static/src/css/your_css.css" rel="stylesheet"/>
      </template>
      

      希望对你有帮助。

      【讨论】:

        猜你喜欢
        • 2021-08-07
        • 1970-01-01
        • 2020-07-06
        • 2022-12-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多