How it works...

In the first two steps, we added new model and security rules for tags. In the third step, we added a few fields in the rent model.

In step 4, we added those fields in the form view. Note that we used the priority widget on the popularity field, which displays the selection field with star icons. In the tag_ids field, we used the many2many_tags widget, which displays the many2many field in the form of tags. The color_field option is passed to enable the color feature on tags. The value of this option will be the field name where the color index is stored. The no_create_edit option will disable the feature of creating new tags via the form view.

In step 5, we improved lots of things. On the kanban card, we added t-attf-class="#{kanban_color(record.color.raw_value)}. This will be used to display the color of the kanban card. It uses the value of the color field and generates a class based on that value. For example, if a kanban record has the value 2 in the color field, it will add kanban_color_2 in the class. After that, we added a drop-down menu to add options such as Edit, Delete, and the kanban color picker. The edit and delete options are only displayed if the user has proper access rights.

Finally, we added tags and priority to the kanban card. After adding all of this, the kanban card will look like the following screenshot:

With this card design, you will able to set popularity stars and colors directly from the kanban card.

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

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