Odoo中文网|Odoo实施培训

标题: 将is_done的值取反 [打印本页]

作者: 磨叽什么    时间: 2018-5-7 13:51
标题: 将is_done的值取反
  1. @api.multi
  2. def do_toggle_done(self):
  3.       for task in self:        
  4.            task.is_done = not task.is_done   
  5.       return True
复制代码






欢迎光临 Odoo中文网|Odoo实施培训 (http://www.chinaodoo.net/) Powered by Discuz! X3.2