Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing-
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

how to fix this syntax error when I am running the hr_holidays module in odoo14

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
syntaxhr_holidaysv14
3 Antworten
4565 Ansichten
Avatar
Joy MA

I downloaded the odoo14 files from GitHub and successfully installed the hr_hodidays app, but when clicking on this app in the menu, the contents of the module cannot be displayed and an error is reported

File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_http.py", line 237, in _dispatch

    result = request.dispatch()

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/http.py", line 683, in dispatch

    result = self._call_function(**self.params)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/http.py", line 359, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/http.py", line 347, in checked_call

    result = self.endpoint(*a, **kw)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/http.py", line 912, in __call__

    return self.method(*args, **kw)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/http.py", line 531, in response_wrap

    response = f(*args, **kw)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/addons/web/controllers/main.py", line 1377, in call_kw

    return self._call_kw(model, method, args, kwargs)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/addons/web/controllers/main.py", line 1369, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/api.py", line 392, in call_kw

    result = _call_kw_model(method, model, args, kwargs)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/api.py", line 365, in _call_kw_model

    result = method(recs, *args, **kwargs)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/models.py", line 1526, in load_views

    for [v_id, v_type] in views

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/models.py", line 1526, in <dictcomp>

    for [v_id, v_type] in views

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/addons/web/models/models.py", line 220, in fields_view_get

    r = super().fields_view_get(view_id, view_type, toolbar, submenu)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/models.py", line 1614, in fields_view_get

    xarch, xfields = view.postprocess_and_fields(etree.fromstring(result['arch']), model=self._name)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_ui_view.py", line 851, in postprocess_and_fields

    arch, name_manager = self._postprocess_view(node, model, validate=validate)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_ui_view.py", line 863, in _postprocess_view

    self.postprocess(node, [], editable, name_manager)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_ui_view.py", line 963, in postprocess

    self.postprocess(child, current_node_path, node_info['editable'], name_manager)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_ui_view.py", line 963, in postprocess

    self.postprocess(child, current_node_path, node_info['editable'], name_manager)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_ui_view.py", line 963, in postprocess

    self.postprocess(child, current_node_path, node_info['editable'], name_manager)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_ui_view.py", line 958, in postprocess

    transfer_node_to_modifiers(node, node_info['modifiers'], self._context, current_node_path)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/addons/base/models/ir_ui_view.py", line 66, in transfer_node_to_modifiers

    modifiers.update(ast.literal_eval(attrs))

  File "/Users/joy/.pyenv/versions/3.7.3/lib/python3.7/ast.py", line 46, in literal_eval

    node_or_string = parse(node_or_string, mode='eval')

  File "/Users/joy/.pyenv/versions/3.7.3/lib/python3.7/ast.py", line 35, in parse

    return compile(source, filename, mode, PyCF_ONLY_AST)

Exception


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/http.py", line 639, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/Users/joy/Desktop/Internship_test/odoo-14.0/odoo/http.py", line 315, in _handle_exception

    raise exception.with_traceback(None) from new_cause

  File "<unknown>", line 1

    {'invisible': '('holiday_type', '!=', 'employee')'}

                                ^

SyntaxError: invalid syntax


Why does the official file also have errors, I don't know why there are syntax errors, and how do I solve this problem

0
Avatar
Verwerfen
Joy MA
Autor

Thanks for all the answers, now I know how to fix this error, but I thought this error occurs in the unknown file type, and I couldn't find this unknown type file, how can someone tell me how to trace this error? Thanks.

Ibrahim Zool Odoo

search in your all custom addons by this ({'invisible': '('holiday_type', '!=', 'employee')'})

and just modify it .

Avatar
Ibrahim Zool Odoo
Beste Antwort

you have custom xml code ({'invisible': '('holiday_type', '!=', 'employee')'}) modify it to following :

correct syntax :

'invisible': [('holiday_type', '!=', 'employee')]

1
Avatar
Verwerfen
Avatar
Jainesh Shah(Aktiv Software)
Beste Antwort

Hello @Joy

Hope you are doing well.

If the issue is related to the syntax of  {'invisible': '('holiday_type', '!=', 'employee')'}

then there are 2 problems :

1. The value tuple is in single quotes which makes it a string so remove it.

2. Normally we write domain inside a list format so you can enclose your domain tuple in the list.

Eg:

{'invisible': [ ('invoice_without_email', '=', False)]}

So your final code line should be {'invisible': [('holiday_type', '!=', 'employee')]}

Regards,

Thanks

Regards,


   

Email:      odoo@aktivsoftware.com  

Skype: kalpeshmaheshwari

3
Avatar
Verwerfen
Avatar
Kiran K
Beste Antwort

Hi,

The issue is with your syntax, 

attrs="{'invisible':[('holiday_type','!=','employee')]}"

Hope it helps,

Kiran 

1
Avatar
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Record rule not working odoo 14
record_rules hr_holidays v14
Avatar
1
Nov. 21
2455
Js Classes
js syntax v14
Avatar
0
Mai 21
2797
How I can fix this error? File "<unknown>", line 1 {'invisible': '('holiday_type', '!=', 'employee')'}
hr_holidays unknown v14
Avatar
Avatar
1
März 21
4373
How to use invoice_terms from setting for an invoice in a new module
invoice account.move syntax v14
Avatar
Avatar
1
Nov. 21
3819
Attached PDF file is not formatted properly
v14
Avatar
Avatar
1
Dez. 25
398
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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