<img alt="License" src="https://img.shields.io/badge/licence-AGPL--3-blue.svg">
<a name="restrict-analytic-journal-on-company"></a>
<h2>Restrict Analytic Journal on Company</h2>
<p>This module prevents users from creating journals for a company that refer
to an analytic journal of another company.</p>
<p>Both the chart of accounts and analytic accounts should be kept strictly
separate for different companies.</p>
<a name="installation"></a>
<h3>Installation</h3>
<p>After installing this module no more journals can be created that refer to
the analytic journals of another company. However existing wrong
configurations are not (and cannot be) automatically corrected. To check
wether such wrong configurations exist use the following SQL:</p>
<p><a href="#id1"><span class="problematic" id="id2">``</span></a>`
# select</p>
<blockquote>
aj.id, aj.name, aj.company_id,
aaj.id, aaj.name, aaj.company_id, rc.name</blockquote>
<p>from account_journal aj
join account_analytic_journal aaj on aj.analytic_journal_id = aaj.id
join res_company rc on aj.company_id = rc.id
where aj.company_id != aaj.company_id;
<a href="#id3"><span class="problematic" id="id4">``</span></a><a href="#id5"><span class="problematic" id="id6">`</span></a></p>
<a name="known-issues-roadmap"></a>
<h3>Known issues / Roadmap</h3>
<p>None at the moment.</p>
<a name="bug-tracker"></a>
<h3>Bug Tracker</h3>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-analytic/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 smash it by providing detailed
and welcomed feedback.</p>
<a name="credits"></a>
<h3>Credits</h3>
<a name="contributors"></a>
<h4>Contributors</h4>
<ul class="simple">
<li>Ronald Portier <<a class="reference external" href="mailto:ronald@therp.nl">ronald@therp.nl</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>