Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Can I set the company with a URL?

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
browsersessionmulticompanyAPI
2 Risposte
1750 Visualizzazioni
Avatar
mk

Hello,

We have multiple companies, and we are trying to use private windows to keep sessions apart for these companies.

Is it possible to craft a URL somehow, or maybe issue an API command such that the browser loads a company directly? Right now, when I open a new, private window and log in, the company is always set to the primary/default company. Would it be possible to e.g. open https://odoo.example.org/login?company=7​ or similar, such that after login, the 7th company is already selected?

Thank you,

martin

0
Avatar
Abbandona
Avatar
Christoph Farnleitner
Risposta migliore

This should work:

http://odoo.example.org/web/login?redirect=/web#cids=7

In case you have multiple databases, you want to add a param for it as well:

http://odoo.example.org/web/login?db=db1&redirect=/web#cids=7

If you want multiple companies to be active, make cids comma-separated, i.e. cids=7,8,9


Note that, apparently, the redirect parameter must not be url encoded!

1
Avatar
Abbandona
mk
Autore

It must be Karma, for now I can comment. A bit silly, but okay.

Thanks for the link to the route. I verified that `redirect` in fact works using `/my` as you suggested. I've tried this on both, Odoo 17 and 18.

I also found that `cids` is just a cookie, and that if I change its value and reload, then a different company is selected. Sometimes the things are much easier than you think, and I didn't need to study all the VoodooScript, lol. Thank you for helping me on this!

Avatar
mk
Autore Risposta migliore

When I click the comment button under your post, nothing happens. Thus I am sending a top-level reply. I am sorry…

Hey Christoph, thank you so much for your quick response!

I could not get the suggested URL parameter to work, neither in the single, nor in the multiple version, neither URL-encoded nor verbatim.

Can you point me to where you got this information from, so I can research a bit more, and mess around a bit?

I also looked on the network console and I couldn't even find out what is happening when I use the company selector to change companies. There must be some sort of dark, obscure voodoo magic going on. I don't like it :(.

1
Avatar
Abbandona
mk
Autore

I can reply to my own comment, but the speech bubble below yours is greyed out and I cannot. What gives?

Christoph Farnleitner

Some call it Voodoo, others call it JavaScript, owl in this case to be more precise. None the less, I feel you on that one... Source is, well, source code; and verification in localhost as well as on odoo.sh. The /web/login route is defined here:
https://github.com/odoo/odoo/blob/18.0/addons/web/controllers/home.py#L97 and 'cids' is commonly used throughout those voodoo-files to refer to company_ids. Now, I should mention, that a test in demo.odoo.com did in fact not succeed - which can be due to 18.3 working just that bit differently, or, what I would assume more, the cookies stored on that session are messing with the known default company. In any case, you may actually want to try to clear your browser cookies unless you're operating incognito already. What version of Odoo are you running exactly?
Also, to verify your redirect aren't completely broken for what ever reason, you can try to test a redirect to a portal page, such as /my upon login as well.
And, about commenting: https://www.odoo.com/forum/1/faq/karma - I would assume 1k is the threshold but I have honestly no clue.

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
How to create invoices for all companies through External API
invoice multicompany API
Avatar
Avatar
1
apr 21
5853
Automatically send a user to the login page when a session expires
browser session odooV12 odoov12
Avatar
0
apr 25
1931
Odoo can only login with 1 user 1 browser
browser session login v15
Avatar
0
feb 24
2025
Use the rest-API to import from an external application the data of the trading session
api session restfulapi API
Avatar
0
ott 18
7904
Configuration for secure web client
browser session ssl encryption
Avatar
0
mar 15
5252
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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