Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2003 Представления

I am receiving the following error message on product pages that has chatter sections such as order/invoice page.  This began after installing "purchase" App in Odoo version 18.
No custom apps have been installed.  Nothing in the Odoo logs related to this error.  uninstalling purchase app seems to fix it, however, I need the purchase module to be installed.  Any help would be greatly appreciated. 

Error:

The following modules failed to load because of an error, you may find more information in the devtools console: portal.assets_chatter.bundle.xml 


Browser Console displays the following error:

web.assets_frontend_lazy.min.js:3874
Error: Error while loading "portal.assets_chatter.bundle.xml":
    Error: Template mail.AttachmentList already exists
    Error: Error while loading "portal.assets_chatter.bundle.xml":
    Error: Template mail.AttachmentList already exists
        at ModuleLoader.startModule (web.assets_frontend_…nimal.min.js:24:225)
        at ModuleLoader.startModules (web.assets_frontend_minimal.min.js:23:57)
        at ModuleLoader.addJob (web.assets_frontend_minimal.min.js:20:39)
        at ModuleLoader.define (web.assets_frontend_…nimal.min.js:19:127)
        at portal.assets_chatter.min.js:3200:26
handleError @ web.assets_frontend_lazy.min.js:3874



Аватар
Отменить
Лучший ответ

The error you're encountering in Odoo version 18 is caused by a conflict in templates. Specifically, the mail.AttachmentList template is defined twice, which results in Odoo being unable to load the portal.assets_chatter.bundle.xml. This is often caused by either:

  • A misconfiguration or bug in the installed modules (in this case, the purchase module).
  • Caching issues in the browser or the server.

Here’s how you can troubleshoot and resolve the issue:

1. Clear Cache and Assets

  • Action:
    • Go to Settings > Activate Developer Mode.
    • Navigate to Settings > Technical > Database Structure > Views, search for mail.AttachmentList.
    • Confirm whether this template exists multiple times or has a conflict.
    • Clear your browser cache or use an incognito window to avoid cached JavaScript/HTML errors.
    • Regenerate the assets on the server:
      ./odoo-bin -c odoo.conf --update=all
      
      This will update and regenerate all Odoo assets.

2. Check for Duplicate Template Definitions

  • The error indicates that the template mail.AttachmentList is defined multiple times, likely due to the purchase module loading an additional definition of the same template.
  • Action:
    • Open your Odoo instance in Developer Mode.
    • Search for the template mail.AttachmentList under Settings > Technical > Database Structure > Views.
    • Check if there are duplicate records for the same template. If duplicates exist:
      • Deactivate the duplicate template (if it belongs to a specific module, such as purchase).
      • Ensure there is only one active mail.AttachmentList template.

3. Debugging the JavaScript Bundle

  • The error specifically references the portal.assets_chatter.bundle.xml, which contains frontend resources for chatter functionality.
  • Action:
    • Verify the bundle loading:
      • In Developer Mode, navigate to Settings > Technical > User Interface > Views.
      • Search for portal.assets_chatter.bundle.
      • Check the JavaScript/CSS code for duplicate references to mail.AttachmentList or similar templates.

4. Reinstall the Purchase Module

If no duplicates or misconfigurations are found, try uninstalling and reinstalling the purchase module:

./odoo-bin -c odoo.conf -u purchase

5. Modify the Template

If a conflicting template is from a specific module (e.g., purchase):

  1. Extend the View:
    • Identify the conflicting template and modify it to resolve the issue:
    <template id="mail.AttachmentList" inherit_id="module.template_id" priority="20">
        <!-- Ensure unique definition -->
    </template>
    
  2. Disable the Duplicate Template:
    • If the duplicate template is unnecessary, you can deactivate it via the UI or by modifying the XML definition.

6. Check the Logs

Even though you mentioned no errors in Odoo logs, ensure verbose logging is enabled:

./odoo-bin -c odoo.conf --log-level=debug

Look for any clues related to portal.assets_chatter.bundle.xml or mail.AttachmentList.

7. Temporary Workaround

If you urgently need to use the Purchase module, you can temporarily remove the chatter functionality from the conflicting views:

  1. Navigate to Settings > Technical > User Interface > Views.
  2. Search for and edit the product page view or any page that includes chatter.
  3. Remove or comment out the chatter section temporarily:
    <xpath expr="//div[@class='o_chatter']" position="replace"/>
    

8. Report the Issue

If the above solutions don’t resolve the problem, report the issue to Odoo via their official support channels or community forums:

  • Provide details of the error, Odoo version, and steps to reproduce the problem.
  • If this is a bug in the Odoo purchase module for version 18, they may provide a patch.

Summary

The error likely stems from a duplicate or conflicting definition of the mail.AttachmentList template in the purchase module or its dependencies. Clearing the cache, resolving duplicate templates, and regenerating assets should resolve the issue. For a more permanent solution, fixing the template conflict directly in the module or reporting the issue to Odoo support may be necessary.

Let me know if you need further guidance!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
нояб. 24
776
2
июл. 24
1835
0
апр. 24
1380
3
мар. 24
1274
1
дек. 23
1753