跳至內容
選單
此問題已被標幟
2 回覆
7327 瀏覽次數

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?


頭像
捨棄
最佳答案

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/


頭像
捨棄
最佳答案

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..
頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
5
1月 20
4277
1
4月 18
3707
3
7月 25
21999
0
9月 23
144
1
6月 23
2591