OpenERP Server Error
-
我想在创建sale_order_line的时候,选择产品后,在discount里面输入数字,price_unit里面就跟着变化。但是每次总是弹出错误
ProgrammingError: operator does not exist: integer = boolean
LINE 1: ...d FROM "product_product" WHERE product_product.id IN (false)...
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
但是关闭这个弹窗后还能实现这个功能。
以下是是我写的代码。
def on_change_price_unit(self, cr, uid, ids,price_unit,product,pricelist,qty=0,uom=False,partner_id=False,date_order=False,context=None):
context = context or {}
result={}
price = self.pool.get('product.pricelist').price_get(cr, uid, [pricelist],product,qty or 1.0, partner_id,{'uom': uom or result.get('product_uom'),'date': date_order,})[pricelist]
result.update({'price_unit':price - price*discount1/100})
return {'value':result}
google这个问题,说是数据库问题,请高人指教