-
-
Notifications
You must be signed in to change notification settings - Fork 497
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
[16.0][MIG] website_sale_product_attachment: Migration to version 16.0 #829
[16.0][MIG] website_sale_product_attachment: Migration to version 16.0 #829
Conversation
3868dd0
to
6c02d87
Compare
c9f617c
to
cd58ba2
Compare
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.
In my functional test the attachments didn't show up for the public user (ie: not logged in)
After your last changes it's the opposite. It shows up for public users but it doesn't for logged in users. |
@chienandalu because the website_attachment_ids field of product.template have a dynamic domain with the filter Please see this link: |
cd58ba2
to
e0ebfdb
Compare
But that's not my complain. I know that the attachment has to be public. The issue was that only the public user could see the dropdown in the product page and that's not the behavior in previous versions |
/ocabot migration website_sale_product_attachment |
… website This module lets you publish downloadable attachments in a product page. This is useful if you want to publish firmwares, manuals, specs, warranties, or whatever document related to the product. @Tecnativa TT20984 TT23657
… names Without this fix, the order in which attachments were displayed couldn't be predictable. Now, it's as expected by user: by name. Also the thumbnails got stretched when the attachment had a long name. @Tecnativa TT24437
Currently translated at 100.0% (9 of 9 strings) Translation: e-commerce-12.0/e-commerce-12.0-website_sale_product_attachment Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_product_attachment/es/
Currently translated at 33.3% (3 of 9 strings) Translation: e-commerce-12.0/e-commerce-12.0-website_sale_product_attachment Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_product_attachment/fr/
Currently translated at 100.0% (9 of 9 strings) Translation: e-commerce-12.0/e-commerce-12.0-website_sale_product_attachment Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_product_attachment/fr/
Currently translated at 33.3% (3 of 9 strings) Translation: e-commerce-12.0/e-commerce-12.0-website_sale_product_attachment Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_product_attachment/nl/
Currently translated at 100.0% (9 of 9 strings) Translation: e-commerce-12.0/e-commerce-12.0-website_sale_product_attachment Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_product_attachment/ca/
…sudo In v13, there's no general read ACL for public files, so we need to get filenames and file type using sudo. The download is performed normally due to the public=True field in the attachments.
On previous version, attachments had 2 fields for adding both attachment name and file name. Now on v13, there's only one, that is fille with the file name. On initial migration, it was considered that this field is enough, but putting file names on the website product page can be ugly, limited and confusing, so we are adding here a new field to store the name we want to give it for the website e-commerce product page. It also includes migration script for recovering the old information if coming from v12.
Currently translated at 100.0% (12 of 12 strings) Translation: e-commerce-13.0/e-commerce-13.0-website_sale_product_attachment Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_product_attachment/ca/
e0ebfdb
to
6ac6c6f
Compare
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.
Tested in local 👍
please review @CarlosRoca13 |
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.
Code and functional review 👍
/ocabot merge nobump |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 1a8d70e. Thanks a lot for contributing to OCA. ❤️ |
@Tecnativa TT44231