You can create all type of records from XML files, but sometimes it is difficult to generate data that includes some business logic. You might want to modify records when a user installs a dependent module in production. For example, let's say you want to create a module to display books online. The my_library module already has an image-cover field. Imagine that, in the new module, you implemented logic to reduce the size of the image and stored it in the new thumbnail field. Now, when the user installs this module, they might already have books and images. It is not possible to generate thumbnails from the <record> tags in the XML file. In this case, you can invoke the model method through the <function> tag.
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine