How it works...

This time, we used the generic XML code for any type of record, that is, the record element with the required id and model attributes. As earlier, the id attribute is an arbitrary string that must be unique for your addon. The model attribute refers to the name of the model you want to create. Given that we want to create a view, we need to create a record of the ir.ui.view model. Within this element, you set fields as defined in the model you chose via the model attribute. For ir.ui.view, the crucial fields are model and arch. The model field contains the model you want to define a view for, while the arch field contains the definition of the view itself. We'll come to its contents in a short while.

The name field, while not strictly necessary, is helpful when debugging problems with views, so set it to some string that tells you what this view is intended to do. This field's content is not shown to the user, so you can fill in all the technical hints to yourself that you deem sensible. If you set nothing here, you'll get a default containing the model name and view type.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.39.142