[英]searching items in a many2one field having the attribute widget=“selection”
I have created some groups of users who should not create new products while creating a purchase order. 我创建了一些用户组,这些用户组在创建采购订单时不应创建新产品。 So as a solution, i made the product_id as a many2one field and in the xml side, i added widget="selection".
因此,作为解决方案,我将product_id设置为many2one字段,并在xml端添加了widget =“ selection”。 I have now a selection field without the possibility of creation of new products (which is good) but the problem is that i cannot search or filter these products.
我现在有一个选择字段,无法创建新产品(很好),但是问题是我无法搜索或过滤这些产品。 Any ideas?
有任何想法吗? (i Want to have this pop up window:
(我想要这个弹出窗口:
I found the solution: when i was using widget="selection", i had not the possibility to search more products because the field became a selection field. 我找到了解决方案:当我使用widget =“ selection”时,由于该字段成为选择字段,因此我无法搜索更多产品。 Instead, i used
相反,我用
<field name="product_id" options="{'no_quick_create': True, 'no_create_edit' :
True}" />
Now, i have the "search more" option as shown in the picture below: 现在,我有“搜索更多”选项,如下图所示:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.