December 2018
Beginner to intermediate
404 pages
10h 14m
English
An XML file can also execute arbitrary methods during its load process through the <function> element. This can be used to set up demo and test data.
For example, the Notes app, which is bundled with Odoo, uses it to set up demonstration data:
<data noupdate="1"> <function model="res.users" name="_init_data_user_note_stages" eval="[]" /></data>
This calls the _init_data_user_note_stages method of the res.users Model, passing no arguments. The argument list is provided by the eval attribute, which is an empty list in this case.
Read now
Unlock full access