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

project.project model inherit fails in odoo 18 , build fails

購読

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

この質問にフラグが付けられました
projectbuildv18
1 返信
2774 ビュー
アバター
Shibi Nirappel Sridharan

class ProjectProject(models.Model): _inherit = 'project.project'

 product_manager = fields.Many2one( 'hr.employee', string="Manager", help="Employee who manages the process for this project." )


but build fails with error 

FAILED: [4/7] Tour project_task_activities_split → Step Task "New Sub-Task!" is listed in the activity view (trigger: .o_activity_record .d-block:contains("New Sub-Task!")). Element (.o_activity_record .d-block:contains("New Sub-Task!")) has not been found. TIMEOUT: The step failed to complete within 10000 ms.

FAIL: Subtest TestTodoUi.test_tour_project_task_activities_split (login='admin') Traceback (most recent call last): File "<decorator-gen-265>", line 2, in test_tour_project_task_activities_split File "/home/odoo/src/odoo/odoo/tests/common.py", line 2138, in _users func(*args, **kwargs) File "/home/odoo/src/odoo/addons/project_todo/tests/test_todo_ui.py", line 51, in test_tour_project_task_activities_split self.start_tour("/odoo", 'project_task_activities_split', login="admin") File "/home/odoo/src/odoo/odoo/tests/common.py", line 2072, in start_tour return self.browser_js(url_path=url_path, code=code, ready=ready, timeout=timeout, success_signal="tour succeeded", **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odoo/src/odoo/odoo/tests/common.py", line 2048, in browser_js self.fail('%s\n\n%s' % (message, error)) AssertionError: The test code "odoo.startTour('project_task_activities_split', {"stepDelay": 0, "keepWatchBrowser": false, "debug": false, "startUrl": "/odoo", "delayToCheckUndeterminisms": 0})" failed FAILED: [4/7] Tour project_task_activities_split → Step Task "New Sub-Task!" is listed in the activity view (trigger: .o_activity_record .d-block:contains("New Sub-Task!")). Element (.o_activity_record .d-block:contains("New Sub-Task!")) has not been found. TIMEOUT: The step failed to complete within 10000 ms.

0
アバター
破棄
アバター
Gracious Joseph
最善の回答

The error indicates a failed frontend tour test related to the project_task_activities_split feature in Odoo 18. This failure might be due to changes or misalignments introduced while inheriting the project.project model and adding the product_manager field. Here’s how you can address and resolve the issue:

Step-by-Step Troubleshooting and Fixes

  1. Check Field Addition:
    • Verify that your field addition doesn’t inadvertently affect existing views or logic.
    • Specifically, ensure no existing views or JS interactions depend on the exact structure of the project.project model, as adding fields can sometimes disrupt rendering or testing.
    Example of a properly structured inheritance:
    pythonCopy codefrom odoo import models, fields
    
    class ProjectProject(models.Model):
        _inherit = 'project.project'
    
        product_manager = fields.Many2one(
            'hr.employee',
            string="Manager",
            help="Employee who manages the process for this project."
        )
    
    This code alone should not directly cause the test to fail unless it affects dependent code or views.
  2. Update Related Views:
    • Ensure all views that render project.project are updated to accommodate the new field if necessary.
    • Check for the activity view referenced in the test:
      • Look for any <xpath> or updates related to project.project views.
      • Validate the o_activity_record class and .d-block behavior to ensure the field addition doesn’t interfere.
  3. Analyze Test Dependencies:
    • Review the test_todo_ui.py test, especially the test_tour_project_task_activities_split method. This test is failing because the frontend element .o_activity_record .d-block:contains("New Sub-Task!") could not be located.
    • Check if:
      • The inheritance inadvertently removed or altered the o_activity_record view structure.
      • A JavaScript or QWeb template update is required to reintroduce the missing element.
  4. Verify QWeb Templates:
    • Review QWeb templates used by project.project or related features.
    • Look for the element with o_activity_record and ensure it renders correctly after your changes.
  5. Fix JS or Tour Test Logic:
    • If the test depends on JavaScript interactions, verify the tour code:
      • Locate the trigger for the .o_activity_record .d-block:contains("New Sub-Task!") element.
      • Ensure the element is rendered and accessible during the test.
    Example of updating or debugging the test:
    pythonCopy code# Check if the element exists at the expected stage of the test
    self.assertTrue(self.env['project.task'].search([('name', '=', 'New Sub-Task!')]), "Task 'New Sub-Task!' not found")
    
  6. Debugging Strategy:
    • Enable developer mode and open the affected page in the browser.
    • Inspect the DOM for .o_activity_record and .d-block.
    • Confirm the presence of "New Sub-Task!" text during test execution.
  7. Rebuild and Retest:
    • Restart your Odoo server and ensure your module is updated:
      bashCopy code./odoo-bin -d your_database_name -u your_module_name --stop-after-init
      
    • Re-run the tests:
      bashCopy code./odoo-bin --test-enable -d your_database_name --stop-after-init
      
  8. If Problem Persists:
    • Check for dependencies on project_todo or similar modules.
    • Investigate other overridden models or fields that may be interacting with project.project.

Example Fix for the Test

If you modified templates, ensure all necessary elements (like o_activity_record) are included:

xmlCopy code<t t-extend="project.activity_view">
    <xpath expr="//div[@class='o_activity_record']" position="inside">
        <!-- Ensure New Sub-Task element exists for the test -->
        <div class="d-block">New Sub-Task!</div>
    </xpath>
</t>

Final Notes

  • Always verify the product_manager field addition does not conflict with core logic or modules.
  • Review any JS or Python logic dependent on the project.project model.
  • If the issue is unresolved, share logs, and we can further assist!

0
アバター
破棄
Shibi Nirappel Sridharan
著作者

I will review this, but when I add the project module as a dependency (without inheriting it), the build fails. Initially, I thought the issue was caused by updating the view, so I tried adding the attribute to the model without modifying the view, but the build still failed. My next attempt was to inherit the module without making any changes, and the build failed again. This leads me to believe that something else might be going wrong.

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

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

登録
関連投稿 返信 ビュー 活動
Projects and Time sheets Shared across companies
project timesheet v18
アバター
0
3月 25
1908
Does Odoo support Sub Projects? ie: nesting of Projects?
project
アバター
アバター
アバター
3
10月 25
3890
Is it possible to sell on credit directly at the point of sale and leave the order pending payment?
v18
アバター
アバター
2
9月 25
684
Sub-Tasks: Can I copy/paste a set of them?
project
アバター
アバター
アバター
2
9月 25
1220
Custom Task Properties Show with ID When Exporting to Excel – How to Show Only Value? 解決済
project
アバター
アバター
アバター
2
9月 25
2045
コミュニティ
  • チュートリアル
  • ドキュメンテーション
  • フォーラム
オープンソース
  • ダウンロード
  • 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