Přejít na obsah
Odoo Menu
  • Přihlásit se
  • Vyzkoušejte zdarma
  • Aplikace
    Finance
    • Účetnictví
    • Fakturace
    • Výdaje
    • Spreadsheet (BI)
    • Dokumenty
    • Podpisy
    Prodej
    • CRM
    • Prodej
    • POS Obchod
    • POS Restaurace
    • Předplatné
    • Pronájem
    Webové stránky
    • Webové stránky
    • E-shop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Dodavatelský řetězec
    • Sklad
    • Výroba
    • PLM
    • Nákup
    • Údržba
    • Kvalita
    Lidské zdroje
    • Zaměstnanci
    • Nábor
    • Volno
    • Hodnocení zaměstnanců
    • Doporučení
    • Vozový park
    Marketing
    • Marketing sociálních sítí
    • Emailový marketing
    • SMS Marketing
    • Události
    • Marketingová automatizace
    • Dotazníky
    Služby
    • Projekt
    • Časové výkazy
    • Práce v terénu
    • Helpdesk
    • Plánování
    • Schůzky
    Produktivita
    • Diskuze
    • Schvalování
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Aplikace třetích stran Odoo Studio Odoo cloudová platforma
  • Branže
    Maloobchod
    • Knihkupectví
    • Obchod s oblečením
    • Obchod s nábytkem
    • Potraviny
    • Obchod s hardwarem
    • Hračkářství
    Food & Hospitality
    • Bar a Pub
    • Restaurace
    • Fast Food
    • Guest House
    • Distributor nápojů
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architektonická firma
    • Stavba
    • Správa nemovitostí
    • Zahradnictví
    • Asociace vlastníků nemovitosti
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingová agentura
    • Právník
    • Akvizice talentů
    • Audit a certifikace
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Korporátní dárky
    Zdraví a fitness
    • Sportovní klub
    • Prodejna brýli
    • Fitness Centrum
    • Wellness praktikové
    • Lékárna
    • Kadeřnictví
    Trades
    • Údržbář
    • IT hardware a podpora
    • Solar Energy Systems
    • Výrobce obuvi
    • Úklidové služby
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agentura pro životní prostředí
    • Pronájem billboardů
    • Fotografování
    • Leasing jízdních kol
    • Prodejce softwaru
    Browse all Industries
  • Komunita
    Edukační program
    • Tutoriály
    • Dokumentace
    • Certifikace
    • Vzdělávání
    • Blog
    • Podcast
    Podpora vzdělávání
    • Vzdělávací program
    • Scale Up! Hra na firmu
    • Navštivte Odoo
    Získat software
    • Stáhnout
    • Porovnejte edice
    • Verze
    Spolupráce
    • Github
    • Fórum
    • Události
    • Překlady
    • Stát se partnerem
    • Services for Partners
    • Registrujte svou účetní firmu
    Získat služby
    • Najít partnera
    • Najít účetní
    • Setkejte se s poradcem
    • Implementační služby
    • Zákaznické reference
    • Podpora
    • Upgrady
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Dohodnout demo
  • Ceník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účetnictví
  • Sklad
  • PoS
  • Projekty
  • MRP
All apps
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
You need to be registered to interact with the community.
All Posts Lidé Odznaky
Štítky (View all)
odoo accounting v14 pos v15
O tomto fóru
Pomoc

Menu items disappear after opening client action via login wizard in Odoo 18

Odebírat

Get notified when there's activity on this post

This question has been flagged
menumenuitemclient-actionmenu items
255 Zobrazení
Avatar
Mirodil Ortikov

Hi everyone,

I'm developing a custom app in Odoo 18 that opens a client-side frontend (ir.actions.client) after user authentication. The app has its own menu root and submenus.

Here’s how it works:

  • If the user has a valid token → directly open the app
  • If not → open a login wizard
  • After successful login → call _action_open_documents_list() which returns an ir.actions.client

The issue:

When the user is already logged in, clicking the menu opens the app correctly, and all menu items remain visible.

But when opening via the login wizard (i.e., first-time login), the app opens successfully, but all Odoo menu items disappear from the top bar (only the app switcher and user menu remain).

This seems to be related to the `app...

Minimal reproducible code

XML – menus & server actions

<odoo>

    <menuitem id="didox_menu_root" name="Didox" sequence="10"

              web_icon="didox,static/description/didox-logo.png"/>

    <!-- server actions that call the backend method -->

    <record id="action_didox_incoming_server" model="ir.actions.server">

        <field name="name">Incoming</field>

        <field name="model_id" ref="base.model_res_users"/>

        <field name="state">code</field>

        <field name="code">

            action = env["didox.backend"].sudo().action_open_app(owner=0)

        </field>

    </record>

    <!-- … other server actions (Outgoing, Draft, …) … -->

    <menuitem id="didox_menu_documents" name="Documents"

              parent="didox_menu_root" sequence="1"/>

    <menuitem id="didox_menu_incoming" name="Incoming"

              parent="didox_menu_documents" action="action_didox_incoming_server" sequence="1"/>

    <!-- … other sub-menus … -->

</odoo>

Python – backend helper

from datetime import datetime, timedelta, timezone
from odoo import fields, models, _

class DidoxBackend(models.Model):
    _name = "didox.backend"
    _description = "Didox backend helpers"

    def action_open_app(self, owner: int = 0, status: int = None):
        user = self.env.user
        now = datetime.now(timezone.utc)

        if user.didox_user_token and user.didox_user_token_exp:
            exp = fields.Datetime.from_string(user.didox_user_token_exp).replace(tzinfo=timezone.utc)
            if exp > now:
                return self._action_open_documents_list(owner=owner, status=status)

        # no valid token → open login wizard
        return {
            "type": "ir.actions.act_window",
            "name": _("Login to Didox"),
            "res_model": "didox.login.wizard",
            "view_mode": "form",
            "target": "new",
        }

    def _action_open_documents_list(self, owner: int, status: int = None):
        return {
            "type": "ir.actions.client",
            "tag": "didox_client_page",
            "target": "current",
            "params": {"owner": owner, "status": status},
        }

Wizard – login action (called after successful login)


def action_login(self):
    self.ensure_one()
    # … login logic, token saved on res.users …
    self.env.user.write({
        "didox_user_token": token,
        "didox_user_token_exp": fields.Datetime.to_string(
            datetime.now(timezone.utc) + timedelta(minutes=360)
        ),
    })

    return {
        "type": "ir.actions.client",
        "tag": "didox_client_page",
        "target": "current",
        "params": {"owner": 0},
    }
0
Avatar
Zrušit
Christoph Farnleitner

Your example source is missing way to many details to have it run as an example. I.e. what's didox_client_page?

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

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

Přihlásit se
Related Posts Odpovědi Zobrazení Aktivita
Dropdown sub-menu offset away from position
menu menuitem
Avatar
0
pro 24
1755
How to create a new menu item and place it under other module's menu? Vyřešeno
menu menuitem
Avatar
Avatar
Avatar
Avatar
4
říj 19
35143
After finishing installation I do not get any menu items the page is blank
menu menuitem
Avatar
Avatar
1
dub 17
4481
No such external ID currently defined in the system error while adding a menu item.
menu menuitem
Avatar
Avatar
2
bře 15
8116
Hide Or Remove Messaging Menu From Top Menu Bar ? Vyřešeno
menu menuitem
Avatar
Avatar
Avatar
2
led 24
14620
Komunita
  • Tutoriály
  • Dokumentace
  • Fórum
Open Source
  • Stáhnout
  • Github
  • Runbot
  • Překlady
Služby
  • Odoo.sh hostování
  • Podpora
  • Upgrade
  • Nestandardní vývoj
  • Edukační program
  • Najít účetní
  • Najít partnera
  • Stát se partnerem
O nás
  • Naše společnost
  • Podklady značky
  • Kontakujte nás
  • Práce
  • Události
  • Podcast
  • Blog
  • Zákazníci
  • Právní dokumenty • Soukromí
  • Zabezpečení
الْعَرَبيّة 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 je balíček open-source aplikací, které pokrývají všechny potřeby vaší společnosti: CRM, e-shop, účetnictví, sklady, kasy, projektové řízení a další.

Unikátní nabídka od Odoo poskytuje velmi jednoduché uživatelské rozhraní a vše je integrované na jednom místě.

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