コンテンツへスキップ
Odoo メニュー
  • サインイン
  • 無料で15日試す
  • アプリ
    財務
    • 会計
    • 請求
    • 経費
    • スプレッドシート(BI)
    • ドキュメント管理
    • 署名
    販売
    • CRM
    • 販売
    • POS店舗
    • POSレストラン
    • サブスクリプション
    • レンタル
    ウェブサイト
    • ウェブサイトビルダー
    • eコマース
    • ブログ
    • フォーラム
    • ライブチャット
    • eラーニング
    サプライチェーン
    • 在庫
    • 製造
    • 製品ライフサイクル管理 (PLM)
    • 購買
    • 整備
    • 品質
    人事業務
    • 従業員管理
    • 採用
    • 休暇管理
    • 人事評価
    • リファラル
    • フリート
    マーケティング
    • ソーシャルマーケティング
    • メールマーケティング
    • SMSマーケティング
    • イベント
    • マーケティングオートメーション
    • アンケート調査
    サービス
    • プロジェクト管理
    • タイムシート
    • フィールドサービス
    • ヘルプデスク
    • 計画
    • アポイントメント
    生産性向上ツール
    • ディスカッション
    • 承認
    • IoT
    • VoIP
    • ナレッジ
    • WhatsApp
    サードパーティアプリ Odooスタジオ Odooクラウドプラットホーム
  • インダストリー(業種別ソリューション)
    小売
    • 書店
    • アパレルショップ
    • 家具専門店
    • 食料品店
    • 金物店
    • 玩具店
    飲食・ホスピタリティ業界
    • バー・パブ
    • レストラン
    • ファストフード
    • ゲストハウス
    • 飲料販売代理店
    • ホテル
    不動産
    • 不動産会社
    • 建築事務所
    • 建設
    • 不動産管理
    • 造園
    • 住宅所有者組合
    コンサルティング
    • 会計事務所
    • Odooパートナー
    • マーケティングエージェンシー
    • 法律事務所
    • 人材派遣
    • 監査・認証
    製造
    • テキスタイル
    • 金属
    • 家具
    • 飲食
    • 醸造所
    • コーポレートギフト
    ヘルス & フィットネス
    • スポーツクラブ
    • 眼鏡店
    • フィットネスセンター
    • ウェルネス専門家
    • 薬局
    • ヘアサロン
    業種
    • 便利屋
    • IT ハードウェア・サポート
    • 太陽エネルギーシステム
    • 靴メーカー
    • クリーニングサービス
    • 空調設備サービス
    その他
    • 非営利団体
    • 環境機関
    • ビルボードレンタル
    • 写真
    • 自転車リース
    • ソフトウェアリセラー
    すべての業種を見る
  • コミュニティ
    学ぶ
    • チュートリアル
    • ドキュメンテーション
    • 認定
    • トレーニング
    • ブログ
    • ポッドキャスト
    教育サポート
    • 教育プログラム
    • Scale Up! ビジネスゲーム
    • Odooオフィス訪問
    ソフトを入手
    • ダウンロード
    • エディションを比較
    • リリース
    コラボレーション
    • Github
    • フォーラム
    • イベント
    • 翻訳
    • パートナーになる
    • パートナー様向けサービス
    • 会計事務所を登録
    サービス利用
    • パートナー一覧
    • 会計事務所一覧
    • 今すぐ相談する
    • 導入支援サービス
    • お客様一覧
    • サポート
    • アップグレード
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    製品デモを利用する
  • 料金
  • ヘルプ

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

  • CRM
  • e-Commerce
  • 会計
  • 在庫
  • PoS
  • プロジェクト
  • MRP
All apps
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
コミュニティで交流するには登録する必要があります。
全てのポスト 人々 バッジ
タグ (全て表示)
odoo accounting v14 pos v15
このフォーラムについて
ヘルプ

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

購読

この投稿に活動があった際に通知を受け取ります

この質問にフラグが付けられました
22 返信
23035 ビュー
アバター
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
アバター
破棄
Jörg Ricardo Schumacher
著作者

Still nobody with a solution on this?

アバター
Samir Hussein
最善の回答

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
アバター
破棄
wizardz

It worked well, thanks

Samir Hussein

Hi Diezcode, sorry but what worked well?

アバター
Piyush Suva
最善の回答

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
アバター
破棄
Jörg Ricardo Schumacher
著作者

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
著作者

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
著作者

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
著作者

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...

アバター
Nirav Jani
最善の回答

Hello,

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

1
アバター
破棄
Jörg Ricardo Schumacher
著作者

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
著作者

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
著作者

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 ""

アバター
Ankit H Gandhi(AHG)
最善の回答

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
アバター
破棄
アバター
dharupriyanshi@gmail.com
最善の回答

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
アバター
破棄
アバター
Jörg Ricardo Schumacher
著作者 最善の回答

Hello Nirav,

 

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

0
アバター
破棄
Nirav Jani

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

ディスカッションを楽しんでいますか?読むだけでなく、参加しましょう!

今すぐアカウントを作成して、限定機能を利用したり、素晴らしいコミュニティと交流しましょう!

登録
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • Github
  • Runbot
  • 翻訳
サービス
  • Odoo.shホスティング
  • サポート
  • アップグレード
  • カスタム開発
  • 教育プログラム
  • 会計事務所一覧
  • パートナー一覧
  • パートナーになる
企業情報
  • 会社概要
  • ブランドアセット
  • お問い合わせ
  • 採用情報
  • イベント
  • ポッドキャスト
  • ブログ
  • お客様一覧
  • リーガル情報 • プライバシーポリシー
  • セキュリティ
الْعَرَبيّة 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(オドゥー)は、CRM、eコマース、会計、在庫管理、POS、プロジェクト管理など、企業のさまざまな業務を一つのシステムで管理できる、ベルギー発のオープンソースのERPソフトウェアです。

高機能で使いやすく、完全に統合されたERPとして、ユニークな価値を提供しています。

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