<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.svg">
</a>
<a name="export-define-xml-id"></a>
<h2>Export Define XML ID</h2>
<p>This is a technical module needed to ease the exchange of data between multiple odoo instance.</p>
<p>With this module you can generate xml ids of data based on your own rules.</p>
<p>Or, if you define no rules on a model, it will prefix the xml id with the uid of the database.</p>
<a name="configuration"></a>
<h3>Configuration</h3>
<p>This modules provides no user interface. Rules should be written in python code.</p>
<p>Inherit this module, sublcass a model and define a function '_gen_xml_id'. It should return the new xml id of the record.</p>
<pre>
<code lang="python">class ProductProduct(models.Model):
_inherit = 'product.product'
def _gen_xml_id(self):
name = '%s_%s_%s' % (
self.company_id.name, self.barcode, self.default_code)
return name</code>
</pre>
<a name="usage"></a>
<h3>Usage</h3>
<p>Simply export some records like usual.</p>
<a name="bug-tracker"></a>
<h3>Bug Tracker</h3>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/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>Raphaƫl Reverdy <<a class="reference external" href="mailto:raphael.reverdy@akretion.com">raphael.reverdy@akretion.com</a>></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>