是否可以在Odoo的看板视图中显示One2many字段? [英] Is it possible to show an One2many field in a kanban view in Odoo?

查看:619
本文介绍了是否可以在Odoo的看板视图中显示One2many字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能在Odoo的看板视图中显示一个One2many字段(请注意,我并不是在模板或报表中谈论Qweb,而仅是在看板视图中谈论Qweb).

I would like to know if it's possible to show a One2many field in a kanban view in Odoo (note that I'm not talking about Qweb in templates or reports, only about Qweb in kanban views).

我有一个模型,其中有一个名为other_contact_ids的One2many字段.我想在看板视图中显示每个联系人的姓名:

I have a model which has a One2many field named other_contact_ids. I want to show the name of each contact in the kanban view:

<t t-foreach="record.other_contact_ids.raw_value" t-as="contact">
   <p>
      <t t-esc="contact.name"/>
   </p>
</t>

我遇到了错误,因为t-as仅将对象的ID存储在contact中,而不是存储整个对象及其字段.

I'm getting an error, because the t-as is storing only the ID of the objects in contact instead of storing the whole object with its fields.

我认为这可能与我之前做过的另一个问题密切相关:

And I think that may be this problem is much related to another question I did earlier: How to use the dot notation in a kanban view in Odoo?

我当然尝试了很多方法,例如不使用raw_value.然后它向我显示了标记字段的属性列表,例如requiredinvisibledependsvalueraw_value等.

Of course I've tried a lot of ways, for example without using raw_value. And then it shows me the list of attributes of the tag field, like required, invisible, depends, value, raw_value, etc...

我在看板中寻找其他T-foreach,但此刻我什么都没找到,所以我开始认为这是不可能的.我说的对吗?

I've looked for other t-foreach in kanban and for the moment I didn't find anything, so I'm starting to think that it's not possible. Am I right?

推荐答案

是,使用 web_one2many_kanban

Yes, with web_one2many_kanban module is available in apps for V7, V8 and V9. Thanks to Serpent Consulting

这篇关于是否可以在Odoo的看板视图中显示One2many字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆