Hello all,
In a custom module, I want to create a new account with this code :
<record id="rounding_account" model="account.account">
<field name="name">Rounding account</field>
<field name="code">5300</field>
<field name="type">regular</field>
<field name="user_type" ref="account.data_account_type_expense"/>
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="????????"/>
</record>
But none of my actual accounts have an external ID. Even if I define manually an external ID for the parent account that I want, the next to install the module will never have the same external ID...
If I want that this module be easy to install on any Odoo server, how to choose the right parent_id, for example account of code 111 in the accounting chart?
UPDATE #1
For the moment, with the answer of Cyrus Waithaka, I get this error :
ParseError: "invalid syntax
('<string>', 1, 7, "[(code='111')]")" while parsing /home/odoo-test/addons_pt/canada_rounding/journal_account_lapagept.xml:11, near
<record id="rounding_account" model="account.account">
<field name="name">Rounding account</field>
<field name="code">53300</field>
<field name="type">Regular</field>
<field name="user_type" ref="account.data_account_type_expense"/>
<field name="reconcile" eval="False"/>
<field name="parent_id" search="[(code='111')]"/>
</record>