Hilfe

0

TypeError: Cannot read property 'tag' of undefined - in Kanban View

Avatar
Yoganandam Gopal

I tried to create a simple kanban view.

My Code Below 

Model:

class DoctorDetails(models.Model):
_name = 'doctor.details'
_description = 'Doctor Details'
_rec_name='doctorname'
doctorname = fields.Char(string="Doctor Name")
qualification = fields.Char(string="Qualification")
contactno = fields.Char(string="Contact No")
doctor_address = fields.Char(string="Doctor Address")

View : 

<record id="doctor_details_kanban" model="ir.ui.view">
<field name="name">doctor_details.kanban</field>
<field name="model">doctor.details</field>
<field name="arch" type="xml">
<kanban>

<field name="doctorname"/>
<field name="qualification"/>
<field name="contactno"/>
<field name="doctor_address"/>

<template>
<t t-name="kanban-box">
<div class="oe_kanban_card">
<strong class="o_kanban_record_title">
<field name="doctorname"/>
</strong>

<div t-if="record.qualification.raw_value">
<t t-esc="record.qualification.value"/>
</div>
<div t-if="record.contactno.raw_value">
<t t-esc="record.contactno.value"/>
</div>
<div t-if="record.doctor_address.raw_value">
<t t-esc="record.doctor_address.value"/>
</div>
</div>
</t>
</template>
</kanban>
</field>
</record>

Error :

Traceback:
TypeError: Cannot read property 'tag' of undefined
    at transformQwebTemplate (http://localhost:8076/web/content/1167-e7e27c3/web.assets_backend.js:2516:53)
    at Class.init (http://localhost:8076/web/content/1167-e7e27c3/web.assets_backend.js:2522:922)
    at Class.prototype.<computed> [as init] (http://localhost:8076/web/content/1058-e416b40/web.assets_common.js:4620:488)
    at new Class (http://localhost:8076/web/content/1058-e416b40/web.assets_common.js:4621:65)
    at Class.getRenderer (http://localhost:8076/web/content/1167-e7e27c3/web.assets_backend.js:340:1833)
    at http://localhost:8076/web/content/1167-e7e27c3/web.assets_backend.js:340:1313
    at async Promise.all (index 0)
    at async Class.getController (http://localhost:8076/web/content/1167-e7e27c3/web.assets_backend.js:1260:569)

kindly do needful


1 Kommentar
Avatar
Verwerfen
Avatar
Begineer
-

Hi ,

Check whether you have mention kanban in your view_mode in act_window and try using any kanban class like

class="o_kanban_mobile" in kanban view,

<kanban class="o_kanban_mobile">

</kanban>