Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    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
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

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

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
projectbuildv18
1 Відповісти
2772 Переглядів
Аватар
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.

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

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

Реєстрація
Related Posts Відповіді Переглядів Дія
Projects and Time sheets Shared across companies
project timesheet v18
Аватар
0
бер. 25
1908
Does Odoo support Sub Projects? ie: nesting of Projects?
project
Аватар
Аватар
Аватар
3
жовт. 25
3889
Is it possible to sell on credit directly at the point of sale and leave the order pending payment?
v18
Аватар
Аватар
2
вер. 25
684
Sub-Tasks: Can I copy/paste a set of them?
project
Аватар
Аватар
Аватар
2
вер. 25
1220
Custom Task Properties Show with ID When Exporting to Excel – How to Show Only Value? Вирішено
project
Аватар
Аватар
Аватар
2
вер. 25
2045
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • 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, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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