Skip to main content
Odoo Community Association

Product Import Autocomplete Attribute

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

This module updates the attribute lines of product templates when importing product variants.

Natively, product template attribute values are synced from the template to its variants, but the reverse is not true:

  • the base method product_template.create_variant_ids() uses the template attributes to create the variants (template -> variant)

  • this module uses the attributes of the imported variants to update the attribute values of the linked template (variant -> template)

Table of contents

Configuration

Install this module and the purchase or sale module to get product menus.

Prepare CSV files to import variants with attribute values which are not available on their related product template.

Usage

In order to better test and illustrate this module, example CSV files are provided in the example folder to import some variants (you will need the demo data).

The demo data provides 2 attributes, each with 3 possible values:

  • Cut: Short sleeves, Long sleeves, Tanktop

  • Embroidery: Cheap, High quality, Average

At the beginning, the product template “T-shirt” declares only one attribute with two values:

Cut: Short sleeves, Long sleeves

image1

Its variants are:

  1. Cut: Short sleeves

  2. Cut: Long sleeves

First import

Go to the product variants page and import the first CSV file of the example folder. It creates a new “T-shirt” variant: Cut: Tanktop, Embroidery: Cheap.

The template “T-shirt” now declares a new attribute and two new values:

Cut: Short sleeves, Long sleeves, Tanktop
Embroidery: Cheap

image2

Note: the new “Embroidery” attribute has a single value, so Odoo automatically adds “Embroidery: Cheap” to all the existing variants (the two original ones included). Indeed, a variant always carries one value per attribute line of its template.

The variants are now:

  1. Cut: Short sleeves, Embroidery: Cheap

  2. Cut: Long sleeves, Embroidery: Cheap

  3. Cut: Tanktop, Embroidery: Cheap

Second import

Go to the product variants page and import the second CSV file of the example folder. It creates 2 new “T-shirt” variants: Cut: Short sleeves, Embroidery: Average, and Cut: Long sleeves, Embroidery: High quality.

The template “T-shirt” now declares 2 attributes, each with 3 possible values:

Cut: Short sleeves, Long sleeves, Tanktop
Embroidery: Cheap, High quality, Average

image3

The resulting variants of the template are then:

  1. Cut: Short sleeves, Embroidery: Cheap

  2. Cut: Long sleeves, Embroidery: Cheap

  3. Cut: Tanktop, Embroidery: Cheap

  4. Cut: Short sleeves, Embroidery: Average

  5. Cut: Long sleeves, Embroidery: High quality

image4

Note: even if both attributes are configured with Variant Creation: Instantly, importing variants only creates the imported combinations. For example, no Cut: Tanktop, Embroidery: Average variant is created.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Akretion

Contributors

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainer:

bealdav

This module is part of the OCA/product-attribute project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Metadata

Release files for odoo-addon-product-import-autocomplete-attribute 18.0.1.0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo-addon-product-import-autocomplete-attribute 18.0.1.0.0.4
File Interpreter ABI Platform Actions
odoo_addon_product_import_autocomplete_attribute-18.0.1.0.0.4-py3-none-any.whl Python 3 none any Details for odoo_addon_product_import_autocomplete_attribute-18.0.1.0.0.4-py3-none-any.whl

Release files / odoo_addon_product_import_autocomplete_attribute-18.0.1.0.0.4-py3-none-any.whl

Download URL odoo_addon_product_import_autocomplete_attribute-18.0.1.0.0.4-py3-none-any.whl
Size 163.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
990be4fbb2643c34e31b54d9ef905c07652dbc4c41218ec299565f4aed9fec85
BLAKE2b-256 checksum
How to use checksums
aae18f6d098939eda08e846760ef4779b142582cfa4f0559335f1d622f9b166e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for odoo-addon-product-import-autocomplete-attribute 18.0.1.0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

18.0.1.0.0.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page