I would like to set default income/expense currency exchange account for example from the _default in the code. Is it possible to set the link from an account.account.template to an account.account ? Because I know the template external id, and there is no account external id.
Yes, you can use
search attribute to look up the account using the name instead of xml id.
<record id="base.main_company" model="res.company"> <field name="income_currency_exchange_account_id" search="[('name', '=', 'Currency Exchange Gain')]" /> <field name="expense_currency_exchange_account_id" search="[('name', '=', 'Currency Exchange Loss')]" /> </record>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 3/26/13, 7:39 AM|
|Seen: 1104 times|
|Last updated: 3/16/15, 8:10 AM|