Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
7032 Weergaven

Hi,

I have a customer page and contact page also. Customer class is having one2many relation with contact class.

Now I want show the contact name in customer kanban view


<templates>
                        <t t-name="kanban-box">
                            <div class="oe_kanban_global_click o_res_partner_kanban">
                                <div class="o_kanban_tags_section oe_kanban_partner_categories"/>
                                <div class="oe_kanban_details">                                   
                                    <table>
                                       <tr>
                                            <td class="col-sm-5">
                                                <strong class="oe_partner_heading">Customer Name</strong>
                                            </td>
                                            <td>
                                                <field name="name"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="col-sm-5">
                                                <strong>Contact Name</strong>
                                            </td>
                                            <td>
                                                 <field name="contact_ids">
                                                     <form>
                                                         <field name="name"/>
                                                     </form>
                                                 </field>
                                            </td>
                                        </tr>
                                    </table>            
                                </div>
                            </div>
                        </t>
                    </templates>

When i have given like this  I am getting the output as


Customer Name      Sample

Contact Name          (4 records)


How can I view first record name instead of (4 records) ?

Is anyone know?


Avatar
Annuleer
Beste antwoord

Hi,

I have found a module in odoo apps which support one2many field in kanban view.

Please refer this link:  https://apps.odoo.com/apps/modules/11.0/web_one2many_kanban/


Avatar
Annuleer
Beste antwoord

Dear silpa m s,

I think no directly way to make this, but you can define computed field as char depends on contact_ids and then return the  contacts name on it. After that you can replace contacts_ids by the new field on your kanban view.

I hope i helped you..
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
5
jan. 20
3949
1
apr. 18
3518
0
sep. 23
144
2
aug. 23
21384
1
jun. 23
2337