Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
@api.model def do_clear_done(self): dones = self.search([('is_done', '=', True)]) dones.write({'active': False}) return True
报错 TypeError: cannot convert dictionary update sequence element #0 to a sequence 求问怎么解决啊
@grey
@api.model def do_clear_done(self): if self.is_done: dones.write({'active': False}) return True
@grey 你的代码是完全正确的啊!是拷贝过来的吗? 是不是原始代码里写错了,比如把字典里的冒号写成了逗号
@digitalsatori 是啊,就是一个例子,pycharm由语法错误会标红的,但是并没有。
怎么确定就是这段代码引起的,你有完整的Traceback吗?