0
File "/home/bellvantage/Documents/openerp-7.0/openerp-7.0/openerp/sql_db.py", line 226, in execute
res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: ...=1,write_date=(now() at time zone 'UTC') where id IN (false)
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

我试图覆盖写入功能。因为我还需要更新另一个模型的 (bpl.company.define) 列。所以我使用了 write() 方法。但它给出了上述错误并需要对其进行排序。请给我建议并解释 write() 方法需要传递哪些参数(cr、uid 除外)。

我在这里上传我的模型课。&在这里查看课程。

bpl.py 中的第 100 行

好的,它的排序friend.issue与我在数据库中输入的数据。要读取的数据是null。所以返回false并且错误是这样的:-)

4

2 回答 2

1

"now() at time zone .........." 看起来很像 SQL,它应该是一个用双引号括起来的 Python 字符串,而不是裸词。

于 2013-04-11T04:29:48.880 回答
1

我认为在文件 bpl.py 中的创建函数中,您得到的 division_id 为 false,您尝试浏览非类型对象的记录,然后尝试写入它。请检查您的 Division_id 是否正确。

于 2013-04-11T05:06:38.243 回答