Chapter 19 - Odoo 15 Development Book

Quick Create

In the Kanban view, using the quick create feature, we can create records directly from the Kanban view. The plus icon that can be seen at top of each group allows us to create and edit records.

Let's check how we can design a quick create Kanban form of our choice.

Follow the below steps to add a custom quick create a form for Kanban.

1. Create a new form of view for the custom module mobile_service_shop with fields that need to be shown in the quick create form.

<record id="mobile_service_view_form_minimal" model="ir.ui.view">
  <field name="name">Field Service Form</field>
  <field name="model">mobile.service</field>
  <field name="arch" type="xml">
    <form>
       <group>
          <field name="name"/>
          <field name="technician_name"/>
          <field name="return_date"/>
       </group>
    </form>
  </field>
</record>

2. In the Kanban view definition, add a quick_create_view attribute where we need to specify the record id of a new form that we created.

<kanban default_group_by="service_state"
quick_create_view="mobile_service_shop.mobile_service_view_form_minimal"
on_create="quick_create">

3. After adding these, upgrade the module. Then click plus icon on the Kanban view. Then we can see the form view like below.

odoo-development-book

4. From here we can add values to the fields, then click on Add button which will quickly create a record.

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