Enable Dark Mode!
how-to-configure-the-kanban-list-activity-widget-in-odoo-15.jpg
By: Nila UJ

How to Configure the Kanban & List Activity Widget in Odoo 15

Technical Odoo 15

Kanban activity widget

The kanban activity widget is mainly used in the case of the Kanban view. The field should be specified first, and after that, it should be given in the corresponding view. This is a widget that is mainly used in the kanban view. The main purpose is to schedule the activities in the kanban view that can be done with this widget's help. For this purpose, we have to use the kanban_activity widget in Odoo. It is a widget that is simply defined like widget=” kanban_activity.” 

This blog goes into detail about the widget in Odoo.

1. Why exactly is the kanban_activity widget used in Odoo?

2. Kanban activity widget for kanban view

3. List activity widget for tree view.

What is the purpose of the Kanban activity widget?

There are various different types of widgets available in Odoo. The more useful one is the kanban_activity widget. The main goal of this widget is to schedule activities that should be represented with a symbol. This makes it easy for a user to understand and makes it easier to use. It will help to represent scheduled activities with different colors. Each color represents the days that should be completed. Hence it has got the name kanban activity. The activities should be represented with the help of this widget. 

Kanban activity widget for kanban view

There are mainly two types of activity widgets. One is the kanban activity, and the other one is the list activity widget. The kanban activity widget is used in the case of the kanban view. Inside the kanban view, it will be displayed shortly. It is very easy to understand for a new user. It will be displayed as a symbol on the kanban card view and will help to make a remainder.

In order to use this widget, we have to inherit both the mail.thread and mail.activity.mixin. After inheriting, we have to specify a Form view and a Kanban view.

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosysCreate Fields and models

In the following example, a new custom model should be created. Over there, we have to specify the necessary fields. 

class Kanban(models.Model):
   _name = "kanban.activity.new"
   _inherit = ['mail.thread', 'mail.activity.mixin']
   _description = 'kanban_list'
   file_name = fields.Char(string="File Name")
   customer = fields.Many2one('res.partner', string="Customer")
   date_order = fields.Datetime(string='Order Date',
                                required=True,
                                readonly=True,
                                index=True,
                                copy=False,
                                      default=fields.Datetime.now)

Create a kanban view

Create a kanban view and specify the necessary fields. Along with the fields, we have to add an additional field in order to specify the activity. It will be shown like a symbol, which helps to schedule the activity easily.

<record id="handle_kanban" model="ir.ui.view">
   <field name="name">kanban.activity.new</field>
   <field name="model">kanban.activity.new</field>
   <field name="arch" type="xml">
       <kanban class="o_kanban_mobile">
           <field name="file_name"/>
           <field name="customer"/>
           <field name="date_order"/>
           <templates>
               <t t-name="kanban-box">
                   <div t-attf-class="oe_kanban_global_click">
                       <b>
  <div style="font-size:20px;"
                         class="o_kanban_image_fill_top">
    <field name="file_name">
     </field>
      <br></br>
       <field name="customer"/>
        <div class="o_kanban_record_bottom">
         <div class="oe_kanban_bottom_left text-muted">
          <span>
           <t t-esc="record.date_order.value"/>
            </span>
             </div>
              </div>
             <field name="activity_ids" widget="kanban_activity"/>
              </div>
             <br/>
           </b>
         </div>
       </t>
     </templates>
   </kanban>
 </field>
</record>

OUTPUT,

First of all, we have to fill the corresponding fields with values.

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys


how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys

Then the corresponding kanban view should be like this, in this kanban view, clearly defined fields with activity ids. These activity ids should be like a symbol.

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys

Whenever we click this symbol, it will be shown like this. A pop-up window should appear, and we can easily schedule the activity over here.

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys

Here we should specify the activity type. There are mainly five types of activity types, and they will be selected from here. After scheduling the activity, it will be displayed like this.

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys

List activity widget for tree view

In the previous case, we discussed how to use the kanban activity widget in Odoo.

Now let us discuss the list activity widget. It is also similar to the kanban activity widget. The list activity widget is also used in the case of a tree view. This feature inside the tree view is to track the scheduled activity. Whenever we click this window, it will be navigated to the other window, and we can schedule the activity and make a remainder for this activity. 

Create a Tree view

First of all, create a new model with the necessary fields. After that, create a tree view. In that tree view, specify the necessary fields.

<record id="list_activity_tree" model="ir.ui.view">
      <field name="name">kanban</field>
      <field name="model">kanban.activity.new</field>
      <field name="arch" type="xml">
          <tree>
              <field name="file_name"/>
              <field name="customer"/>
              <field name="date_order"/>
              <field name="activity_ids" widget="list_activity" optional="show"/>
          </tree>
      </field>
   </record>

In this view specified four fields. File name, customer, date, and activity_ids. These activity_ids should be specified with a widget. That widget helps to show the symbol for the remainder. Also, don’t forget to define the form view as shown below.

<record id="list_activity_form" model="ir.ui.view">
      <field name="name">form</field>
      <field name="model">kanban.activity.new</field>
      <field name="arch" type="xml">
          <form>
              <sheet>
                  <group>
                      <group>
                          <field name="file_name"/>
                          <field name="customer"/>
                          <field name="date_order"/>
                      </group>
                  </group>
              </sheet>
              <div class="oe_chatter">
                  <field name="message_follower_ids"/>
                  <field name="activity_ids"/>
                  <field name="message_ids"/>
              </div>
          </form>
      </field>
   </record>

OUTPUT

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys


how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys

Here we have to schedule the activity. Whenever we click this, it will be redirected to the very next tab and this will be shown like the image given below.

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys

After scheduling the activity, save the activity. In this case, the call is the activity.

how-to-configure-the-kanban-list-activity-widget-in-odoo-15-cybrosys

This is how we can schedule the activity with the help of the list activity widget in Odoo 15. This makes it very easy to make remainders. It can be set both in the kanban view and tree view with the help of the widgets.


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment



whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message