Search 1.9 billion lines of Odoo code on GitHub

generic_tag

Author: Center of Research and Development
License: LGPL-3
Branch: 16.0
Repository: crnd-inc/generic-addons
Dependencies: base, and generic_mixin
Languages: HTML (123, 5.7%), Markdown (8, 0.4%), PO File (1171, 54.7%), Python (433, 20.2%), XML (329, 15.4%), and reStructuredText (76, 3.6%)
Other branches: 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, and 9.0
Other repositories: Guobower/generic-addons, abdalmola-apps/generic-addons, eslammohamed13/generic-addons, katyukha/generic-addons, leodoooca/generic-addons, marcelsavegnago/generic-addons, martinllanos/generic-addons, oycl/generic-addons, royalline1/generic-addons, srekal/generic-addons, tate11/generic-addons, and vidtsin/generic-addons

<a name="generic-tag"></a> <h2>Generic Tag</h2> <p><a class="reference external" href="https://github.com/crnd-inc/generic-addons"><img alt="badge1" src="https://img.shields.io/badge/pipeline-pass-brightgreen.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external" href="https://crnd.pro/doc-bureaucrat-itsm/11.0/en/Generic_Tag_admin_eng"><img alt="badge4" src="https://img.shields.io/badge/docs-Generic_Tag-yellowgreen.png" /></a> <a class="reference external" href="https://crnd.pro/"><img alt="badge5" src="https://img.shields.io/badge/maintainer-CR&amp;D-purple.png" /></a> <a class="reference external" href="https://github.com/crnd-inc/generic-addons/tree/11.0/generic_tag"><img alt="badge6" src="https://img.shields.io/badge/GitHub-Generic_Tag-green.png" /></a></p> <p>Generic Tag is a module developed by the <a class="reference external" href="https://crnd.pro/">Center of Research &amp; Development company</a>. It allows you to create and categorize generic tags (keywords).</p> <p>With these tags in other applications, you can use the logic associated with them (for example, search and filter objects by tags).</p> <p>Integration with other modules is realized with the help of additional modules.</p> <a name="main-features-of-the-generic-tag-module"></a> <h3>Main features of the Generic Tag module:</h3> <ul class="simple"> <li><em>Customize your own categories of tags.</em></li> <li><em>Create and set up your unique (or completely generic) tags.</em></li> <li><em>Associate your products, documents, contacts, etc. with created tags.</em></li> <li><em>Use your tags!</em></li> </ul> <p>More information read in the <a class="reference external" href="https://crnd.pro/doc-bureaucrat-itsm/11.0/en/Generic_Tag_admin_eng/">Generic Tag Module Guide</a>.</p> <p>This module is part of the Bureaucrat ITSM project. You can try it by the references below.</p> <a name="launch-your-own-itsm-system-in-60-seconds"></a> <h3>Launch your own ITSM system in 60 seconds:</h3> <p>Create your own <a class="reference external" href="https://yodoo.systems/saas/template/bureaucrat-itsm-demo-data-95">Bureaucrat ITSM</a> database</p> <p><a class="reference external" href="https://yodoo.systems"><img alt="badge3" src="https://img.shields.io/badge/powered%20by-yodoo.systems-00a09d.png" /></a></p> <a name="usage"></a> <h3>Usage:</h3> <p>To add tags to your model do the folowing simple steps:</p> <ol class="arabic"> <li><p class="first">Add <cite>generic_tag</cite> module as dependency for your addon.</p> </li> <li><p class="first">Use inherit from <cite>&quot;generic.tag.mixin&quot;</cite> to get <em>tags</em> functionality to your model, like:</p> <blockquote> <pre> <code lang="python">class Product(models.Model): _name = &quot;product.product&quot; _inherit = [ &quot;product.product&quot;, &quot;generic.tag.mixin&quot;, ]</code> </pre> </blockquote> </li> <li><p class="first">Add record to taggable models registry:</p> <blockquote> <pre> <code lang="xml">&lt;record model=&quot;generic.tag.model&quot; id=&quot;generic_tag_model_product_product&quot;&gt; &lt;field name=&quot;res_model_id&quot; ref=&quot;product.model_product_product&quot;/&gt; &lt;/record&gt;</code> </pre> </blockquote> </li> <li><p class="first">Now you can use <code>tag_ids</code> field in your views for your model:</p> </li> </ol> <blockquote> <ul> <li><p class="first"><cite>search</cite> view:</p> <pre> <code lang="xml">&lt;field name=&quot;tag_ids&quot;/&gt; &lt;field name=&quot;search_tag_id&quot;/&gt; &lt;!-- For direct searching (items that contain selected tag)--&gt; &lt;field name=&quot;search_no_tag_id&quot;/&gt; &lt;!-- For inverse searching (items that do not contain selected tag)--&gt;</code> </pre> <p>See <cite>search_tag_id</cite> and <cite>search_no_tag_id</cite> fields. These fields add autocompletition on searching by specific tag. <cite>search_tag_id</cite> allows to search for records that contain selected tag. <cite>search_no_tag_id</cite> allows to search for records that have no selected tag.</p> </li> <li><p class="first"><cite>tree</cite> view:</p> <pre> <code lang="xml">&lt;field name=&quot;tag_ids&quot; widget=&quot;many2many_tags&quot; placeholder=&quot;Tags...&quot; options=&quot;{'color_field': 'color'}&quot;/&gt;</code> </pre> </li> <li><p class="first"><cite>form</cite> view:</p> <pre> <code lang="xml">&lt;field name=&quot;tag_ids&quot; widget=&quot;many2many_tags&quot; placeholder=&quot;Tags...&quot; context=&quot;{'default_model': 'product.product'}&quot; options=&quot;{'color_field': 'color'}&quot;/&gt;</code> </pre> <p>Pay attention on context field. This will automatically select correct model on tag creation.</p> </li> </ul> </blockquote> <a name="bug-tracker"></a> <h2>Bug Tracker</h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/crnd-inc/generic-addons/issues">GitHub Issues</a>. In case of trouble, please check there if your issue has already been reported.</p> <a name="maintainer"></a> <h3>Maintainer</h3> <img alt="https://crnd.pro/web/image/3699/300x140/crnd.png" src="https://crnd.pro/web/image/3699/300x140/crnd.png" /> <p>Our web site: <a class="reference external" href="https://crnd.pro/">https://crnd.pro/</a></p> <p>This module is maintained by the <a class="reference external" href="https://crnd.pro/">Center of Research &amp; Development company</a>.</p> <p>We can provide you further Odoo Support, Odoo implementation, Odoo customization, Odoo 3rd Party development and integration software, consulting services. Our main goal is to provide the best quality product for you.</p> <p>For any questions <a class="reference external" href="mailto:info&#64;crnd.pro">contact us</a>.</p>