Attribute Set
Project description
This module allows the user to create Attributes to any model. This is a basic module in the way that it does not provide views to display these new Attributes.
Each Attribute created will be related to an existing field (in case of a “native” Attribute) or to a newly created field (in case of a “custom” Attribute).
A “custom” Attribute can be of any type : Char, Text, Boolean, Date, Binary… but also Many2one or Many2many.
In case of m2o or m2m, these attributes can be related to custom options created for the Attribute, or to existing Odoo objects from other models.
Last but not least an Attribute can be serialized using the Odoo SA module base_sparse_field . It means that all the serialized attributes will be stored in a single “JSON serialization field” and will not create new columns in the database (and better, it will not create new SQL tables in case of Many2many Attributes), increasing significantly the requests speed when dealing with thousands of Attributes.
Table of contents
Usage
Even if this module does not provide views to display some model’s Attributes, it provides however a Technical menu in Settings > Technical > Database Structure > Attributes to create new Attributes.
An Attribute is related to both an Attribute Group and an Attribute Set :
The Attribute Set is related to the “model’s category”, i.e. all the model’s instances which will display the same Attributes.
The Attribute Group is related to the “attribute’s category”. All the attributes from the same Attribute Set and Attribute Group will be displayed under the same field’s Group in the model’s view.
🔎 In order to create a custom Attribute many2one or many2many related to other Odoo model, you need to activate the Technical Setting “Advanced Attribute Set settings” (
group_advanced_attribute_set
).
If you want to create a module displaying some specific model’s Attributes :
Your model must _inherit the mixin
"attribute.set.owner.mixin"
You need to add a placeholder
<separator name="attributes_placeholder" />
at the desired location in the model’s form view.Finally, add a context
{"include_native_attribute": True}
on the action leading to this form view if the model’s view needs to display attributes related to native fields together with the other “custom” attributes.
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
Contributors
Sébastien BEAU <sebastien.beau@akretion.com>
Clément Mombereau <clement.mombereau@akretion.com.br>
Benoît Guillot <benoit.guillot@akretion.com>
Akretion Raphaël VALYI <raphael.valyi@akretion.com>
David Dufresne <david.dufresne@savoirfairelinux.com>
Denis Roussel <denis.roussel@acsone.eu>
Maintainers
This module is maintained by the OCA.
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/odoo-pim project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file odoo10_addon_attribute_set-10.0.1.0.2.99.dev5-py2-none-any.whl
.
File metadata
- Download URL: odoo10_addon_attribute_set-10.0.1.0.2.99.dev5-py2-none-any.whl
- Upload date:
- Size: 46.5 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a948dcc4a007fc6f28c324ef0a8e934b57ff3ce84e6289a6d39833cf9f40dbe |
|
MD5 | 6ecee0cf8fb2a7ac02d64ec400b5729c |
|
BLAKE2b-256 | 1d529314a509d1654b975b29e83642c4e93b542959bda96698f653a9cc7cc0cb |