In steps 1 and 2, we registered a new type of view, called m2m_group, in ir.ui.view and ir.actions.act_window.view.
In step 3, we added the get_m2m_group_data method in the base. Adding this method in the base will make that method available in every model. This method will be called via an RPC call from the JavaScript view. The view will pass two parameters—the domain and m2m_field. In the domain argument, the value of the domain will be the domain generated with a combination of the search view domain and the action domain. The m2m_field is the field name by which we want to group the record. This field will be set on the view definition.
In the next few steps, we added the JavaScript files that are required to form the ...