Skip to content
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][IMP] fs_product_multi_image: add labels on image fields #321

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions fs_product_multi_image/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ class ProductProduct(models.Model):
# Store it to improve perfs
store=True,
)
image = FSImage(related="main_image_id.image", readonly=True, store=False)
image = FSImage(
related="main_image_id.image", readonly=True, store=False, string="Public Image"
)
image_medium = FSImage(
related="main_image_id.image_medium", readonly=True, store=False
related="main_image_id.image_medium",
readonly=True,
store=False,
string="Public Image Medium",
)

@api.depends(
Expand Down
9 changes: 7 additions & 2 deletions fs_product_multi_image/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ class ProductTemplate(models.Model):
# Store it to improve perfs
store=True,
)
image = FSImage(related="main_image_id.image", readonly=True, store=False)
image = FSImage(
related="main_image_id.image", readonly=True, store=False, string="Public Image"
)
image_medium = FSImage(
related="main_image_id.image_medium", readonly=True, store=False
related="main_image_id.image_medium",
readonly=True,
store=False,
string="Public Image Medium",
)

@api.depends("image_ids", "image_ids.sequence")
Expand Down
Loading