It is possible to get the current record id using xml?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Účtovníctvo
- Sklady
- PoS
- Projektové riadenie
- MRP
This question has been flagged
Hi Harsh,
Thanks for your reply.
i have one doubt. What you mean by XML-ID
https://github.com/odoo/odoo/blob/16.0/addons/account/data/account_data.xml
<record id="account_tag_operating" model="account.account.tag">
<field name="name">Operating Activities</field>
<field name="applicability">accounts</field>
</record>
Lets say account.account.tag model if you see in above link "Operating Activities" this record created.
Let's say if you want to directly access this recordset without read or browse or search method use below line to get direct recordset.
self.env.ref("account.account_tag_operating")
account :- module name
account_tag_operating :- xml id
Thanks,
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrácia