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

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

Abonare

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

Această întrebare a fost marcată
syntaxhr_holidaysv14
3 Răspunsuri
4558 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
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 .

Imagine profil
Ibrahim Zool Odoo
Cel mai bun răspuns

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

correct syntax :

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

1
Imagine profil
Abandonează
Imagine profil
Jainesh Shah(Aktiv Software)
Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Kiran K
Cel mai bun răspuns

Hi,

The issue is with your syntax, 

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

Hope it helps,

Kiran 

1
Imagine profil
Abandonează
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
Record rule not working odoo 14
record_rules hr_holidays v14
Imagine profil
1
nov. 21
2455
Js Classes
js syntax v14
Imagine profil
0
mai 21
2795
How I can fix this error? File "<unknown>", line 1 {'invisible': '('holiday_type', '!=', 'employee')'}
hr_holidays unknown v14
Imagine profil
Imagine profil
1
mar. 21
4372
How to use invoice_terms from setting for an invoice in a new module
invoice account.move syntax v14
Imagine profil
Imagine profil
1
nov. 21
3819
Attached PDF file is not formatted properly
v14
Imagine profil
Imagine profil
1
dec. 25
389
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