Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Product
  3. Product Attribute Model Link v 16.0
  4. Sales Conditions FAQ

Product Attribute Model Link

by Cetmix https://github.com/OCA/product-attribute , Odoo Community Association (OCA) https://github.com/OCA/product-attribute
Odoo
v 16.0 Third Party 19
Download for v 16.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Community Apps Dependencies Show
Product Attribute Archive
Lines of code 513
Technical Name product_attribute_model_link
LicenseAGPL-3
Websitehttps://github.com/OCA/product-attribute
You bought this module and need support? Click here!

Product Attribute Model Link

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

This module allows to link product attributes to models and populate attribute values from the model records and vice versa.

When a record is created in a model that is linked to an attribute new attribute value will be created automatically.

When a record that is linked to an attribute value is deleted linked attribute value will be deleted if it is not used or archived otherwise.

If a related record field value linked to an attribute value is updated the attribute value name is updated accordingly.

If a module that implements a model linked to attribute(s) is uninstalled all the linked attribute values remain in place.

Table of contents

  • Use Cases / Context
  • Configuration
  • Usage
  • Bug Tracker
  • Credits
    • Authors
    • Contributors
    • Maintainers

Use Cases / Context

Sometimes you would like to create product variants based on other model values.

For example you have a “T-Shirt” product in which two attributes are used among others: “design” and “material”.

At the same time you store information about both of them in your db in the dedicated models.

“Design” model keeps the information about image print name, image print category, image author and stores the image file.

“Material” model keeps the information about material name, material type (synthetic/natural), material density and stores a handling instruction in pdf.

Using the regular Odoo flow one will need to create attributes for design and materials and then add values to them.

Eg “Material: cotton, silk, wool”, “Design: Fancy Clown, Doge, Pepe, See beach”

And also add the same records to the “Materials” and “Design” models.

Configuration

Go to the “Inventory/Configuration/Products/Attributes” menu and select an existing or create a new attribute.

Following configuration fields are available:

  • Linked Model. Model which records will be used for the attribute values. Cannot be a transient model. Warning: changing or removing existing value will not affect existing attribute values!
  • Linked Field. Field of the selected model that will be used for the attribute value names. Can be any field except for related or computed non-stored ones. Digital field values will be converted to Char automatically. Warning: changing or removing existing value will not affect existing attribute values!
  • Domain (optional). If configured only records matching the domain will be used for attribute value creation. Warning: updating domain will not affect existing attribute values!
  • Add to Products on Create. If enabled when a new attribute value is created it will be automatically added to all existing products that use this attribute. Attention! You must completely understand possible consequences and use this option with care!
  • Create from Attribute Values. If enabled when a new attribute value is added to the attribute a new record will be created in the linked model. Attention! The only value passed explicitly on creation will be the linked field containing the new attribute value name. You must ensure that this would be enough for new record creation. Otherwise an exception will be raised. If a digital field is used a conversion attempt will be done. If conversion fails an exception might be raised.
  • Modify from Attribute Values. If enabled when an attribute value is renamed linked field value in the linked model will be updated accordingly. If a digital field is used a conversion attempt will be done. If conversion fails an exception might be raised. This option is available only if “Create from Attribute Values” option is enabled.
  • Delete when Attribute Value is Deleted. When enabled if an attribute value is deleted linked record will be deleted too. Use with extreme care! This option is available only if “Create from Attribute Values” option is enabled.

Creating, modifying or deleting related records from attributes requires corresponding access rights to linked model. Otherwise access error will occur.

There is no “Attribute/Model” restriction so you can link several attributes to the same model. You can use same records and fields or apply custom domains to fine tune such mappings.

When adding a model mapping to an attribute with existing values you can map those manually in the attribute value list.

Usage

Create, modify or delete a record in a model that is linked to an attribute(s). Linked attribute values will be added, modified, deleted or archived accordingly.

Create, modify or delete an attribute value. Linked model records will be modified accordingly in case such options are enabled for the attribute.

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

  • Cetmix

Contributors

  • Cetmix:
    • Ivan Sokolov
    • Angelina Anakievska

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.

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.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with