javascript 如何从 Odoo 8 的前端删除 Powered by Odoo #1 Open Source eCommerce 页脚?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27372526/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-28 07:24:31  来源:igfitidea点击:

How to remove the Powered by Odoo #1 Open Source eCommerce footer from front end of Odoo 8?

javascriptpythonodooopenerp-8qweb

提问by Chris Coleman

How do you remove the backlinks from the public front end of Odoo 8?

如何从 Odoo 8 的公共前端删除反向链接?

Location: lower right corner of the page, in the footer.

位置:页面右下角,在页脚中。

HTML Code:

HTML代码:

<div class="pull-right">
     Powered by <a class="label label-danger" href="http://www.odoo.com/page/website-builder">Odoo</a>,
     the #1 
     <a href="http://www.odoo.com/page/e-commerce">Open Source eCommerce</a>.
</div>

These backlinks are shown to all search engines, and to anybody visiting the site, who is not logged in to the site!!

这些反向链接会显示给所有搜索引擎,以及访问该网站的任何未登录该网站的人!!

And when you log in, Odoo dynamically removes the links from the generated HTML page.

当您登录时,Odoo 会从生成的 HTML 页面中动态删除链接。

Odoo is very nice, but...

Odoo 非常好,但是...

We cannot be displaying its back links on all public website page footers!

我们不能在所有公共网站页脚上显示其反向链接!

How do you remove them??

你如何删除它们?

采纳答案by Chris Coleman

I've determined how to solve this issue.

我已经决定了如何解决这个问题。

  1. First, log in to back end as administrator. Activate Technical Features, if not already activated, by going to Settings > Users > Users > (your Administrator user name, default is Administrator) > Edit > Usability > Technical Features > check the box (active), click Save.
  2. Go to Settings > Technical > User Interface > Views.
  3. In the search box, next to "(filter icon) Active", type "Footer Copyright", and hit enter to search.
  4. There will be one search result. (View name: Footer Copyright. View type: QWeb view.) Click to open it.
  5. Click Edit.
  6. Comment out lines 6-7 of the code as follows: <!-- Powered by <a class="label label-danger" href="http://www.odoo.com/page/website-builder">Odoo</a>, the #1 <a href="http://www.odoo.com/page/e-commerce">Open Source eCommerce</a>. -->
  7. Click Save.
  8. Refresh the browser view of your Odoo front end website. Log out of the front end of your Odoo website. You'll see the previously visible "Powered by" backlinks and text, is now removed! For more info or help, see the following blog entry: http://www.espacenetworks.com/blog/entry/how-to-remove-the-powered-by-odoo-1-open-source-ecommerce-footer-from-front-end-of-odoo-8.html
  1. 首先,以管理员身份登录后端。激活技术功能,如果尚未激活,请转至设置 > 用户 > 用户 >(您的管理员用户名,默认为管理员)> 编辑 > 可用性 > 技术功能 > 选中该框(活动),单击保存。
  2. 转至设置 > 技术 > 用户界面 > 视图。
  3. 在搜索框中,在“(过滤器图标)活动”旁边,键入“页脚版权”,然后按 Enter 键进行搜索。
  4. 将有一个搜索结果。(视图名称:页脚版权。视图类型:QWeb 视图。)单击打开它。
  5. 单击编辑。
  6. 将代码的第 6-7 行注释如下: <!-- Powered by <a class="label label-danger" href="http://www.odoo.com/page/website-builder">Odoo</a>, the #1 <a href="http://www.odoo.com/page/e-commerce">Open Source eCommerce</a>. -->
  7. 单击保存。
  8. 刷新您的 Odoo 前端网站的浏览器视图。从您的 Odoo 网站的前端注销。您将看到以前可见的“Powered by”反向链接和文本,现在已删除!如需更多信息或帮助,请参阅以下博客条目:http: //www.espacenetworks.com/blog/entry/how-to-remove-the-powered-by-odoo-1-open-source-ecommerce-footer- from-front-end-of-odoo-8.html

回答by yelizariev

It's recommended to use modules to make updates in odoo.

建议使用模块在 odoo 中进行更新。

You can create new module or try existed modules, e.g. website_debranding:

您可以创建新模块或尝试现有模块,例如website_debranding

<template id="layout_footer_copyright" inherit_id="website.layout_footer_copyright">
    <xpath expr="//div[@t-ignore='true']" position="replace">
    </xpath>
</template>

回答by ahmed sharief

  1. Active developer mode.
  2. Enable technical features.
  3. Go to Settings > Technical > User Interface > Views.
  4. In the search box, next to (filter icon) Active, type secondary, and hit enter to search.
  5. Choose web.menu_secondary. Click to open it.
  6. Now find this tag and comment it like.

    <!--div class="oe_footer">
      Powered by <a href="http://www.openerp.com" target="_blank"><span>Odoo</span></a>
    </div-->
    
  1. 活跃的开发者模式。
  2. 启用技术功能。
  3. Settings > Technical > User Interface > Views
  4. 在搜索框中的 旁边(filter icon) Active,键入secondary,然后按 Enter 进行搜索。
  5. 选择web.menu_secondary。单击以打开它。
  6. 现在找到这个标签并评论它。

    <!--div class="oe_footer">
      Powered by <a href="http://www.openerp.com" target="_blank"><span>Odoo</span></a>
    </div-->
    

Hope this will solve your problem.

希望这能解决您的问题。

回答by unom

See this guide: http://odoo.guide/debranding-odoo-backend/

请参阅本指南:http: //odoo.guide/debranding-odoo-backend/

There is a module to override all of that, which is the preferred way.

有一个模块可以覆盖所有这些,这是首选方式。

Check the master branch here https://superuser.com/a/808851/71031

在此处检查主分支https://superuser.com/a/808851/71031

回答by Phuc Tran

You can remove it directly from the source code (or modify to anything you want. Take a look at the file openerp/addons/website/views/website_templates.xml

您可以直接从源代码中删除它(或修改为您想要的任何内容。查看文件 openerp/addons/website/views/website_templates.xml

P/s: Sorry for not posting this as a comment as it requires me 50 reputations :(

P/s:很抱歉没有将此作为评论发布,因为它需要我 50 个声望 :(