Repository
OCA/storage · module folder · Try on Runboat
Module version
1.0.1
Category
Storage
Folder size
0.09 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/storage
Last tracking update
2026-08-07 09:06:26
Authors
Akretion, Odoo Community Association (OCA)
Maintainers
Akretion, Odoo Community Association (OCA)
Committers
Stéphane Bidoul, Laurent Mignon (ACSONE)
Odoo dependencies
Python dependencies
python_slugify, cachetools
System dependencies
None
Required by
None
Description
Attach images to products and categories

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
image_tag_view_form image.tag form New
image_tag_view_search image.tag search New
image_tag_view_tree image.tag list New
product_category_form_view product.category form Inherits product.product_category_form_view
product_category_image_relation_form category.image.relation form Inherits storage_image.view_storage_image_abstract_form
product_category_image_relation_kanban category.image.relation kanban Inherits storage_image.view_storage_image_abstract_kanban
product_image_relation_form product.image.relation form Inherits storage_image.view_storage_image_abstract_form
product_image_relation_kanban product.image.relation kanban Inherits storage_image.view_storage_image_abstract_kanban
product_kanban_view product.product kanban Inherits product.product_kanban_view
product_normal_form_view product.product form Inherits product.product_normal_form_view
product_template_kanban_view product.template kanban Inherits product.product_template_kanban_view
product_template_only_form_view product.template form Inherits product.product_template_only_form_view
product_variant_easy_edit_view product.product Inherits product.product_variant_easy_edit_view
storage_image_view_form storage.image form Inherits storage_image.storage_image_view_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (8)

New fields (2)
  • category_id Many2one → product.category
    index=True ondelete='cascade' required=True args: 'product.category'
  • tag_id Many2one → image.tag
    domain=[('apply_on', '=', 'category')] index=True string='Tag' args: 'image.tag'
Public methods (0)

No public methods.

New fields (6)
  • apply_on Selection
    default=<expr> selection=[('product', 'Product'), ('category', 'Category')]
  • categ_img_rel_ids One2many → category.image.relation
    comodel_name='category.image.relation' inverse_name='tag_id' string='Category Image Relations'
  • name Char
    required=True
  • product_categ_count Integer
    compute='_compute_product_categ_count' string='# of Categories'
  • product_img_rel_ids One2many → product.image.relation
    comodel_name='product.image.relation' inverse_name='tag_id' string='Product Image Relations'
  • product_tmpl_count Integer
    compute='_compute_product_tmpl_count' string='# of Products'
Public methods (2)
  • action_open_product_categories(self)
  • action_open_product_templates(self)

New fields (1)
  • image_ids One2many → category.image.relation
    inverse_name='category_id' args: 'category.image.relation'
Public methods (0)

No public methods.

New fields (4)
  • attribute_value_ids Many2many → product.attribute.value
    domain="[('id', 'in', available_attribute_value_ids)]" string='Attributes' args: 'product.attribute.value'
  • available_attribute_value_ids Many2many → product.attribute.value
    compute='_compute_available_attribute' string='Available Attributes' args: 'product.attribute.value'
  • product_tmpl_id Many2one → product.template
    index=True ondelete='cascade' required=True args: 'product.template'
  • tag_id Many2one → image.tag
    domain=[('apply_on', '=', 'product')] index=True string='Tag' args: 'image.tag'
Public methods (0)

No public methods.

New fields (4)
  • main_image_id Many2one → storage.image
    compute='_compute_main_image_id' store=True args: 'storage.image'
  • variant_image_ids Many2many → product.image.relation
    compute='_compute_variant_image_ids' store=True string='Variant Images' args: 'product.image.relation'
  • variant_image_medium_url Char
    related='main_image_id.image_medium_url' string='Variant main medium image URL'
  • variant_image_small_url Char
    related='main_image_id.image_small_url' string='Variant main small image URL'
Public methods (0)

No public methods.

New fields (4)
  • image_ids One2many → product.image.relation
    comodel_name='product.image.relation' inverse_name='product_tmpl_id' string='Images'
  • image_medium_url Char
    related='main_image_id.image_medium_url' string='Main medium image URL'
  • image_small_url Char
    related='main_image_id.image_small_url' string='Main small image URL'
  • main_image_id Many2one → storage.image
    comodel_name='storage.image' compute='_compute_main_image_id' store=True
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • write(self, values)

New fields (2)
  • category_relation_ids One2many → category.image.relation
    inverse_name='image_id' string='Categories' args: 'category.image.relation'
  • product_relation_ids One2many → product.image.relation
    inverse_name='image_id' string='Products' args: 'product.image.relation'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…