Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

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

Subscriure's

Get notified when there's activity on this post

This question has been flagged
projectbuildv18
1 Respondre
2775 Vistes
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
Descartar
Avatar
Gracious Joseph
Best Answer

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
Descartar
Shibi Nirappel Sridharan
Autor

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!

Registrar-se
Related Posts Respostes Vistes Activitat
Projects and Time sheets Shared across companies
project timesheet v18
Avatar
0
de març 25
1908
Does Odoo support Sub Projects? ie: nesting of Projects?
project
Avatar
Avatar
Avatar
3
d’oct. 25
3891
Is it possible to sell on credit directly at the point of sale and leave the order pending payment?
v18
Avatar
Avatar
2
de set. 25
684
Sub-Tasks: Can I copy/paste a set of them?
project
Avatar
Avatar
Avatar
2
de set. 25
1220
Custom Task Properties Show with ID When Exporting to Excel – How to Show Only Value? Solved
project
Avatar
Avatar
Avatar
2
de set. 25
2045
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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