From 7e55abfad0bffd3a3f1be0d085ea3fba3e017131 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Thu, 27 Jun 2024 13:19:44 +0200 Subject: [PATCH 1/2] [FIX] fs_product_multi_image: Avoid warnings for duplicate fields labels --- fs_product_multi_image/models/product_product.py | 12 ++++++++++-- fs_product_multi_image/models/product_template.py | 12 ++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/fs_product_multi_image/models/product_product.py b/fs_product_multi_image/models/product_product.py index 12b6a9cf71..3f10ed7289 100644 --- a/fs_product_multi_image/models/product_product.py +++ b/fs_product_multi_image/models/product_product.py @@ -25,9 +25,17 @@ class ProductProduct(models.Model): # Store it to improve perfs store=True, ) - image = FSImage(related="main_image_id.image", readonly=True, store=False) + image = FSImage( + string="FS Main Image", + related="main_image_id.image", + readonly=True, + store=False, + ) image_medium = FSImage( - related="main_image_id.image_medium", readonly=True, store=False + "FS Image Medium", + related="main_image_id.image_medium", + readonly=True, + store=False, ) @api.depends( diff --git a/fs_product_multi_image/models/product_template.py b/fs_product_multi_image/models/product_template.py index f080db1b9e..3ed6c44de0 100644 --- a/fs_product_multi_image/models/product_template.py +++ b/fs_product_multi_image/models/product_template.py @@ -20,9 +20,17 @@ class ProductTemplate(models.Model): # Store it to improve perfs store=True, ) - image = FSImage(related="main_image_id.image", readonly=True, store=False) + image = FSImage( + string="FS Main Image", + related="main_image_id.image", + readonly=True, + store=False, + ) image_medium = FSImage( - related="main_image_id.image_medium", readonly=True, store=False + string="FS Image Medium", + related="main_image_id.image_medium", + readonly=True, + store=False, ) @api.depends("image_ids", "image_ids.sequence") From 953d3d02d7e8f1b022c872e7eaf372eec413df96 Mon Sep 17 00:00:00 2001 From: Denis Roussel Date: Thu, 27 Jun 2024 13:24:56 +0200 Subject: [PATCH 2/2] [FIX] fs_file_demo: Avoid warnings for duplicate fields labels --- fs_file_demo/models/fs_file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_file_demo/models/fs_file.py b/fs_file_demo/models/fs_file.py index 5c0fc83183..9e7867b35c 100644 --- a/fs_file_demo/models/fs_file.py +++ b/fs_file_demo/models/fs_file.py @@ -16,10 +16,10 @@ class FsFile(models.Model): file = fs_fields.FSFile(string="File") fs_image_1920 = fs_image_fields.FSImage( - string="Image", max_width=1920, max_height=1920 + string="Image (1920)", max_width=1920, max_height=1920 ) fs_image_128 = fs_image_fields.FSImage( - string="Image", + string="Image (128)", max_width=128, max_height=128, related="fs_image_1920",