Product Sticker
product_sticker · OCA/product-attribute
-
Security25/25No findings
-
Activity12/25Last human commit 16 months ago
-
Required by20/252 modules depend on it
-
Maturity18/25In 3 Odoo series since 15.0
Heuristic over the facts below, not an audit · How it's computed
Description
With this module you can add stickers (aka Images) to Product Attributes, Product Attributes Values or Categories. Also you can put a text below the sticker if you want.
A sticker could be the image of a stamps, certifications or other images related to a product (but not the image of a product) or an attribute or a value of an attribute to use for reports o other places in Odoo. For example: ISO, Ecology, Security, Resistance, etc.
This module by itself does not do anything, it is a base module to be extended by other modules.
A general use case is: we have the use case than depending of the attribute of the product or the value of the product it is mandatory legally print the sticker in Delivery slip of stock picking.
A specific example of use case: when selling ecological products, the European Union makes it mandatory to print official ECO Logo in pickings, and this depends on the product attribute or values. An apple could be ecologic or not and depending the attribute this should be printed or not.
Dependencies
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- account_invoice_report_product_sticker, stock_picking_report_product_sticker
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 9
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
product_attribute_view_form |
product.attribute.sticker.form | product.attribute | form | Inherits product.product_attribute_view_form |
product_normal_form_view |
product.product.sticker.form | product.product | form | Inherits product.product_normal_form_view |
product_sticker_form_view |
product.sticker.form.view | product.sticker | form | New |
product_sticker_kanban_view |
product.sticker.kanban.view | product.sticker | kanban | New |
product_sticker_list_view |
product.sticker.list.view | product.sticker | list | New |
product_sticker_search_view |
product.sticker.search.view | product.sticker | search | New |
product_template_form_view |
product.template.common.sticker.form | product.template | form | Inherits product.product_template_form_view |
product_variant_easy_edit_view |
product.product.view.form.easy | product.product | form | Inherits product.product_variant_easy_edit_view |
report_sticker_template |
report_sticker_template | ir.ui.view | qweb | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 6
-
sticker_idsOne2manyinverse_name='product_attribute_id'
No public methods.
-
sticker_idsOne2manyinverse_name='product_attribute_value_id'
No public methods.
No new fields.
Public methods (2)-
action_view_stickers(self)Action to open the Stickers related to this Product -
get_product_stickers(self, extra_domain=None)@api.returns('product.sticker')Product Stickers related to this Product Variant and its Template for certain models
-
available_model_idsMany2many → ir.modelcomodel_name='ir.model'help='Models where this sticker is available. Empty means all models.'string='Available Models' -
company_idMany2one → res.companycomodel_name='res.company'default=<expr>string='Company' -
image_1920Imagerequired=True -
image_64Imagemax_height=64max_width=64related='image_1920'store=Truestring='Small Image' -
image_sizeSelectiondefault='64'help='Max size of the Sticker. Max Width x Max Height'required=Trueselection=[('64', '64x64 px'), ('128', '128x128 px'), ('256', '256x256 px'), ('512', '512x512 px'), ('1024', '1024x1024 px'), ('1920', '1920x1920 px')] -
nameCharrequired=Truetranslate=True -
noteTexthelp='Used to display a note with the sticker'translate=True -
product_attribute_idMany2one → product.attributecomodel_name='product.attribute'ondelete='cascade'string='Attribute' -
product_attribute_value_idMany2one → product.attribute.valuecomodel_name='product.attribute.value'domain="[('attribute_id', '=', product_attribute_id)]"ondelete='cascade'string='Attribute value' -
product_category_idMany2one → product.categorycomodel_name='product.category'ondelete='cascade'string='Category' -
sequenceIntegerdefault=10index=True -
show_sticker_noteBooleanhelp='If checked, the note will be displayed with the sticker'string='Sticker Note'
-
get_image(self)Get the image of the sticker
-
sticker_countIntegercompute='_compute_sticker_count'store=True -
sticker_idsOne2many → product.stickercomodel_name='product.sticker'domain=<expr>string='Product Stickers'
No public methods.
No new fields.
Public methods (1)-
action_view_stickers(self)Action to open the Stickers related to this Product Template
Loading…
Loading…
Loading…