knowledge icon indicating copy to clipboard operation
knowledge copied to clipboard

Error when switching to debug mode

Open PintoVeronica opened this issue 2 years ago • 4 comments

module: attachment_preview version: 15.0

Steps to reproduce

  1. Open the server
  2. Switch it to debug mode
  3. Error occurs. The error is the following: "Error: Service attachment_preview.attachment_card already defined at odoo.define (http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/445-90e6945/web.assets_common.min.js:78:29) at http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/446-6b97312/web.assets_backend.min.js:10150:370 at http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/445-90e6945/web.assets_common.min.js:93:63 at new Promise () at processJob (http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/445-90e6945/web.assets_common.min.js:93:9) at odoo.processJobs (http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/445-90e6945/web.assets_common.min.js:101:1) at odoo.define (http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/445-90e6945/web.assets_common.min.js:79:161) at http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/446-6b97312/web.assets_backend.min.js:10150:370 at http://oca-knowledge-15-0-b7d0c9c5146d.runboat.odoo-community.org/web/assets/445-90e6945/web.assets_common.min.js:93:63 at new Promise ()"

Current behavior The error is displayed when we switch to debug mode.

Expected behavior We expected to see no error when switching to debug mode.

https://github.com/OCA/knowledge/assets/104197318/b35538c5-076f-4d78-b88d-5b33b50f2252

PintoVeronica avatar Sep 01 '23 08:09 PintoVeronica

Hi everyone,

The same has been happening to me in Odoo Enterprise v15.0.

The JS error is complaining about a field attachment_preview.attachment_card. This field is in fact already in Odoo....

image

Can someone help us here, please?

eesteves-odoogap avatar Feb 07 '24 11:02 eesteves-odoogap

Did you uninstall the attachment_preview addon? We had the same error and ran the following to uninstall the attachment_preview addon.

self.env['ir.module.module'].search([('name', '=', 'attachment_preview')]).button_immediate_uninstall()

felixhummel avatar Feb 12 '24 18:02 felixhummel

Hi @felixhummel Thank you for your suggestion. We have uninstalled and installed but the issue persists. Can the attachment_preview.attachment_card field be duplicated between Odoo and this module?

eesteves-odoogap avatar Feb 13 '24 10:02 eesteves-odoogap

It does not seem like it: https://github.com/search?q=repo%3AOCA%2Fknowledge+attachment_card&type=code

felixhummel avatar Feb 13 '24 18:02 felixhummel

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Aug 18 '24 12:08 github-actions[bot]