Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Can I set the company with a URL?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
browsersessionmulticompanyAPI
2 Răspunsuri
1736 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
Imagine profil
Christoph Farnleitner
Cel mai bun răspuns

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
Imagine profil
Abandonează
mk
Autor

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!

Imagine profil
mk
Autor Cel mai bun răspuns

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
Imagine profil
Abandonează
mk
Autor

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.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to create invoices for all companies through External API
invoice multicompany API
Imagine profil
Imagine profil
1
apr. 21
5833
Automatically send a user to the login page when a session expires
browser session odooV12 odoov12
Imagine profil
0
apr. 25
1926
Odoo can only login with 1 user 1 browser
browser session login v15
Imagine profil
0
feb. 24
1996
Use the rest-API to import from an external application the data of the trading session
api session restfulapi API
Imagine profil
0
oct. 18
7883
Configuration for secure web client
browser session ssl encryption
Imagine profil
0
mar. 15
5234
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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