跳至內容
選單
此問題已被標幟
2 回覆
6749 瀏覽次數

Hello,


How i can  prevent odoo default redirection to login page after choosing a database.

I need to redirect to home page .


Best regards

頭像
捨棄
最佳答案

Hi Marwa,

May this blog can help you out: https://www.targetintegration.com/technical/change-users-first-page-login-odoo-community

You can change the sequence no. of the menu item to and bring it to the very first page.

Thanks!

頭像
捨棄

This is about the page after login right .... i think the question is not about this, if th question is this means , we can use home action in users page right :)

最佳答案

Hi,

What you can do for this that, navigate  to this path :- odoo-11.0/addons/web/views/database_manager.html

Then,

<div class="list-group">
{% for db in databases %}
<a href="/web?db={{ db }}" class="list-group-item" >
{% if db in incompatible_databases %}
<i class="icon fa fa-warning pull-right text-warning" title="This database may not be compatible"></i>
{% endif %}
{{ db }}
{% if manage %}
<div class="text-right pull-right">
<span data-db="{{ db }}" data-target=".o_database_backup" class="o_database_action btn-link"><i class="fa fa-floppy-o fa-fw"></i> Backup</span>
<span data-db="{{ db }}" data-target=".o_database_duplicate" class="o_database_action btn-link"><i class="fa fa-files-o fa-fw"></i> Duplicate</span>
<span data-db="{{ db }}" data-target=".o_database_delete" class="o_database_action btn-link"><i class="fa fa-trash-o fa-fw"></i> Delete</span>
</div>
{% endif %}
</a>
{% endfor %}
</div>

You will find a div like the above.

Then for redirecting to the home page rather than login page , change one of the above line like this,

<div class="list-group">
{% for db in databases %}
<a href="/?db={{ db }}" class="list-group-item" >
{% if db in incompatible_databases %}
<i class="icon fa fa-warning pull-right text-warning" title="This database may not be compatible"></i>
{% endif %}
{{ db }}
{% if manage %}
<div class="text-right pull-right">
<span data-db="{{ db }}" data-target=".o_database_backup" class="o_database_action btn-link"><i class="fa fa-floppy-o fa-fw"></i> Backup</span>
<span data-db="{{ db }}" data-target=".o_database_duplicate" class="o_database_action btn-link"><i class="fa fa-files-o fa-fw"></i> Duplicate</span>
<span data-db="{{ db }}" data-target=".o_database_delete" class="o_database_action btn-link"><i class="fa fa-trash-o fa-fw"></i> Delete</span>
</div>
{% endif %}
</a>
{% endfor %}
</div>

In the <a href="/web?db={{ db }}" , remove web?db={{ db }} and give  like this <a href="/?db={{ db }}" class="list-group-item" >.

If you have more than one db, there will be some issues

Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
12月 18
6601
2
8月 25
2325
1
7月 25
844
1
6月 25
2023
2
6月 25
646