-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5191][ADD] product_attachment_name_update #157
base: 15.0
Are you sure you want to change the base?
Conversation
else: | ||
res_model = "product.product" | ||
rec = self.env[res_model].browse(attachment.res_id) | ||
attachment.name = f"[{rec.name}][{rec.id}] {attachment.name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I attach two images with exactly the same name to the same product, two separate attachments with the same name are created, so they are not unique. I think using the ID from ir.attachment might help. Also, I think switching from using product.product and product.template IDs to using ir.attachment might make it unique. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the name of the image added to the chatter the same as the one added to the Extra Product Media images.
Is that possible?
Sorry for the lack of requirements
5191