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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Project
- MRP
Bu soru işaretlendi
1
Cevapla
5648
Görünümler
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>
Thank you !
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Olİlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
|
2
Nis 24
|
1876 | ||
|
0
Oca 24
|
1046 | ||
|
2
Ara 19
|
7053 | ||
|
0
Mar 15
|
4374 | ||
|
0
Mar 15
|
3990 |