We will improve the library_checkout
module we have been working with to add the Kanban view to the library checkouts.
For this, we'll use a new data file, library_checkout/views/checkout_kanban_view.xml
. We need to edit the data
key in the __manifest__.py
descriptor file to append this new data file at the end of the list.
In library_checkout/views/library_menu.xml
, we can find the window action used in the checkout menu item. We need to make a change to it to enable the additional view types we'll add in this chapter:
<act_window id="action_library_checkout"
name="Checkouts"
res_model="library.checkout"
view_mode="kanban,tree,form,activity,calendar,graph,pivot"
/>
Here, we modify the menu action to include kanban
at the beginning of the view_mode
list, so that it's the default view mode used. We then add the kanban
view record. It's similar to the other views, except that, inside the arch
field, we have a <kanban>
top XML element...