İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

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

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

Error in Messaging App: ValueError: Invalid field 'state' in leaf "<osv.ExtendedLeaf: ('state', 'in', ['draft', 'sent', 'cancel']) on mail_message (ctx: )>"

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
22 Cevaplar
23029 Görünümler
Avatar
Jörg Ricardo Schumacher

Hello, we played around a little bit on our Test Server and only one of our users has this error when trying to open up the messages application:

ValueError: Invalid field 'state' in leaf "<osv.ExtendedLeaf: ('state', 'in', ['draft', 'sent', 'cancel']) on mail_message (ctx: )>"

 

Below, you can find som more Infos on the Stack. Does anyone know what could be the reason for this?

 

File "/opt/odoo/odoo-server/openerp/models.py", line 4332, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/opt/odoo/odoo-server/openerp/osv/expression.py", line 646, in __init__ self.parse(cr, uid, context=context) File "/opt/odoo/odoo-server/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: )>"

2
Avatar
Vazgeç
Jörg Ricardo Schumacher
Üretici

Still nobody with a solution on this?

Avatar
Samir Hussein
En İyi Yanıt

Hello Jörg,

I had the same issue regarding only two users which had the error. I found a way to solve it, hopefuly it will work for you (if you still have it).

Here is what i did:

1. Go to the "Configuration" menu

2. Go to the "Security" in the menu on the left of the window

3. Select "Records rules"

4. Find the different records rules which use the field  'state', 'in', ['draft', 'sent', 'cancel'] (i had at least 5 of them)

5. Modify the rule by unchecking the "Activ" checkbox and save it

6. Do so for every rules that use the field 'state' (don't forget to check it before)


I hope this will help you, it worked for us



1
Avatar
Vazgeç
wizardz

It worked well, thanks

Samir Hussein

Hi Diezcode, sorry but what worked well?

Avatar
Piyush Suva
En İyi Yanıt

make sure you defined 'state' field in tree/form view of your object.

run the cmd through terminal

python openerp-server -u all -d <database_name>

hop it will solve your problem

2
Avatar
Vazgeç
Jörg Ricardo Schumacher
Üretici

Unfortunately, I do not understand what you are trying to tell me.

Piyush Suva

run the cmd through terminal python openerp-server -u all -d hop it will solve your problem

Jörg Ricardo Schumacher
Üretici

Hello Piush, thank you for your effort. Unfortunately, your command didn't execute: root@v22014102320741:~# python: can't open file 'openerp-server': [Errno 2] No such file or directory > ^C root@v220141023020741:~# root@v22014102323020741:~# python odoo-server -u all -d hop root@v220141023020741:~#: command not found

Piyush Suva

python odoo-server -u all -d YOUR DATABASE NAME

Jörg Ricardo Schumacher
Üretici

root@v220142323020741:~# python odoo-server -u all -d myTESTdb python: can't open file 'odoo-server': [Errno 2] No such file or directory

Piyush Suva

1) go to your odoo server directory though 'cd' command . where 'odoo-server' file will be there.. 2) then run the abov command: python odoo-server -u all -d myTESTdb

Jörg Ricardo Schumacher
Üretici

Hello Piyush, I managed to execute the command now by 1. switching to the user running odoo Server: su odoo 2. Navigating to the odoo installation folder 3. Issuing your command with the Database: python openerp-server -u all -d myTESTdb . In runs a lot of things. Besides the fact that I do not know what this command does, (is it starting a second server instance?) it did not solve the problem (at least not on the first server instance that was running all the time). As the error is user- AND document-based, I would think it is enough to delete the document causing the error... but how do I find it? Thank you and brgds...

Avatar
Nirav Jani
En İyi Yanıt

Hello,

State field is not in "mail.message" object so that give error.

1
Avatar
Vazgeç
Jörg Ricardo Schumacher
Üretici

It appears in the messaging menu and in the Sales Menu, when I open up the Sales Order S0002 . The Sales Order was created by another user and thereafter "shared" with the user that gets the error.

Nirav Jani

It is working...No Error..

Nirav Jani

Hello you customize module or used core addons ??

Jörg Ricardo Schumacher
Üretici

Hello Nirav, no I did not customize any of the modules. We are tlking about a really fresh odoo installation and just on single email was sent.

Jörg Ricardo Schumacher
Üretici

Here is the full stack trace: File "/opt/odoo/odoo-server/openerp/http.py", line 500, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/opt/odoo/odoo-server/openerp/http.py", line 517, in dispatch result = self._call_function(**self.params) File "/opt/odoo/odoo-server/openerp/http.py", line 283, in _call_function return checked_call(self.db, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/http.py", line 280, in checked_call return self.endpoint(*a, **kw) File "/opt/odoo/odoo-server/openerp/http.py", line 733, in __call__ return self.method(*args, **kw) File "/opt/odoo/odoo-server/openerp/http.py", line 376, in response_wrap response = f(*args, **kw) File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 944, in call_kw return self._call_kw(model, method, args, kwargs) File "/opt/odoo/odoo-server/addons/web/controllers/main.py", line 936, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_message.py", line 564, in message_read parent_tree[tree_parent_id].append(self._message_read_dict(cr, uid, message_tree[message_id], parent_id=tree_parent_id, context=context)) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_message.py", line 398, in _message_read_dict 'to_read': message.to_read, File "/opt/odoo/odoo-server/openerp/fields.py", line 754, in __get__ self.determine_value(record) File "/opt/odoo/odoo-server/openerp/fields.py", line 849, in determine_value record._prefetch_field(self) File "/opt/odoo/odoo-server/openerp/api.py", line 235, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 3154, in _prefetch_field result = records.read(list(fnames), load='_classic_write') File "/opt/odoo/odoo-server/openerp/api.py", line 235, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/api.py", line 552, in new_api result = method(self._model, cr, uid, self.ids, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_message.py", line 823, in read res = super(mail_message, self).read(cr, uid, ids, fields=fields, context=context, load=load) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 3069, in read result = BaseModel.read(records, fields, load=load) File "/opt/odoo/odoo-server/openerp/api.py", line 235, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 3101, in read self._read_from_database(stored) File "/opt/odoo/odoo-server/openerp/api.py", line 235, in wrapper return new_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 3263, in _read_from_database res2 = self._columns[f].get(cr, self._model, ids, f, user, context=context, values=result) File "/opt/odoo/odoo-server/openerp/osv/fields.py", line 1312, in get result = self._fnct(obj, cr, uid, ids, name, self._arg, context) File "/opt/odoo/odoo-server/addons/mail/mail_message.py", line 89, in _get_to_read ], context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 1673, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 4510, in _search self._apply_ir_rules(cr, user, query, 'read', context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 4387, 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/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/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/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 4332, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/opt/odoo/odoo-server/openerp/osv/expression.py", line 646, in __init__ self.parse(cr, uid, context=context) File "/opt/odoo/odoo-server/openerp/osv/expression.py", line 847, in parse right_ids = comodel.search(cr, uid, [(path[1], operator, right)], context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/calendar/calendar.py", line 1705, in search return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 1673, in search return self._search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/portal/mail_message.py", line 38, in _search context=context, count=count, access_rights_uid=access_rights_uid) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/addons/mail/mail_message.py", line 621, in _search context=context, count=count, access_rights_uid=access_rights_uid) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 4509, in _search query = self._where_calc(cr, user, args, context=context) File "/opt/odoo/odoo-server/openerp/api.py", line 237, in wrapper return old_api(self, *args, **kwargs) File "/opt/odoo/odoo-server/openerp/models.py", line 4332, in _where_calc e = expression.expression(cr, user, domain, self, context) File "/opt/odoo/odoo-server/openerp/osv/expression.py", line 646, in __init__ self.parse(cr, uid, context=context) File "/opt/odoo/odoo-server/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 ""

Avatar
Ankit H Gandhi(AHG)
En İyi Yanıt

Hello Jorg,

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 as empty list([])

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

Hope above solution will be help

Best Thanks,

Ankit H Gandhi.

0
Avatar
Vazgeç
Avatar
dharupriyanshi@gmail.com
En İyi Yanıt

i get similar problem when i click on any leads , my domain rule is 

['|',('user_id','=',user.id),('message_partner_ids','child_of',[user.commercial_partner_id.id])]

and i get error

aise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))ValueError: Invalid field 'user_id' in leaf "<osv.ExtendedLeaf: ('user_id', '=', 8) on mail_followers (ctx: )>"


i used this domain under "personal leads" record rule and model is crm.lead

0
Avatar
Vazgeç
Avatar
Jörg Ricardo Schumacher
Üretici En İyi Yanıt

Hello Nirav,

 

can you explain further, please, and how to resolve the problem?

0
Avatar
Vazgeç
Nirav Jani

Yes, tell me when error come means what to do on which module (sale or purchase) ??

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

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

Üye Ol
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة 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, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

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