Skip to content

[14.0][FIX] attachment_zipped_download: Fix tests (remove addClassCleanup)#583

Closed
victoralmau wants to merge 2 commits intoOCA:14.0from
Tecnativa:14.0-fix-attachment_zipped_download-tests
Closed

[14.0][FIX] attachment_zipped_download: Fix tests (remove addClassCleanup)#583
victoralmau wants to merge 2 commits intoOCA:14.0from
Tecnativa:14.0-fix-attachment_zipped_download-tests

Conversation

@victoralmau
Copy link
Member

@victoralmau victoralmau commented Feb 27, 2026

Fix tests (remove addClassCleanup)

Remove addClassCleanup to prevent error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/odoo_test_helper/fake_model_loader.py", line 202, in restore_registry
    self.env.registry.setup_models(self.env.cr)
  File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 273, in setup_models
    model._setup_base()
  File "/opt/odoo/custom/src/odoo/odoo/models.py", line 2802, in _setup_base
    delattr(cls, name)
AttributeError: id

Please @pedrobaeza can you review it?

@Tecnativa

@victoralmau victoralmau marked this pull request as ready for review February 27, 2026 09:03
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this affects all the versions?

@pedrobaeza pedrobaeza added this to the 14.0 milestone Feb 27, 2026
@victoralmau
Copy link
Member Author

So this affects all the versions?

I have reviewed 15, 16, 17, and 18, and there are currently no similar errors in the tests for this module.

@victoralmau victoralmau marked this pull request as draft February 27, 2026 12:42
@victoralmau victoralmau force-pushed the 14.0-fix-attachment_zipped_download-tests branch 3 times, most recently from 5b88639 to d4a4f58 Compare February 27, 2026 12:53
@victoralmau victoralmau changed the title [14.0][IMP] attachment_zipped_download: Change where the mock has to be loaded [14.0][FIX] attachment_zipped_download: Fix tests (remove addClassCleanup) Feb 27, 2026
@victoralmau victoralmau marked this pull request as ready for review February 27, 2026 12:57
@victoralmau victoralmau force-pushed the 14.0-fix-attachment_zipped_download-tests branch from d4a4f58 to a76a45f Compare February 27, 2026 13:12
@victoralmau victoralmau marked this pull request as draft February 27, 2026 13:21
@victoralmau
Copy link
Member Author

Related to OCA/odoo-test-helper#42

@victoralmau
Copy link
Member Author

Similar error in other tests of 14 that use odoo_test_helper.

Related to OCA/odoo-test-helper#42

@victoralmau victoralmau closed this Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants