Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Invalid field %r in leaf %r" % (left, str(leaf))

Subscriure's

Get notified when there's activity on this post

This question has been flagged
fieldstateinvalid
3 Respostes
14185 Vistes
Avatar
Aitor Bouzas

Can someone help me with this error?

It happens when, with a portal user, Odoo tries to load something related to mail_message... So it happens whenever I try to list almost any view...

Here's the complete error: 

Traceback (most recent call last):
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 517, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 538, in dispatch
    result = self._call_function(**self.params)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 294, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 291, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 754, in __call__
    return self.method(*args, **kw)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/http.py", line 387, in response_wrap
    response = f(*args, **kw)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/web/controllers/main.py", line 949, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/web/controllers/main.py", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/mail/mail_message.py", line 244, in set_message_read
    notif_ids = notification_obj.search(cr, uid, domain, context=context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 1647, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 4562, in _search
    self._apply_ir_rules(cr, user, query, 'read', context=context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 4439, in _apply_ir_rules
    rule_where_clause, rule_where_clause_params, rule_tables = rule_obj.domain_get(cr, uid, self._name, mode, context=context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/base/ir/ir_rule.py", line 156, in domain_get
    query = self.pool[model_name]._where_calc(cr, SUPERUSER_ID, dom, active_test=False)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 4384, in _where_calc
    e = expression.expression(cr, user, domain, self, context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/osv/expression.py", line 646, in __init__
    self.parse(cr, uid, context=context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/osv/expression.py", line 847, in parse
    right_ids = comodel.search(cr, uid, [(path[1], operator, right)], context=context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/calendar/calendar.py", line 1716, in search
    return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 1647, in search
    return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/website_mail/models/mail_message.py", line 73, in _search
    context=context, count=count, access_rights_uid=access_rights_uid)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/portal/mail_message.py", line 38, in _search
    context=context, count=count, access_rights_uid=access_rights_uid)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/addons/mail/mail_message.py", line 621, in _search
    context=context, count=count, access_rights_uid=access_rights_uid)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 4561, in _search
    query = self._where_calc(cr, user, args, context=context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/models.py", line 4384, in _where_calc
    e = expression.expression(cr, user, domain, self, context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/osv/expression.py", line 646, in __init__
    self.parse(cr, uid, context=context)
  File "/opt/bitnami/apps/odoo/lib/odoo-8.0_a2115ef-py2.7.egg/openerp/osv/expression.py", line 812, in parse
    raise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'state' in leaf "<osv.ExtendedLeaf: ('state', 'in', ['draft', 'sent', 'cancel']) on mail_message (ctx: )>"

Thanks in advice

0
Avatar
Descartar
Aitor Bouzas
Autor

I just found out that this happens after embedding a quotation with an user! That user won't see the messages again because of that...

Aitor Bouzas
Autor

And, as you try to embed something with an user, it tries to generate a new mail_group, (function go_step_2 from addons/share/wizard/share_wizard.py), but this group is not reflected in the database...

Avatar
Aitor Bouzas
Autor Best Answer

Just found a workaround that works for me! As I said in commentaries, this happened to me after creating a new embed to share a quotation with a portal user. The problem comes when the action of embedding the quotation tries to create a new group, it doesn't assign well the user that should be assigned. This is the workaround:

1. Go to Settings -> Users -> Groups

2. Delete any filter show in the top right of the search bar

3. Search for "Shared: xxxxxxxxxx" groups

4. Check that the shared groups contains the users that should contain, add the user that has the problem

Hope this helps!

EDIT:

If you delete the "Shared: xxxxxxxxx" groups it works too.

0
Avatar
Descartar
Avatar
Ander
Best Answer

Hello Aitor,

Thank you for trying to help me but when I write "Shared: xxxxxxxxx" in the filter box, it doesn't appear any group. 

0
Avatar
Descartar
Avatar
Ankit H Gandhi(AHG)
Best Answer

Hello

I have face same issue and I solved out that.

Solutions:

You need check action of that model using below query.

select name,domain,id from ir_act_window where res_model='your.modelname';

Now update domain field value with remove unnecessary domain condition 

update ir_act_window set domain='[new condition]' where id=Give id;

Hope above solution will be help

Best Thanks,

Ankit H Gandhi.

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
Error i recieve, need emplaination please
field invalid openerp7.0
Avatar
0
de març 15
3910
ValueError: Invalid field res.company.employee_id in leaf ('employee_id.parent_id.user_id', '=', 2) Solved
field invalid res.company leaf
Avatar
Avatar
1
d’abr. 24
6029
How to change custom field content when the state is changed ?
project field custom state
Avatar
Avatar
1
de març 15
5410
add an existing field to a model
field custom state model
Avatar
Avatar
1
de març 15
7909
Project module or fields
field
Avatar
0
de febr. 25
2142
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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