コンテンツへスキップ
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
このフォーラムについて
ヘルプ

Odoo12c: How to remove model/data after removing app?

購読

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

この質問にフラグが付けられました
migrationhelpdeskodoo12
1 返信
8377 ビュー
アバター
Russ Schneider

Odoo 12 Community Edition
Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-72-generic x86_64)

I've downgraded an Odoo instance from 11e to 11ce and then migrated it to 12ce using OCA Open Upgrade and have a problem with leftover data.

While I've deleted the app "Helpdesk" and related modules, helpdesk_sale_timesheet and helpdesk_timesheet, they still appear in the data.

For instance​. the model helpdesk.ticket still exists in the database, and I cannot delete it because:

Model 'Ticket' co​ntains module data and cannot be removed.

This is also breaking the Discuss (mail) app as I cannot go to the Discuss page.  Error:
​

```

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/opt/odoo12/odoo/odoo/http.py", line 656, in _handle_exception

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

  File "/opt/odoo12/odoo/odoo/http.py", line 314, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/opt/odoo12/odoo/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/opt/odoo12/odoo/odoo/http.py", line 698, in dispatch

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

  File "/opt/odoo12/odoo/odoo/http.py", line 346, in _call_function

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

  File "/opt/odoo12/odoo/odoo/service/model.py", line 97, in wrapper

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

  File "/opt/odoo12/odoo/odoo/http.py", line 339, in checked_call

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

  File "/opt/odoo12/odoo/odoo/http.py", line 941, in __call__

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

  File "/opt/odoo12/odoo/odoo/http.py", line 519, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo12/odoo-custom-addons/mail_tracking/controllers/main.py", line 91, in mail_init_messaging

    values = super().mail_init_messaging()

  File "/opt/odoo12/odoo/odoo/http.py", line 519, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo12/odoo/addons/mail/controllers/main.py", line 243, in mail_init_messaging

    'mail_failures': request.env['mail.message'].message_fetch_failed(),

  File "/opt/odoo12/odoo/addons/mail/models/mail_message.py", line 422, in message_fetch_failed

    return messages._format_mail_failures()

  File "/opt/odoo12/odoo/addons/mail/models/mail_message.py", line 544, in _format_mail_failures

    record = self.env[message.model].browse(message.res_id)

  File "/opt/odoo12/odoo/odoo/api.py", line 831, in __getitem__

    return self.registry[model_name]._browse((), self)

  File "/opt/odoo12/odoo/odoo/modules/registry.py", line 176, in __getitem__

    return self.models[model_name]

KeyError: 'helpdesk.ticket'

```

I've taken the following steps to try and remove this data:
​

  • Removed the module directories from the server

  • ./odoo-bin --update all

  • service odoo restart -u all

  • Apps -> List mode -> Checkbox -> Delete for helpdesk

  • Remove and reinstall Discuss (mail)


What else can I do?







0
アバター
破棄
アバター
Ray Carnes (ray)
最善の回答

I would try deleting mail.message records linked to the helpdesk.ticket model - the error indicates the custom mail_tracking module is triggering the error and I suspect it is trying to do something with messages linked to the helpdesk App.

1
アバター
破棄
Russ Schneider
著作者

How? I get the above error if I try to delete them. Is there a way to do it directly in the database (making sure you get everything)?

Ray Carnes (ray)

Try: DELETE FROM MAIL.MESSAGE WHERE MODEL = 'helpdesk.ticket';

Russ Schneider
著作者

Seems to have worked. Thank you!

Russ Schneider
著作者

Although mail_message (for those needing this).

Yenthe Van Ginneken (Mainframe Monkey)

OCA has some great tools for data cleaning and cleaning up apps too by the way. Adding it as a reference here. See https://www.odoo.com/apps/modules/12.0/database_cleanup/

Russ Schneider
著作者

Thank you, Yenthe. That's a great tool!

Admin Samadeva

As Yenthe said, the OCA DatabaseCleanUp module does the job, but what is the right way to remove totally a custom model without using this kind of "Emergency" cleanup module ?

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

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

登録
関連投稿 返信 ビュー 活動
Error during import in Odoo 12 - Security restriction 解決済
migration odoo12
アバター
アバター
2
7月 21
11807
Substitute Function For _get_tax_amount_by_group(self) in odoo12? 解決済
migration odoo12
アバター
アバター
1
7月 19
4688
Odoo 12 helpdesk ticket assignment shows all groups members
helpdesk odoo odoo12
アバター
0
3月 23
3189
How to migrate custom addons from odoo12 to odoo15 from odoo.sh with existing data?
migration odoo12 v15
アバター
0
7月 22
2987
AttributeError: module 'odoo.addons.base.models.ir_module' has no attribute 'get_values_from_terp' 解決済
migration odoo12 v14
アバター
アバター
1
7月 21
9108
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • 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