Search 1.9 billion lines of Odoo code on GitHub

website_field_autocomplete_related

Author: LasLabs, Odoo Community Association (OCA)
License: AGPL-3
Branch: release/10.0/website_field_autocomplete_related
Repository: LasLabs/website
Dependencies: website, and website_field_autocomplete
Languages: JavaScript (59, 22.6%), Python (102, 39.1%), XML (49, 18.8%), and reStructuredText (51, 19.5%)
Other branches: feature/9.0/website_field_autocomplete-relat, release/9.0/laslabs, and release/9.0/website_field_autocomplete_related

<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/license-AGPL--3-blue.svg"> </a> <a name="website-field-autocomplete-related"></a> <h2>Website Field AutoComplete Related</h2> <p>Extends Website Autocomplete field to allow for related fields, for example a form that automatically completes based on search results.</p> <a name="usage"></a> <h3>Usage</h3> <p>To use this module, you would follow the instructions provided in <code>website_field_autocomplete</code>.</p> <p>The only difference is that you would create multiple auto complete fields, then utilize the <code>data-relate-recv</code> attribute to link the fields' data &amp; searches together.</p> <p>If you would like to activate the relation on a non-autocomplete element, you also need to add the <code>data-query-field</code> attribute or match the name of the element to the name of the column.</p> <p>If you would like to send data to a different Relation Group, you can use the <code>data-relate-send</code> attribute. If you utilize this attribute, you will likely also need <code>data-recv-field</code> which will select the field that should be received when it is updated via its receive group.</p> <p>Following is an example:</p> <pre> <code lang="xml">&lt;label for=&quot;name&quot;&gt;Name&lt;/label&gt; &lt;input type=&quot;text&quot; name=&quot;name&quot; class=&quot;js_website_autocomplete&quot; data-query-field=&quot;name&quot; data-relate-recv=&quot;res_partner&quot; data-model=&quot;res.partner&quot; /&gt; &lt;label for=&quot;name&quot;&gt;Phone&lt;/label&gt; &lt;input type=&quot;text&quot; name=&quot;phone&quot; class=&quot;js_website_autocomplete&quot; data-query-field=&quot;phone&quot; data-relate-recv=&quot;res_partner&quot; data-model=&quot;res.partner&quot; /&gt; &lt;label for=&quot;name&quot;&gt;Street&lt;/label&gt; &lt;input type=&quot;text&quot; name=&quot;company&quot; data-query-field=&quot;street&quot; data-relate-recv=&quot;res_partner&quot; /&gt; &lt;label for=&quot;name&quot;&gt;Street 2&lt;/label&gt; &lt;input type=&quot;text&quot; name=&quot;street2&quot; data-relate-recv=&quot;res_partner&quot; /&gt;</code> </pre> <p>Following is a breakdown of the attributes and functions provided:</p> <table class="docutils"> <colgroup> <col width="20%" /> <col width="54%" /> <col width="15%" /> <col width="10%" /> </colgroup> <thead valign="bottom"> <tr><th class="head">Attribute</th> <th class="head">Description</th> <th class="head">Default</th> <th class="head">Required</th> </tr> </thead> <tbody valign="top"> <tr><td>data-relate-recv</td> <td>Receive data updated from fields of this group</td> <td>&nbsp;</td> <td>False</td> </tr> <tr><td>data-relate-send</td> <td>Send data to fields with this group name</td> <td>relate-recv</td> <td>False</td> </tr> <tr><td>data-recv-field</td> <td>Column name to receive data on (from res model)</td> <td>query-field</td> <td>False</td> </tr> </tbody> </table> <a class="reference external image-reference" href="https://runbot.odoo-community.org/runbot/186/10.0"><img alt="Try me on Runbot" src="https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas" /></a> <a name="known-issues-road-map"></a> <h3>Known Issues / Road Map</h3> <ul class="simple"> <li>Eliminate need for second query in <code>main.Website()._get_autocomplete_data</code></li> </ul> <a name="bug-tracker"></a> <h3>Bug Tracker</h3> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/website/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 feedback.</p> <a name="credits"></a> <h3>Credits</h3> <a name="contributors"></a> <h4>Contributors</h4> <ul class="simple"> <li>Dave Lasley &lt;<a class="reference external" href="mailto:dave&#64;laslabs.com">dave&#64;laslabs.com</a>&gt;</li> </ul> <a name="maintainer"></a> <h4>Maintainer</h4> <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>This module is maintained by the OCA.</p> <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>To contribute to this module, please visit <a class="reference external" href="https://odoo-community.org">https://odoo-community.org</a>.</p>