Skip to Content
Menú
This question has been flagged
2 Respostes
6761 Vistes

Hello,


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

I need to redirect to home page .


Best regards

Avatar
Descartar
Best Answer

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!

Avatar
Descartar

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 :)

Best Answer

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de des. 18
6612
2
d’ag. 25
2357
1
de jul. 25
874
1
de juny 25
2028
2
de juny 25
654