如何通过xmlrpc使用price_get?Odoo12调用该方法报错求助
解决Odoo12调用price_get方法时的"unhashable type: 'list'"错误
你遇到的错误是因为传给price_get的第一个参数是列表[1],而Odoo12中product.pricelist的price_get方法需要单个整数类型的价格表ID,列表属于不可哈希类型,内部处理时触发了异常。
修改后的调用代码:
priceEntity = odooClient.execute('product.pricelist', 'price_get', 1, 5591, 1, {})
如果要一次性查询多个价格表的产品价格,可以使用price_get_multi方法(该方法支持传入价格表ID列表),示例代码:
priceEntity = odooClient.execute('product.pricelist', 'price_get_multi', [1, 3], 5591, 1, {})
内容的提问来源于stack exchange,提问作者bb sof
相关产品推荐
相关产品推荐

