Default Product Images
product_default_image · OCA/product-attribute
Health
35/100
poor
-
Security25/25No findings
-
Activity0/25Last human commit 91 months ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 10.0
Heuristic over the facts below, not an audit · How it's computed
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
0.16 MB
Module directory on disk
Code analysis
6 migration notes
5 models
3 views
0 HTTP endpoints
Migration considerations
AbstractProductImage— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (1 methods) migration-api-multi-one · sourceProductCategory— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (1 methods) migration-api-multi-one · sourceProductTemplate— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (4 methods) migration-api-multi-one · sourceResCompany— Migrating to 13.0: `@api.multi`/`@api.one` were removed (multi is the default): drop them, looping over `self` where `@api.one` was used. (1 methods) migration-api-multi-one · sourceproduct_template_form_view— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · sourceview_stock_config_settings— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 3
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_category_form_view |
product.category.form | product.category | form | Inherits product.product_category_form_view |
product_template_form_view |
product.template.common.form | product.template | form | Inherits product.product_template_form_view |
view_stock_config_settings |
stock settings | stock.config.settings | Inherits stock.view_stock_config_settings |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (3)
-
imageBinaryattachment=Truehelp='This field holds the image used for the category, limited to 1024x1024px. Also used as the default image for products of this category.'string='Image' -
image_mediumBinaryattachment=Truehelp='Medium-sized image of the category. It is automatically resized as a 128x128px image, with aspect ratio preserved, only when the image exceeds one of those sizes. Use this field in form views or some kanban views.'string='Medium-Sized Image' -
image_smallBinaryattachment=Truehelp='Small-sized image of the category. It is automatically resized as a 64x64px image, with aspect ratio preserved. Use this field anywhere a small image is required.'string='Small-Sized Image'
-
create(self, vals)@api.model -
write(self, vals)@api.multi
New fields (3)
-
auto_change_imageBooleandefault=Truehelp='Allow/disallow automatic changes to product image. Uncheck to stop being changed to a default image.'string='Auto Change Image' -
image_typeSelectiondefault=NONEreadonly=Truerequired=Trueselection=[(NONE, 'No Image'), (GLOBAL, 'Global'), (CATEGORY, 'Category'), (CUSTOM, 'Custom')]string='Image Type' -
product_image_targetSelectionrelated='company_id.product_image_target'required=Truestring='Default Product Image'
-
apply_default_image(self)@api.multi -
default_get(self, vals)@api.model -
write(self, vals)@api.multi
New fields (2)
-
product_imageBinarydefault=<expr>help='Use as the global image for all product default images. Limited to 1024x1024.'string='Global Product Image' -
product_image_targetSelectiondefault='none'help='Determines the type of default images to use. Changing this field will set all empty product images to the target you specify. Products with a default image from the previous target are changed to your new target as well.\n\nNo Default Image: Deletes images.\n\nGlobal: Set to Global Product Image.\n\nCategory: Set products to their category image.\n\nGlobal and Category: Set products to their category image if the category has an image. Otherwise set it to the Global Product Image'required=Trueselection=[(NONE, 'No Default Image'), (GLOBAL, 'Global Product Image'), (CATEGORY, "Category's Image"), (GLOBAL_CATEGORY, 'Global and Category')]string='Default Product Image'
-
write(self, vals)@api.multiChanges product images if target or product_image have changed
New fields (2)
-
product_imageBinaryhelp='Use as the global image for all product default images. Limited to 1024x1024.'related='company_id.product_image'required=Truestring='Global Product Image' -
product_image_targetSelectionhelp='Determines the type of default images to use. Changing this field will set all empty product images to the target you specify. Products with a default image from the previous target are changed to your new target as well.\n\nNo Default Image: Deletes images.\n\nGlobal: Set to Global Product Image.\n\nCategory: Set products to their category image.\n\nGlobal and Category: Set products to their category image if the category has an image. Otherwise set it to the Global Product Image'related='company_id.product_image_target'required=Truestring='Default Product Image'
No public methods.