Author: |
Akretion,Odoo Community Association (OCA) |
License: |
AGPL-3 |
Branch: |
16.0-attribute_set-sbj |
Repository: |
acsone/odoo-pim |
Dependencies: |
base,
and
base_sparse_field |
Languages: |
HTML (362, 20.1%),
Python (913, 50.6%),
XML (454, 25.2%),
and
reStructuredText (75, 4.2%) |
Other branches: |
10.0,
10.0-abi_master,
10.0-attr-fix,
10.0-attr_comp_dep-cpi,
10.0-bck-attribute_set-dro,
10.0-bck-attribute_set_mass_edit-dro,
10.0-bck-attribute_set_searchable-dro,
10.0-bck-pim-dro,
10.0-bck-pim_completeness-dro,
10.0-bck-product_attribute_set-dro,
10.0-bck-product_search-dro,
10.0-comp-fi-cpi,
10.0-completeness-speed,
10.0-fix-attribute_set_completness_model-dro,
10.0-fix-attribute_set_owner_view-dro,
10.0-imp-def_attribute_set-dro,
10.0-imp-mass_editing-dro,
10.0-imp-product_completeness-dro,
10.0-pim_action-cpi,
10.0-pimview,
10.0-trnslt-len,
10.0-update-pre-commit-sbi,
12.0,
12.0-attribute_massedit-cpi,
12.0-attrs-fix,
12.0-pim_completeness-cpi,
12.0-pimview,
12.0-pin-flake8,
12.0-product_search,
13.0,
13.0-41-port,
13.0-atribute_widget_field-qgr,
13.0-attrs-fix,
13.0-mig-attribute_set-dro,
13.0-mig-pim-dro,
13.0-mig-product_attribute_set-dro,
13.0-pimview,
13.0-tnc_master,
13.0-wpu_master,
14-attribute_set_completeness-add_migration,
14-attribute_set_completeness-rename_fields-xbo,
14-attribute_set_completeness-xbo,
14-odoo_pim-fix,
14-pim_glue_modules,
14-product_attribute_set_completeness-xbo,
14-product_search_multi_value-xbo,
14.0,
14.0-abi_master,
14.0-completion-stored,
14.0-prod_seq-cpi,
and
cpi_comp_dep |
Other repositories: |
agrista/odoo-pim,
akretion/odoo-pim,
emyllymaki/odoo-pim,
and
shopinvader/odoo-pim |
<h1 class="title">Attribute Set</h1>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/odoo-pim/tree/15.0/attribute_set"><img alt="OCA/odoo-pim" src="https://img.shields.io/badge/github-OCA%2Fodoo--pim-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/odoo-pim-15-0/odoo-pim-15-0-attribute_set"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/295/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows the user to create Attributes to any model.
This is a basic module in the way that <strong>it does not provide views to display these new Attributes.</strong></p>
<p>Each Attribute created will be related to an <strong>existing field</strong> (in case of a <em>"native"</em> Attribute) or to a newly <strong>created field</strong> (in case of a <em>"custom"</em> Attribute).</p>
<p>A <em>"custom"</em> Attribute can be of any type : Char, Text, Boolean, Date, Binary... but also Many2one or Many2many.</p>
<p>In case of m2o or m2m, these attributes can be related to <strong>custom options</strong> created for the Attribute, or to <strong>existing Odoo objects</strong> from other models.</p>
<p>Last but not least an Attribute can be <strong>serialized</strong> using the Odoo SA module <a class="reference external" href="https://github.com/odoo/odoo/tree/12.0/addons/base_sparse_field">base_sparse_field</a> .
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), <strong>increasing significantly the requests speed</strong> when dealing with thousands of Attributes.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<a name="usage"></a>
<h2><a class="toc-backref" href="#id1">Usage</a></h2>
<p>Even if this module does not provide views to display some model's Attributes, it provides however a Technical menu in <em>Settings > Technical > Database Structure > Attributes</em> to <strong>create new Attributes</strong>.</p>
<p>An Attribute is related to both an Attribute Group and an Attribute Set :</p>
<ul>
<li><p class="first">The <strong>Attribute Set</strong> is related to the <em>"model's category"</em>, i.e. all the model's instances which will display the same Attributes.</p>
</li>
<li><p class="first">The <strong>Attribute Group</strong> is related to the <em>"attribute's category"</em>. 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.</p>
<blockquote>
<p>🔎 In order to create a custom Attribute many2one or many2many related to <strong>other Odoo model</strong>, you need to activate the Technical Setting <strong>"Advanced Attribute Set settings"</strong> (<code class="code">group_advanced_attribute_set</code>).</p>
</blockquote>
</li>
</ul>
<hr class="docutils" />
<p>If you want to create a module displaying some specific model's Attributes :</p>
<ol class="arabic simple">
<li>Your model must <strong>_inherit the mixin</strong> <code class="code">"attribute.set.owner.mixin"</code></li>
<li>You need to <strong>add a placeholder</strong> <code class="code"><separator name="attributes_placeholder" /></code> at the desired location in the model's form view.</li>
<li>Finally, <strong>add a context</strong> <code class="code">{"include_native_attribute": True}</code> 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.</li>
</ol>
<a name="bug-tracker"></a>
<h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/odoo-pim/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/odoo-pim/issues/new?body=module:%20attribute_set%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
<a name="credits"></a>
<h2><a class="toc-backref" href="#id3">Credits</a></h2>
<a name="authors"></a>
<h3><a class="toc-backref" href="#id4">Authors</a></h3>
<ul class="simple">
<li>Akretion</li>
</ul>
<a name="contributors"></a>
<h3><a class="toc-backref" href="#id5">Contributors</a></h3>
<ul class="simple">
<li>Sébastien BEAU <<a class="reference external" href="mailto:sebastien.beau@akretion.com">sebastien.beau@akretion.com</a>></li>
<li>Clément Mombereau <<a class="reference external" href="mailto:clement.mombereau@akretion.com.br">clement.mombereau@akretion.com.br</a>></li>
<li>Benoît Guillot <<a class="reference external" href="mailto:benoit.guillot@akretion.com">benoit.guillot@akretion.com</a>></li>
<li>Akretion Raphaël VALYI <<a class="reference external" href="mailto:raphael.valyi@akretion.com">raphael.valyi@akretion.com</a>></li>
<li>David Dufresne <<a class="reference external" href="mailto:david.dufresne@savoirfairelinux.com">david.dufresne@savoirfairelinux.com</a>></li>
<li>Denis Roussel <<a class="reference external" href="mailto:denis.roussel@acsone.eu">denis.roussel@acsone.eu</a>></li>
</ul>
<a name="maintainers"></a>
<h3><a class="toc-backref" href="#id6">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/odoo-pim/tree/15.0/attribute_set">OCA/odoo-pim</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>