跳至内容
菜单
此问题已终结
2 回复
6993 查看

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
3942
1
4月 18
3508
0
9月 23
144
2
8月 23
21356
1
6月 23
2310