Repository navigation
Conversation
Gray out the archived files in the list, flag them with a ribbon on the form, and add a filter to list them.
Rename the 'active' field of the image relations to 'image_active': named 'active', it hides the relations of archived images everywhere (eg: on products), while they must show up grayed out. Dim the archived images in the relation kanban. Show the archived images as well: grayed out in the list, flagged with a ribbon on the form, and a filter to list them.
List the relations of archived images on products and variants, grayed out, and skip them when computing the main image.
Rename the 'active' field of the relations to 'media_active': named 'active', it hides the relations of archived media everywhere (eg: on the product and variant forms), while they must show up grayed out.
simahawk
force-pushed
the
18-fix-archived-relations
branch
from
October 2, 2026 12:49
1a7049a to
4817a15
Compare
simahawk
marked this pull request as ready for review
October 6, 2026 11:45
lmignon
approved these changes
Oct 6, 2026
Without an explicit label, the related field takes the one of the image 'active' field: "Active", misleading on a relation that cannot be archived itself.
Without an explicit label, the related field takes the one of the media 'active' field: "Active", misleading on a relation that cannot be archived itself.
divad1196
reviewed
Oct 26, 2026
divad1196
left a comment
There was a problem hiding this comment.
The PR is about replacing active field by image/media_active, then adapting the code.
Wouldn't it be better to juse use active, which automatically has the behavior we want on search and hide archived records by default ?
IMO, there are only a few views where we want to see the archived storage.file, the rest of the time, we want it hidden IMO
| # Gray out the relations of archived images. | ||
| # NOTE: do not call this field `active`, it would hide the relations | ||
| # (eg: on the product) and we want to display them anyway. | ||
| image_active = fields.Boolean( |
There was a problem hiding this comment.
This is a breaking change:
searchwill return more records than expected- Users will see more records than they want.
Wouldn't it be better to keep using active field and just make the view list show archived fields?
| # Gray out the relations of archived media. | ||
| # NOTE: do not call this field `active`, it would hide the relations | ||
| # (eg: on the product) and we want to display them anyway. | ||
| media_active = fields.Boolean( |
There was a problem hiding this comment.
same question as for https://github.com/OCA/storage/pull/676/changes#r4381756871
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Show relations of archived media and images
The
activefield on media and image relations, related to the media or image, made Odoo hide the relations of archived records everywhere (product and variant forms, ...). It's renamed tomedia_active/image_activeso these relations are listed again, grayed out. Archived images are skipped when computing the main image. See the commits for details.