Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6740 Widoki

Hello,


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

I need to redirect to home page .


Best regards

Awatar
Odrzuć
Najlepsza odpowiedź

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!

Awatar
Odrzuć

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

Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
gru 18
6581
2
sie 25
2299
1
lip 25
826
1
cze 25
2019
2
cze 25
629