Python 开封发票
为什么会发生这种错误Python 开封发票,python,xml,database,openerp,Python,Xml,Database,Openerp,为什么会发生这种错误 ProgrammingError: operator does not exist: integer = boolean LINE 1: select name, model from ir_ui_view where (id=false or inheri... ^ HINT: No operator matches the given na
ProgrammingError: operator does not exist: integer = boolean
LINE 1: select name, model from ir_ui_view where (id=false or inheri...
^
HINT: No operator matches the given name and argument type(s).
You might need to add explicit type casts.
您正在尝试将整数与布尔值进行比较(如错误所示) 因为这是SQL 0(数字),所以不等于false(布尔类型)
您需要明确地为其指定一个数字id或空值过滤器(取决于表的架构)。在openerp中编码时,当您尝试使用空id列表写入记录(数据库表)时,会出现此错误。因此,请检查您是否为write函数提供了正确的ID