Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivouspalvelut
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Kurssit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

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

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

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

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
projectbuildv18
1 Vastaa
2767 Näkymät
Avatar
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
Avatar
Hylkää
Avatar
Gracious Joseph
Paras vastaus

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
Avatar
Hylkää
Shibi Nirappel Sridharan
Tekijä

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.

Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
Projects and Time sheets Shared across companies
project timesheet v18
Avatar
0
maalisk. 25
1906
Does Odoo support Sub Projects? ie: nesting of Projects?
project
Avatar
Avatar
Avatar
3
lokak. 25
3880
Is it possible to sell on credit directly at the point of sale and leave the order pending payment?
v18
Avatar
Avatar
2
syysk. 25
682
Sub-Tasks: Can I copy/paste a set of them?
project
Avatar
Avatar
Avatar
2
syysk. 25
1209
Custom Task Properties Show with ID When Exporting to Excel – How to Show Only Value? Ratkaistu
project
Avatar
Avatar
Avatar
2
syysk. 25
2040
Yhteisö
  • Kurssit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Tavaramerkki
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة 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 on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

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