Repository
OCA/e-commerce · module folder · Try on Runboat
Module version
1.0.0
Category
Generic Modules
Folder size
1.16 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/e-commerce
Last tracking update
2026-08-10 17:31:07
Authors
ACSONE SA/NV, Odoo Community Association (OCA), GRAP
Maintainers
ACSONE SA/NV, Odoo Community Association (OCA), GRAP
Committers
OCA-git-bot, oca-ci, ilo
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
product_template_multi_link_date_span, product_variant_multi_link
Description
This module extends the functionality of sale module to support links
between products templates.

This module adds two types of links :

- **Cross Selling** : suggest your customer to purchase an additional
  product
- **Up Selling** : suggest your customers to purchase a higher-end
  product, an upgrade, etc.

These types of links are common in e-commerce shops.

It can be used as a base to implement synchronizations with e-commerce.

## Important Note

This module is linking products together (product templates), not
product variants. For that purpose, you can use the module Product Multi
Link (Variants), in the same OCA / e-commerce repository.

Code Analysis

Views touched (7)
XML IDNameModelTypeStatus
product_product_link_form product.template form Inherits product.product_template_only_form_view
product_template_link__search Product.template.link.search product.template.link search New
product_template_link_form Product.template.link.form product.template.link form New
product_template_link_kanban Product.template.link.kanban product.template.link kanban New
product_template_link_tree Product.template.link.list product.template.link list New
product_template_link_type_tree_view product.template.link.type.list (in product_template_multi_link) product.template.link.type list New
product_template_linker_form_view product.template.linker.form (in product_template_multi_link) product.template.linker form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (2)
  • product_template_link_count Integer
    compute='_compute_product_template_link_count' string='Product Links Count'
  • product_template_link_ids One2many → product.template.link
    comodel_name='product.template.link' compute='_compute_product_link_ids' string='Product Links'
Public methods (2)
  • get_links_by_code(self, code)
    Get all active active links maching code for current product.
  • show_product_template_links(self)

New fields (8)
  • is_link_active Boolean
    compute='_compute_is_link_active'
  • left_product_img Image
    related='left_product_tmpl_id.image_128' string='Left Product Image'
  • left_product_tmpl_id Many2one → product.template
    comodel_name='product.template' index=True ondelete='cascade' required=True string='Source Product'
  • link_type_inverse_name Char
    related='type_id.inverse_name'
  • link_type_name Char
    related='type_id.name'
  • right_product_img Image
    related='right_product_tmpl_id.image_128' string='Right Product Image'
  • right_product_tmpl_id Many2one → product.template
    comodel_name='product.template' index=True ondelete='cascade' required=True string='Linked Product'
  • type_id Many2one → product.template.link.type
    comodel_name='product.template.link.type' index=True ondelete='restrict' required=True string='Link type'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (8)
  • code Char
    help='This code allows to provide a technical code to externalsystems identifying this link type' args: 'Technical code'
  • display_name Char
    compute='_compute_display_name'
  • inverse_code Char
    compute='_compute_inverse_code' help='This code allows to provide a technical code to externalsystems identifying this link type' inverse='_inverse_inverse_code' readonly=False store=True args: 'Technical code (inverse)'
  • inverse_name Char
    compute='_compute_inverse_name' inverse='_inverse_inverse_name' readonly=False store=True translate=True
  • is_symmetric Boolean
    default=True help='The relation meaning is the same from each side of the relation'
  • manual_inverse_code Char
  • manual_inverse_name Char
  • name Char
    required=True translate=True
Public methods (2)
  • get_by_code(self, code)
    Get link matching given code. Just a shortcut for a search that can be done very often.
  • write(self, vals)

New fields (3)
  • operation_type Selection
    help='Remove existing links: will remove every existing link on each selected products;\nLink these products: will link all selected products together.' required=True selection=[('unlink', 'Remove existing links'), ('link', 'Link these products')] string='Operation'
  • product_ids Many2many → product.template
    comodel_name='product.template' string='Products'
  • type_id Many2one → product.template.link.type
    comodel_name='product.template.link.type' ondelete='restrict' string='Link type'
Public methods (4)
  • action_apply(self)
  • action_apply_link(self)
    Add link to products. :return: product.template.link recordset
  • action_apply_unlink(self)
    Remove links from products. :return: product.template.link recordset
  • default_get(self, fields_list)
    @api.model
    Inherit default_get to auto-fill product_ids with current context :param fields_list: list of str :return: dict

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…