Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

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

Odoberať

Get notified when there's activity on this post

This question has been flagged
menumenuitemclient-actionmenu items
257 Zobrazenia
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šiť
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!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Dropdown sub-menu offset away from position
menu menuitem
Avatar
0
dec 24
1755
How to create a new menu item and place it under other module's menu? Solved
menu menuitem
Avatar
Avatar
Avatar
Avatar
4
okt 19
35143
After finishing installation I do not get any menu items the page is blank
menu menuitem
Avatar
Avatar
1
apr 17
4483
No such external ID currently defined in the system error while adding a menu item.
menu menuitem
Avatar
Avatar
2
mar 15
8116
Hide Or Remove Messaging Menu From Top Menu Bar ? Solved
menu menuitem
Avatar
Avatar
Avatar
2
jan 24
14620
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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