Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

Database List hiding issue in Login Page.

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
2 Réponses
12321 Vues
Avatar
Remya

I have a Linode Server. I installed openerp in the server. Next i hide the database list using the below code

/etc/openerp-server.conf file

code: list_db = False

Then save ans restart openerp-server service.

After i login from a external system, I cant login to that particular database.

So i removed the code from conf file and login, then there is no issue.

How can i hide the database list without any issue?

4
Avatar
Ignorer
Avatar
Gopakumar N G
Meilleure réponse

Hi, you can edit this in the base.xml of your web module (path: addons/web/static/src/xml/base.xml). The DB list is defined as

<t t-name="Login.dblist">
<select name="db">
    <t t-foreach="db_list" t-as="db">
        <t t-if="selected_db === db">
            <option t-att-value="db" selected="true">
                <t t-esc="db"/></option>
        </t>
        <t t-if="selected_db !== db">
            <option t-att-value="db"><t t-esc="db"/></option>
        </t>
    </t>
</select>
</t>

Now replace that selection "db" with a text box with the same name of the selection field as

 <t t-name="Login.dblist">
<input name="db" type="text" value="" autofocus="autofocus"/>
 </t>

EDIT :

Then in chrome.js (addons/web/static/src/js/chrome.js) comment the on_db_loaded method (line 676-690) , which is

on_db_loaded: function (result) {
    var self = this;
    this.db_list = result;
    if (!this.selected_db) {
        this.selected_db = result[0];
    }
    this.$("[name=db]").replaceWith(QWeb.render('Login.dblist', { db_list: this.db_list, selected_db: this.selected_db}));
    if(this.db_list.length === 0) {
        this.do_action("database_manager");
    } else if(this.db_list.length === 1) {
        this.$('div.oe_login_dbpane').hide();
    } else {
        this.$('div.oe_login_dbpane').show();
    }
},

comment the above full code.

Then save the files and reload your web page, you don't need to restart the server or upgrade the module as you are editing on files in static folder. Now the dropdown will be displayed as a text field as

DB LIST

EDIT 2

@Sureka

After you have changed the database text field to the center of the page comment the code in chrome.js (addons/web/static/src/js/chrome.js) as shown below:

database_selected: function(db) {
//        var params = $.deparam.querystring();
//        params.db = db;
//        this.remember_last_used_database(db);
//        this.$('.oe_login_dbpane').empty().text(_t('Loading...'));
//        this.$('[name=login], [name=password]').prop('readonly', true);
//        instance.web.redirect('/?' + $.param(params));
    },

which is just above the on_db_loaded method. Then refresh the login page and try to login.

6
Avatar
Ignorer
Remya
Auteur

Its not working. I give database name in text field. After that i click on the username text box, the page is refreshing. So i first entered username,password then database, but it also refreshing the page.

Gopakumar N G

Are working in v7? I have tested it in v6.1. Anyway let me check it.

Remya
Auteur

Working with openerp7.

Gopakumar N G

I have updated the answer. Now check.

Remya
Auteur

Thanks. Its working.

GG

@Gopakumar and Remya , I have a question about this. With addition to that I need to move the Database field to the center of the page above the Username field. I could achieve that but after entering the database name the page gets reloading. Even I tried with username and password first and then database , then also the page gets refreshing. I am using OpenERP v7

Gopakumar N G

@Sureka what are the changes you have added ?

GG

<t t-extend="Login"> <t t-jquery="div.oe_login_dbpane" t-operation="replace"> <form action="" method="post"> <ul> <li>Database</li> <li><input name="db" type="text" value="" autofocus="autofocus"/></li> </ul> </form> </t>

GG

@Gopakumar, In a separate custom module in static/src/xml/base.xml , I have included the above code mentioned in previous comment of mine to get the Database name as an text field and also the code to remove ''Manage Database' link. I also commented the lines 676-690 in chrome.js. Sorry I couldn't present my code clearly in above comment.

Gopakumar N G

@Sureka: I have updated the answer. Please check.

GG

@Gopakumar, Now after editing in chrome.js , I can't even log in. If I click login button nothing happens after that.

Gopakumar N G

@Sureka, But its working in my system. Did you just comment the code in the "database_selected: function(db)" or the method itself?

GG

@Gopakumar, Now its working.Sorry there was a mistake in my base xml. I should extend the class oe_login_pane.But initially i extended the oe_login_dbpane, so I can't login. Sorry once again. and thanks for your answer and reviews.

Avatar
Jasad Moozhiyan
Meilleure réponse

Hi Remya,

When you run the openerp server as service, you can make use of the --db-filter=db_name option.

ie, ./openerp-server --db-filter=test_7_db

3
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now