Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Openerp 如何在采购订单中按供应商筛选产品?_Openerp - Fatal编程技术网

Openerp 如何在采购订单中按供应商筛选产品?

Openerp 如何在采购订单中按供应商筛选产品?,openerp,Openerp,我想按供应商筛选采购订单上的产品列表。我在product_id字段中添加了域,但它不起作用 <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"

我想按供应商筛选采购订单上的产品列表。我在product_id字段中添加了域,但它不起作用

 <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" domain="[('seller_ids','=',parent.partner_id)]" />

您的域名没有问题,只是犯了一个错误

你必须这样使用domian:

<field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,False,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" domain="[('seller_ids.name','=',parent.partner_id)]"/>


关于,

此域将起作用。为什么您的此域不起作用?它也帮助了我。谢谢。早些时候它对我有用。现在它抛出了如下错误:
验证字段arch时出错:视图架构的XML无效。不确定发生了什么…现在修复它。实际问题是我在同一个元素上有
widget=“selection”
。此筛选和选择小部件将不适用于同一元素。现在我没有问题了。
Try this domain, domain="[('seller_ids.name','=',parent.partner_id)]"