OCA / knowledge

Odoo Document & Knowledge Management
http://www.odoo-community.org/project/22
GNU Affero General Public License v3.0
153 stars 328 forks source link

Error when switching to debug mode #429

Open PintoVeronica opened 1 year ago

PintoVeronica commented 1 year ago

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

eesteves-odoogap commented 7 months ago

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?

felixhummel commented 7 months ago

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()
eesteves-odoogap commented 7 months ago

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?

felixhummel commented 7 months ago

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

github-actions[bot] commented 3 weeks ago

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.